[
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.yml",
    "content": "name: 问题反馈 / Bug report\ntitle: \"[BUG] \"\ndescription: 反馈你遇到的问题 / Report the issue you are experiencing\n\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        ## 在提交问题之前，请确认以下事项：\n        1. 请务必给issue填写一个简洁明了的标题，以便他人快速检索\n        2. 请确保[已有的问题](https://github.com/chen08209/FlClash/issues?q=is%3Aissue) 中没有人提交过相似issue，否则请在已有的issue下进行讨论\n        3. 请务必按照模板规范详细描述问题，否则issue将会被直接关闭\n        ## Before submitting the issue, please make sure of the following checklist:\n        1. Please be sure to fill in a concise and clear title for the issue so that others can quickly search\n        2. Please make sure there is no similar issue in the [existing issues](https://github.com/chen08209/FlClash/issues?q=is%3Aissue), otherwise please discuss under the existing issue\n        3. Please describe the problem in detail according to the template specification, otherwise issue will be closed directly.\n  - type: textarea\n    id: description\n    attributes:\n      label: 问题描述 / Describe the bug\n      description: 详细清晰地描述你遇到的问题，并配合截图 / Describe the problem you encountered in detail and clearly, and provide screenshots\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: 软件版本 / Version\n      description: 请提供FlClash的具体版本 / Please provide the specific version of FlClash.\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: 复现步骤 / To Reproduce\n      description: 请提供复现问题的步骤 / Steps to reproduce the behavior\n    validations:\n      required: true\n  - type: dropdown\n    attributes:\n      label: 操作系统 / OS\n      options:\n        - Android\n        - Windows\n        - MacOS\n        - Linux\n    validations:\n      required: true\n  - type: input\n    attributes:\n      label: 操作系统版本 / OS Version\n      description: 请提供你的操作系统版本，Linux请额外提供桌面环境及窗口系统 / Please provide your OS version, for Linux, please also provide the desktop environment and window system\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: 日志(勿上传日志文件，请粘贴日志内容) / Log (Do not upload the log file, paste the log content directly)\n      description: 请提供完整或相关部分的Debug日志（请在“软件左侧菜单”->“设置”->“日志等级”调整到debug / Please provide a complete or relevant Debug log (please adjust it to debug in the left menu of software-> Settings-> Log Level)\n    validations:\n      required: true"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "contact_links:\n  - name: 讨论交流 / Communication\n    url: https://t.me/+G-veVtwBOl4wODc1\n    about: 在 Telegram 群组中与其他用户讨论交流 / Communicate with other users in the Telegram group"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.yml",
    "content": "name: 功能请求 / Feature request\ntitle: \"[Feature] \"\ndescription: 提出你的功能请求 / Propose your feature request\n\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        ## 在提交问题之前，请确认以下事项：\n        1. 请务必给issue填写一个简洁明了的标题，以便他人快速检索\n        2. 请确保[已有的问题](https://github.com/chen08209/FlClash/issues?q=is%3Aissue) 中没有人提交过相似issue，否则请在已有的issue下进行讨论\n        3. 请务必按照模板规范详细描述问题，否则issue将会被直接关闭\n        ## Before submitting the issue, please make sure of the following checklist:\n        1. Please be sure to fill in a concise and clear title for the issue so that others can quickly search\n        2. Please make sure there is no similar issue in the [existing issues](https://github.com/chen08209/FlClash/issues?q=is%3Aissue), otherwise please discuss under the existing issue\n        3. Please describe the problem in detail according to the template specification, otherwise issue will be closed directly.\n\n  - type: textarea\n    id: description\n    attributes:\n      label: 功能描述 / Feature description\n      description: 详细清晰地描述你的功能请求 / A clear and concise description of what the feature is\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: 使用场景 / Use case\n      description: 请描述你的功能请求的使用场景 / Please describe the use case of your feature request\n    validations:\n      required: true\n  - type: checkboxes\n    id: os-labels\n    attributes:\n      label: 适用系统 / Target OS\n      description: 请选择该功能适用的操作系统（至少选择一个） / Please select the operating system(s) for this feature request (select at least one)\n      options:\n        - label: Android\n        - label: Windows\n        - label: MacOS\n        - label: Linux\n    validations:\n      required: true"
  },
  {
    "path": ".github/release_template.md",
    "content": "<div align=center>\n\n[![Release Downloads](https://img.shields.io/github/downloads/chen08209/FlClash/vVERSION/total?style=flat-square&logo=github)](https://img.shields.io/github/downloads/chen08209/FlClash/vVERSION/)\n\n</div>\n\n**Download based on your OS:**\n\n<div align=left>\n<table>\n    <thead align=left>\n        <tr>\n            <th>OS</th>\n            <th>Download</th>\n        </tr>\n    </thead>\n    <tbody align=left>\n        <tr>\n        <td>Android</td>\n            <td>\n                <a href=\"https://github.com/chen08209/FlClash/releases/download/vVERSION/FlClash-VERSION-android-arm64-v8a.apk\"><img src=\"https://img.shields.io/badge/APK-ARMv8-168039.svg?logo=android\"></a><br>\n                <a href=\"https://github.com/chen08209/FlClash/releases/download/vVERSION/FlClash-VERSION-android-armeabi-v7a.apk\"><img src=\"https://img.shields.io/badge/APK-ARMv7-45bf55.svg?logo=android\"></a><br>\n                <a href=\"https://github.com/chen08209/FlClash/releases/download/vVERSION/FlClash-VERSION-android-x86_64.apk\"><img src=\"https://img.shields.io/badge/APK-x64-96ed89.svg?logo=android\"></a>\n            </td>\n        </tr>\n        <tr>\n            <td>Windows</td>\n            <td>\n                <a href=\"https://github.com/chen08209/FlClash/releases/download/vVERSION/FlClash-VERSION-windows-amd64-setup.exe\"><img src=\"https://img.shields.io/badge/Setup-x64-2d7d9a.svg?logo=windows\"></a><br>\n                <a href=\"https://github.com/chen08209/FlClash/releases/download/vVERSION/FlClash-VERSION-windows-amd64.zip\"><img src=\"https://img.shields.io/badge/Portable-x64-67b7d1.svg?logo=windows\"></a>\n            </td>\n        </tr>\n        <tr>\n            <td>macOS</td>\n            <td>\n                <a href=\"https://github.com/chen08209/FlClash/releases/download/vVERSION/FlClash-VERSION-macos-arm64.dmg\"><img src=\"https://img.shields.io/badge/DMG-Apple%20Silicon-%23000000.svg?logo=apple\"></a><br>\n                <a href=\"https://github.com/chen08209/FlClash/releases/download/vVERSION/FlClash-VERSION-macos-amd64.dmg\"><img src=\"https://img.shields.io/badge/DMG-Intel%20X64-%2300A9E0.svg?logo=apple\"></a><br>\n            </td>\n        </tr>\n        <tr>\n            <td>Linux</td>\n            <td>\n                <a href=\"https://github.com/chen08209/FlClash/releases/download/vVERSION/FlClash-VERSION-linux-amd64.AppImage\"><img src=\"https://img.shields.io/badge/AppImage-x64-f84e29.svg?logo=linux\"> </a><br>\n                <a href=\"https://github.com/chen08209/FlClash/releases/download/vVERSION/FlClash-VERSION-linux-amd64.deb\"><img src=\"https://img.shields.io/badge/DebPackage-x64-FF9966.svg?logo=debian\"> </a><br>\n                <a href=\"https://github.com/chen08209/FlClash/releases/download/vVERSION/FlClash-VERSION-linux-amd64.deb\"><img src=\"https://img.shields.io/badge/RpmPackage-x64-F1B42F.svg?logo=redhat\"> </a>\n            </td>\n        </tr>\n    </tbody>\n</table>\n\n\n</div>\n\n<div dir=\"ltr\">\n\n**List of all changes:** [ChangeLog](https://github.com/chen08209/FlClash/blob/main/CHANGELOG.md)\n\n</div>"
  },
  {
    "path": ".github/workflows/build.yaml",
    "content": "name: build\n\non:\n  push:\n    tags:\n      - 'v*'\nenv:\n  IS_STABLE: ${{ !contains(github.ref, '-') }}\n\njobs:\n  build:\n    runs-on: ${{ matrix.os }}\n    strategy:\n      matrix:\n        include:\n          - platform: android\n            os: ubuntu-latest\n          - platform: windows\n            os: Windows-2022\n            arch: amd64\n          - platform: linux\n            os: ubuntu-22.04\n            arch: amd64\n          - platform: macos\n            os: macos-15-intel\n            arch: amd64\n          - platform: macos\n            os: macos-latest\n            arch: arm64\n          #          - platform: windows\n          #            os: windows-11-arm\n          #            arch: arm64\n          - platform: linux\n            os: ubuntu-24.04-arm\n            arch: arm64\n\n    steps:\n      - name: Setup rust\n        if: startsWith(matrix.os, 'windows-11-arm')\n        run: |\n          Invoke-WebRequest -Uri \"https://win.rustup.rs/aarch64\" -OutFile rustup-init.exe\n          .\\rustup-init.exe -y --default-toolchain stable\n          $cargoPath = \"$env:USERPROFILE\\.cargo\\bin\"\n          Add-Content $env:GITHUB_PATH $cargoPath\n\n      - name: Checkout\n        uses: actions/checkout@v4\n        with:\n          submodules: recursive\n\n      - name: Setup Android Signing\n        if: startsWith(matrix.platform,'android')\n        run: |\n          echo \"${{ secrets.KEYSTORE }}\" | base64 --decode > android/app/keystore.jks\n          echo \"${{ secrets.SERVICE_JSON }}\" | base64 --decode > android/app/google-services.json\n          echo \"keyAlias=${{ secrets.KEY_ALIAS }}\" >> android/local.properties\n          echo \"storePassword=${{ secrets.STORE_PASSWORD }}\" >> android/local.properties\n          echo \"keyPassword=${{ secrets.KEY_PASSWORD }}\" >> android/local.properties\n\n      - name: Setup Go\n        uses: actions/setup-go@v5\n        with:\n          go-version: '1.24.0'\n          cache-dependency-path: |\n            core/go.sum\n\n      - name: Setup Flutter\n        if: ${{ !(startsWith(matrix.os, 'windows-11-arm') || startsWith(matrix.os, 'ubuntu-24.04-arm')) }}\n        uses: subosito/flutter-action@v2\n        with:\n          channel: stable\n          flutter-version: 3.35.7\n          cache: true\n      - name: Setup Flutter With Other\n        if: startsWith(matrix.os, 'windows-11-arm') || startsWith(matrix.os, 'ubuntu-24.04-arm')\n        uses: subosito/flutter-action@v2\n        with:\n          channel: master\n          flutter-version: 3.35.7\n          cache: true\n\n      - name: Get Flutter Dependency\n        run: |\n          flutter --version\n          flutter pub get\n\n      - name: Setup\n        run: dart setup.dart ${{ matrix.platform }} ${{ matrix.arch && format('--arch {0}', matrix.arch) }} ${{ env.IS_STABLE == 'true' && '--env stable' || '' }}\n\n      - name: Upload\n        uses: actions/upload-artifact@v4\n        with:\n          name: artifact-${{ matrix.platform }}${{ matrix.arch && format('-{0}', matrix.arch) }}\n          path: ./dist\n          overwrite: true\n\n  changelog:\n    runs-on: ubuntu-latest\n    needs: [ build ]\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n        if: ${{ env.IS_STABLE == 'true' }}\n        with:\n          fetch-depth: 0\n          ref: refs/heads/main\n      - name: Generate\n        if: ${{ env.IS_STABLE == 'true' }}\n        run: |\n          last_ver=$(grep -m1 '^## ' CHANGELOG.md 2>/dev/null | sed 's/^## //')\n          \n          tags=($(git tag --merged HEAD --sort=-creatordate))\n          \n          temp=\"NEW_CHANGELOG.md\" > \"$temp\"\n          \n          for i in \"${!tags[@]}\"; do\n              curr=\"${tags[i]}\"\n              [[ \"$curr\" == \"$last_ver\" ]] && break\n          \n              prev=\"${tags[i+1]}\"\n              range=\"${prev:+$prev..}$curr\"\n          \n              echo -e \"## $curr\\n\" >> \"$temp\"\n              git log --no-merges --pretty=format:\"%B\" \"$range\" | \\\n              awk '!/Update changelog/ && NF {print \"- \" $0 \"\\n\"}' >> \"$temp\"\n          done\n          [ -f CHANGELOG.md ] && cat CHANGELOG.md >> \"$temp\"\n          \n          mv \"$temp\" CHANGELOG.md\n\n      - name: Commit\n        if: ${{ env.IS_STABLE == 'true' }}\n        run: |\n          git add CHANGELOG.md\n          if ! git diff --cached --quiet; then\n            echo \"Commit pushing\"\n            git config --local user.email \"chen08209@gmail.com\"\n            git config --local user.name \"chen08209\"\n            git commit -m \"Update changelog\"\n            git push\n            if [ $? -eq 0 ]; then\n              echo \"Push succeeded\"\n            else\n              echo \"Push failed\"\n              exit 1\n            fi\n          fi\n\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n  upload:\n    permissions: write-all\n    needs: [ build ]\n    runs-on: ubuntu-latest\n    services:\n      telegram-bot-api:\n        image: aiogram/telegram-bot-api:latest\n        env:\n          TELEGRAM_API_ID: ${{ secrets.TELEGRAM_API_ID }}\n          TELEGRAM_API_HASH: ${{ secrets.TELEGRAM_API_HASH }}\n        ports:\n          - 8081:8081\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Download\n        uses: actions/download-artifact@v4\n        with:\n          path: ./dist/\n          pattern: artifact-*\n          merge-multiple: true\n\n      - name: Generate release.md\n        run: |\n          tags=($(git tag --merged HEAD --sort=-creatordate))\n          preTag=$(curl -s \"https://api.github.com/repos/chen08209/FlClash/releases/latest\" | \\\n          sed -nE 's/.*\"tag_name\": \"([^\"]+)\".*/\\1/p')\n          \n          [ -z \"$preTag\" ] && preTag=\"\"\n          \n          out=\"release.md\" > \"$out\"\n          \n          for i in \"${!tags[@]}\"; do\n            curr=\"${tags[i]}\"\n            [[ \"$curr\" == \"$preTag\" ]] && break\n          \n            prev=\"${tags[i+1]}\"\n            range=\"${prev:+$prev..}$curr\"\n          \n            git log --no-merges --pretty=format:\"%B\" \"$range\" | \\\n            awk '!/Update changelog/ && NF {print \"- \" $0 \"\\n\"}' >> \"$out\"\n          done\n      - name: Push to telegram\n        env:\n          TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}\n          TAG: ${{ github.ref_name }}\n          RUN_ID: ${{ github.run_id }}\n        run: |\n          python -m pip install --upgrade pip\n          pip install requests\n          python release_telegram.py\n\n      - name: Patch release.md\n        run: |\n          version=$(echo \"${{ github.ref_name }}\" | sed 's/^v//')\n          sed \"s|VERSION|$version|g\" ./.github/release_template.md >> release.md\n\n      - name: Generate sha256\n        if: env.IS_STABLE == 'true'\n        run: |\n          cd ./dist\n          for file in $(find . -type f -not -name \"*.sha256\"); do\n            sha256sum \"$file\" > \"${file}.sha256\"\n          done  \n\n      - name: Release\n        if: ${{ env.IS_STABLE == 'true' }}\n        uses: softprops/action-gh-release@v2\n        with:\n          files: ./dist/*\n          body_path: './release.md'\n\n      - name: Create Fdroid Source Dir\n        if: ${{ env.IS_STABLE == 'true' }}\n        run: |\n          mkdir -p ./tmp\n          cp ./dist/*android-arm64-v8a* ./tmp/ || true\n          echo \"Files copied successfully\"\n\n      - name: Push to fdroid repo\n        if: ${{ env.IS_STABLE == 'true' }}\n        uses: cpina/github-action-push-to-another-repository@v1.7.2\n        env:\n          SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}\n        with:\n          source-directory: ./tmp/\n          destination-github-username: chen08209\n          destination-repository-name: FlClash-fdroid-repo\n          user-name: 'github-actions[bot]'\n          user-email: 'github-actions[bot]@users.noreply.github.com'\n          target-branch: main\n          commit-message: Update from ${{ github.ref_name }}\n          target-directory: /tmp/\n\n"
  },
  {
    "path": ".gitignore",
    "content": "# Miscellaneous\n*.class\n*.log\n*.pyc\n*.swp\n.DS_Store\n.atom/\n.build/\n.buildlog/\n.history\n.svn/\n.swiftpm/\nmigrate_working_dir/\n\n# IntelliJ related\n*.iml\n*.ipr\n*.iws\n.idea/\n\n# The .vscode folder contains launch configuration and tasks you configure in\n# VS Code which you may wish to be included in version control, so this line\n# is commented out by default.\n.vscode/\n\n# Flutter/Dart/Pub related\n**/doc/api/\n**/ios/Flutter/.last_build_id\n.dart_tool/\n.flutter-plugins\n.flutter-plugins-dependencies\n.packages\n.pub-cache/\n.pub/\n/build/\n/dist/\n\n# Symbolication related\napp.*.symbols\n\n# Obfuscation related\napp.*.map.json\n\n#AI generated\nCLAUDE.md\n/.claude\n\n\n# Android Studio will place build artifacts here\n/android/app/debug\n/android/app/profile\n/android/app/release\n/android/**/.cxx\n/android/**/build\n/android/common/**/.**/\n/android/common/local.*\n/android/core/**/includes/\n/android/core/**/cmake-build-*/\n/android/core/**/jniLibs/\n\n#FlClash\n/libclash/\n/android/app/src/main/jniLibs/\n/services/helper/target\n/macos/**/Package.resolved\ndevtools_options.yaml\n\n# FVM Version Cache\n.fvm/\n.fvmrc"
  },
  {
    "path": ".gitmodules",
    "content": "[submodule \"core/Clash.Meta\"]\n\tpath = core/Clash.Meta\n\turl = git@github.com:chen08209/Clash.Meta.git\n\tbranch = FlClash\n[submodule \"plugins/flutter_distributor\"]\n\tpath = plugins/flutter_distributor\n\turl = git@github.com:chen08209/flutter_distributor.git\n\tbranch = FlClash\n[submodule \"plugins/tray_manager\"]\n\tpath = plugins/tray_manager\n\turl = git@github.com:chen08209/tray_manager.git\n\tbranch = main\n\n\n"
  },
  {
    "path": ".metadata",
    "content": "# This file tracks properties of this Flutter project.\n# Used by Flutter tool to assess capabilities and perform upgrades etc.\n#\n# This file should be version controlled and should not be manually edited.\n\nversion:\n  revision: \"adc901062556672b4138e18a4dc62a4be8f4b3c2\"\n  channel: \"stable\"\n\nproject_type: app\n\n# Tracks metadata for the flutter migrate command\nmigration:\n  platforms:\n    - platform: root\n      create_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2\n      base_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2\n    - platform: windows\n      create_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2\n      base_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2\n\n  # User provided section\n\n  # List of Local paths (relative to this file) that should be\n  # ignored by the migrate tool.\n  #\n  # Files that are not part of the templates will be ignored by default.\n  unmanaged_files:\n    - 'lib/main.dart'\n    - 'ios/Runner.xcodeproj/project.pbxproj'\n"
  },
  {
    "path": ".run/main.dart.run.xml",
    "content": "<component name=\"ProjectRunConfigurationManager\">\n  <configuration default=\"false\" name=\"main.dart\" type=\"FlutterRunConfigurationType\" factoryName=\"Flutter\">\n    <option name=\"additionalArgs\" value=\"--dart-define-from-file env.json\" />\n    <option name=\"filePath\" value=\"$PROJECT_DIR$/lib/main.dart\" />\n    <method v=\"2\" />\n  </configuration>\n</component>"
  },
  {
    "path": "CHANGELOG.md",
    "content": "## v0.8.92\n\n- Add sqlite store\n\n- Optimize android quick action\n\n- Optimize backup and restore\n\n- Optimize more details\n\n## v0.8.91\n\n- Fix windows some issues\n\n- Optimize overwrite handle\n\n- Optimize access control page\n\n- Optimize some details\n\n## v0.8.90\n\n- Fix android tile service\n\n- Support append system DNS\n\n- Fix some issues\n\n- Update changelog\n\n## v0.8.89\n\n- Fix some issues\n\n- Optimize Windows service mode\n\n- Update core\n\n- Update changelog\n\n## v0.8.88\n\n- Add android separates the core process\n\n- Support core status check and force restart\n\n- Optimize proxies page and access page\n\n- Update flutter and pub dependencies\n\n- Update go version\n\n- Optimize more details\n\n- Update changelog\n\n## v0.8.87\n\n- Optimize desktop view\n\n- Optimize logs, requests, connection pages\n\n- Optimize windows tray auto hide\n\n- Optimize some details\n\n- Update core\n\n- Update changelog\n\n## v0.8.86\n\n- Fix windows tun issues\n\n- Optimize android get system dns\n\n- Optimize more details\n\n- Update changelog\n\n## v0.8.85\n\n- Support override script\n\n- Support proxies search\n\n- Support svg display\n\n- Optimize config persistence\n\n- Add some scenes auto close connections\n\n- Update core\n\n- Optimize more details\n\n## v0.8.84\n\n- Fix windows service verify issues\n\n- Update changelog\n\n## v0.8.83\n\n- Add windows server mode start process verify\n\n- Add linux deb dependencies\n\n- Add backup recovery strategy select\n\n- Support custom text scaling\n\n- Optimize the display of different text scale\n\n- Optimize windows setup experience\n\n- Optimize startTun performance\n\n- Optimize android tv experience\n\n- Optimize default option\n\n- Optimize computed text size\n\n- Optimize hyperOS freeform window\n\n- Add developer mode\n\n- Update core\n\n- Optimize more details\n\n- Add issues template\n\n- Update changelog\n\n## v0.8.82\n\n- Optimize android vpn performance\n\n- Add custom primary color and color scheme\n\n- Add linux nad windows arm release\n\n- Optimize requests and logs page\n\n- Fix map input page delete issues\n\n- Update changelog\n\n## v0.8.81\n\n- Add rule override\n\n- Update core\n\n- Optimize more details\n\n- Update changelog\n\n## v0.8.80\n\n- Optimize dashboard performance\n\n- Fix some issues\n\n- Fix unselected proxy group delay issues\n\n- Fix asn url issues\n\n- Update changelog\n\n## v0.8.79\n\n- Fix tab delay view issues\n\n- Fix tray action issues\n\n- Fix get profile redirect client ua issues\n\n- Fix proxy card delay view issues\n\n- Add Russian, Japanese adaptation\n\n- Fix some issues\n\n- Update changelog\n\n## v0.8.78\n\n- Fix list form input view issues\n\n- Fix traffic view issues\n\n- Update changelog\n\n## v0.8.77\n\n- Optimize performance\n\n- Update core\n\n- Optimize core stability\n\n- Fix linux tun authority check error\n\n- Fix some issues\n\n- Fix scroll physics error\n\n- Update changelog\n\n## v0.8.75\n\n- Add windows storage corruption detection\n\n- Fix core crash caused by windows resource manager restart\n\n- Optimize logs, requests, access to pages\n\n- Fix macos bypass domain issues\n\n- Update changelog\n\n## v0.8.74\n\n- Fix some issues\n\n- Update changelog\n\n## v0.8.73\n\n- Update popup menu\n\n- Add file editor\n\n- Fix android service issues\n\n- Optimize desktop background performance\n\n- Optimize android main process performance\n\n- Optimize delay test\n\n- Optimize vpn protect\n\n- Update changelog\n\n## v0.8.72\n\n- Update core\n\n- Fix some issues\n\n- Update changelog\n\n## v0.8.71\n\n- Remake dashboard\n\n- Optimize theme\n\n- Optimize more details\n\n- Update flutter version\n\n- Update changelog\n\n## v0.8.70\n\n- Support better window position memory\n\n- Add windows arm64 and linux arm64 build script\n\n- Optimize some details\n\n## v0.8.69\n\n- Remake desktop\n\n- Optimize change proxy\n\n- Optimize network check\n\n- Fix fallback issues\n\n- Optimize lots of details\n\n- Update change.yaml\n\n- Fix android tile issues\n\n- Fix windows tray issues\n\n- Support setting bypassDomain\n\n- Update flutter version\n\n- Fix android service issues\n\n- Fix macos dock exit button issues\n\n- Add route address setting\n\n- Optimize provider view\n\n- Update changelog\n\n- Update CHANGELOG.md\n\n## v0.8.67\n\n- Add android shortcuts\n\n- Fix init params issues\n\n- Fix dynamic color issues\n\n- Optimize navigator animate\n\n- Optimize window init\n\n- Optimize fab\n\n- Optimize save\n\n## v0.8.66\n\n- Fix the collapse issues\n\n- Add fontFamily options\n\n## v0.8.65\n\n- Update core version\n\n- Update flutter version\n\n- Optimize ip check\n\n- Optimize url-test\n\n## v0.8.64\n\n- Update release message\n\n- Init auto gen changelog\n\n- Fix windows tray issues\n\n- Fix urltest issues\n\n- Add auto changelog\n\n- Fix windows admin auto launch issues\n\n- Add android vpn options\n\n- Support proxies icon configuration\n\n- Optimize android immersion display\n\n- Fix some issues\n\n- Optimize ip detection\n\n- Support android vpn ipv6 inbound switch\n\n- Support log export\n\n- Optimize more details\n\n- Fix android system dns issues\n\n- Optimize dns default option\n\n- Fix some issues\n\n- Update readme\n\n## v0.8.60\n\n- Fix build error2\n\n- Fix build error\n\n- Support desktop hotkey\n\n- Support android ipv6 inbound\n\n- Support android system dns\n\n- fix some bugs\n\n## v0.8.59\n\n- Fix delete profile error\n\n## v0.8.58\n\n- Fix submit error 2\n\n- Fix submit error\n\n- Optimize DNS strategy\n\n- Fix the problem that the tray is not displayed in some cases\n\n- Optimize tray\n\n- Update core\n\n- Fix some error\n\n## v0.8.57\n\n- Fix tun update issues\n\n- Add DNS override\n- Fixed some bugs\n- Optimize more detail\n\n- Add Hosts override\n\n## v0.8.56\n\n- fix android tip error\n- fix windows auto launch error\n\n## v0.8.55\n\n- Fix windows tray issues\n\n- Optimize windows logic\n\n- Optimize app logic\n\n- Support windows administrator auto launch\n\n- Support android close vpn\n\n## v0.8.53\n\n- Change flutter version\n\n- Support profiles sort\n\n- Support windows country flags display\n\n- Optimize proxies page and profiles page columns\n\n## v0.8.52\n\n- Update flutter version\n\n- Update version\n\n- Update timeout time\n\n- Update access control page\n\n- Fix bug\n\n## v0.8.51\n\n- Optimize provider page\n\n- Optimize delay test\n\n- Support local backup and recovery\n\n- Fix android tile service issues\n\n## v0.8.49\n\n- Fix linux core build error\n\n- Add proxy-only traffic statistics\n\n- Update core\n\n- Optimize more details\n\n- Merge pull request #140 from txyyh/main\n\n- 添加自建 F-Droid 仓库相关 workflow\n- Rename readme fingerprint\n\n- Rename workflow deploy repo name\n\n- Add download guide to README\n\n- Add push release files to fdroid-repo\n\n## v0.8.48\n\n- Optimize proxies page\n\n- Fix ua issues\n\n- Optimize more details\n\n## v0.8.47\n\n- Fix windows build error\n\n## v0.8.46\n\n- Update app icon\n\n- Fix desktop backup error\n\n- Optimize request ua\n\n- Change android icon\n\n- Optimize dashboard\n\n## v0.8.44\n\n- Remove request validate certificate\n\n- Sync core\n\n## v0.8.43\n\n- Fix windows error\n\n## v0.8.42\n\n- Fix setup.dart error\n\n- Fix android system proxy not effective\n\n- Add macos arm64\n\n## v0.8.41\n\n- Optimize proxies page\n\n- Support mouse drag scroll\n\n- Adjust desktop ui\n\n- Revert \"Fix android vpn issues\"\n\n- This reverts commit 891977408e6938e2acd74e9b9adb959c48c79988.\n\n## v0.8.40\n\n- Fix android vpn issues\n\n- Fix android vpn issues\n\n- Rollback partial modification\n\n## v0.8.39\n\n- Fix the problem that ui can't be synchronized when android vpn is occupied by an external\n\n- Override default socksPort,port\n\n## v0.8.38\n\n- Fix fab issues\n\n## v0.8.37\n\n- Update version\n\n- Fix the problem that vpn cannot be started in some cases\n\n- Fix the problem that geodata url does not take effect\n\n## v0.8.36\n\n- Update ua\n\n- Fix change outbound mode without check ip issues\n\n- Separate android ui and vpn\n\n- Fix url validate issues 2\n\n- Add android hidden from the recent task\n\n- Add geoip file\n\n- Support modify geoData URL\n\n## v0.8.35\n\n- Fix url validate issues\n\n- Fix check ip performance problem\n\n- Optimize resources page\n\n## v0.8.34\n\n- Add ua selector\n\n- Support modify test url\n\n- Optimize android proxy\n\n- Fix the error that async proxy provider could not selected the proxy\n\n## v0.8.33\n\n- Fix android proxy error\n\n- Fix submit error\n\n- Add windows tun\n\n- Optimize android proxy\n\n- Optimize change profile\n\n- Update application ua\n\n- Optimize delay test\n\n## v0.8.32\n\n- Fix android repeated request notification issues\n\n## v0.8.31\n\n- Fix memory overflow issues\n\n## v0.8.30\n\n- Optimize proxies expansion panel 2\n\n- Fix android scan qrcode error\n\n## v0.8.29\n\n- Optimize proxies expansion panel\n\n- Fix text error\n\n## v0.8.28\n\n- Optimize proxy\n\n- Optimize delayed sorting performance\n\n- Add expansion panel proxies page\n\n- Support to adjust the proxy card size\n\n- Support to adjust proxies columns number\n\n- Fix autoRun show issues\n\n- Fix Android 10 issues\n\n- Optimize ip show\n\n## v0.8.26\n\n- Add intranet IP display\n\n- Add connections page\n\n- Add search in connections, requests\n\n- Add keyword search in connections, requests, logs\n\n- Add basic viewing editing capabilities\n\n- Optimize update profile\n\n## v0.8.25\n\n- Update version\n\n- Fix the problem of excessive memory usage in traffic usage.\n\n- Add lightBlue theme color\n\n- Fix start unable to update profile issues\n\n- Fix flashback caused by process\n\n## v0.8.23\n\n- Add build version\n\n- Optimize quick start\n\n- Update system default option\n\n## v0.8.22\n\n- Update build.yml\n\n- Fix android vpn close issues\n\n- Add requests page\n\n- Fix checkUpdate dark mode style error\n\n- Fix quickStart error open app\n\n- Add memory proxies tab index\n\n- Support hidden group\n\n- Optimize logs\n\n- Fix externalController hot load error\n\n## v0.8.21\n\n- Add tcp concurrent switch\n\n- Add system proxy switch\n\n- Add geodata loader switch\n\n- Add external controller switch\n\n- Add auto gc on trim memory\n\n- Fix android notification error\n\n## v0.8.20\n\n- Fix ipv6 error\n\n- Fix android udp direct error\n\n- Add ipv6 switch\n\n- Add access all selected button\n\n- Remove android low version splash\n\n## v0.8.19\n\n- Update version\n\n- Add allowBypass\n\n- Fix Android only pick .text file issues\n\n## v0.8.18\n\n- Fix search issues\n\n## v0.8.17\n\n- Fix LoadBalance, Relay load error\n\n- Fix build.yml4\n\n- Fix build.yml3\n\n- Fix build.yml2\n\n- Fix build.yml\n\n- Add search function at access control\n\n- Fix the issues with the profile add button to cover the edit button\n\n- Adapt LoadBalance and Relay\n\n- Add arm\n\n- Fix android notification icon error\n\n## v0.8.16\n\n- Add one-click update all profiles\n- Add expire show\n\n## v0.8.15\n\n- Temp remove tun mode\n\n- Remove macos in workflow\n\n- Change go version\n\n## v0.8.14\n\n- Update Version\n\n- Fix tun unable to open\n\n## v0.8.13\n\n- Optimize delay test2\n\n- Optimize delay test\n\n- Add check ip\n\n- add check ip request\n\n## v0.8.12\n\n- Fix the problem that the download of remote resources failed after GeodataMode was turned on, which caused the\n  application to flash back.\n\n- Fix edit profile error\n\n- Fix quickStart change proxy error\n\n- Fix core version\n\n## v0.8.10\n\n- Fix core version\n\n## v0.8.9\n\n- Update file_picker\n\n- Add resources page\n\n- Optimize more detail\n\n- Add access selected sorted\n\n- Fix notification duplicate creation issue\n\n- Fix AccessControl click issue\n\n## v0.8.7\n\n- Fix Workflow\n\n- Fix Linux unable to open\n\n- Update README.md 3\n\n- Create LICENSE\n- Update README.md 2\n\n- Update README.md\n\n- Optimize workFlow\n\n## v0.8.6\n\n- optimize checkUpdate\n\n## v0.8.5\n\n- Fix submit error\n\n## v0.8.4\n\n- add WebDAV\n\n- add Auto check updates\n\n- Optimize more details\n\n- optimize delayTest\n\n## v0.8.2\n\n- upgrade flutter version\n\n## v0.8.1\n\n- Update kernel\n- Add import profile via QR code image\n\n## v0.8.0\n\n- Add compatibility mode and adapt clash scheme.\n\n## v0.7.14\n\n- update Version\n\n- Reconstruction application proxy logic\n\n## v0.7.13\n\n- Fix Tab destroy error\n\n## v0.7.12\n\n- Optimize repeat healthcheck\n\n## v0.7.11\n\n- Optimize Direct mode ui\n\n## v0.7.10\n\n- Optimize Healthcheck\n\n- Remove proxies position animation, improve performance\n- Add Telegram Link\n\n- Update healthcheck policy\n\n- New Check URLTest\n\n- Fix the problem of invalid auto-selection\n\n## v0.7.8\n\n- New Async UpdateConfig\n\n- add changeProfileDebounce\n\n- Update Workflow\n\n- Fix ChangeProfile block\n\n- Fix Release Message Error\n\n## v0.7.7\n\n- Update Selector 2\n\n## v0.7.6\n\n- Update Version\n\n- Fix Proxies Select Error\n\n## v0.7.5\n\n- Fix the problem that the proxy group is empty in global mode.\n\n- Fix the problem that the proxy group is empty in global mode.\n\n## v0.7.4\n\n- Add ProxyProvider2\n\n## v0.7.3\n\n- Add ProxyProvider\n\n- Update Version\n\n- Update ProxyGroup Sort\n\n- Fix Android quickStart VpnService some problems\n\n## v0.7.1\n\n- Update version\n\n- Set Android notification low importance\n\n- Fix the issue that VpnService can't be closed correctly in special cases\n\n- Fix the problem that TileService is not destroyed correctly in some cases\n\n- Adjust tab animation defaults\n\n- Add Telegram in README_zh_CN.md\n\n- Add Telegram\n\n## v0.7.0\n\n- update mobile_scanner\n\n- Initial commit"
  },
  {
    "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.md",
    "content": "<div>\n\n[**简体中文**](README_zh_CN.md)\n\n</div>\n\n## FlClash\n\n[![Downloads](https://img.shields.io/github/downloads/chen08209/FlClash/total?style=flat-square&logo=github)](https://github.com/chen08209/FlClash/releases/)[![Last Version](https://img.shields.io/github/release/chen08209/FlClash/all.svg?style=flat-square)](https://github.com/chen08209/FlClash/releases/)[![License](https://img.shields.io/github/license/chen08209/FlClash?style=flat-square)](LICENSE)\n\n[![Channel](https://img.shields.io/badge/Telegram-Channel-blue?style=flat-square&logo=telegram)](https://t.me/FlClash)\n\nA multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free.\n\non Desktop:\n<p style=\"text-align: center;\">\n    <img alt=\"desktop\" src=\"snapshots/desktop.gif\">\n</p>\n\non Mobile:\n<p style=\"text-align: center;\">\n    <img alt=\"mobile\" src=\"snapshots/mobile.gif\">\n</p>\n\n## Features\n\n✈️ Multi-platform: Android, Windows, macOS and Linux\n\n💻 Adaptive multiple screen sizes, Multiple color themes available\n\n💡 Based on Material You Design, [Surfboard](https://github.com/getsurfboard/surfboard)-like UI\n\n☁️ Supports data sync via WebDAV\n\n✨ Support subscription link, Dark mode\n\n## Use\n\n### Linux\n\n⚠️ Make sure to install the following dependencies before using them\n\n   ```bash\n    sudo apt-get install libayatana-appindicator3-dev\n    sudo apt-get install libkeybinder-3.0-dev\n   ```\n\n### Android\n\nSupport the following actions\n\n   ```bash\n    com.follow.clash.action.START\n    \n    com.follow.clash.action.STOP\n    \n    com.follow.clash.action.TOGGLE\n   ```\n\n## Download\n\n<a href=\"https://chen08209.github.io/FlClash-fdroid-repo/repo?fingerprint=789D6D32668712EF7672F9E58DEEB15FBD6DCEEC5AE7A4371EA72F2AAE8A12FD\"><img alt=\"Get it on F-Droid\" src=\"snapshots/get-it-on-fdroid.svg\" width=\"200px\"/></a> <a href=\"https://github.com/chen08209/FlClash/releases\"><img alt=\"Get it on GitHub\" src=\"snapshots/get-it-on-github.svg\" width=\"200px\"/></a>\n\n## Build\n\n1. Update submodules\n   ```bash\n   git submodule update --init --recursive\n   ```\n\n2. Install `Flutter` and `Golang` environment\n\n3. Build Application\n\n    - android\n\n        1. Install  `Android SDK` ,  `Android NDK`\n\n        2. Set `ANDROID_NDK` environment variables\n\n        3. Run Build script\n\n           ```bash\n           dart .\\setup.dart android\n           ```\n\n    - windows\n\n        1. You need a windows client\n\n        2. Install  `Gcc`，`Inno Setup`\n\n        3. Run build script\n\n           ```bash\n           dart .\\setup.dart windows --arch <arm64 | amd64>\n           ```\n\n    - linux\n\n        1. You need a linux client\n\n        2. Run build script\n\n           ```bash\n           dart .\\setup.dart linux --arch <arm64 | amd64>\n           ```\n\n    - macOS\n\n        1. You need a macOS client\n\n        2. Run build script\n\n           ```bash\n           dart .\\setup.dart macos --arch <arm64 | amd64>\n           ```\n\n## Star\n\nThe easiest way to support developers is to click on the star (⭐) at the top of the page.\n\n<p style=\"text-align: center;\">\n    <a href=\"https://api.star-history.com/svg?repos=chen08209/FlClash&Date\">\n        <img alt=\"start\" width=50% src=\"https://api.star-history.com/svg?repos=chen08209/FlClash&Date\"/>\n    </a>\n</p>"
  },
  {
    "path": "README_zh_CN.md",
    "content": "<div>\n\n[**English**](README.md)\n\n</div>\n\n## FlClash\n\n[![Downloads](https://img.shields.io/github/downloads/chen08209/FlClash/total?style=flat-square&logo=github)](https://github.com/chen08209/FlClash/releases/)[![Last Version](https://img.shields.io/github/release/chen08209/FlClash/all.svg?style=flat-square)](https://github.com/chen08209/FlClash/releases/)[![License](https://img.shields.io/github/license/chen08209/FlClash?style=flat-square)](LICENSE)\n\n[![Channel](https://img.shields.io/badge/Telegram-Channel-blue?style=flat-square&logo=telegram)](https://t.me/FlClash)\n\n基于ClashMeta的多平台代理客户端，简单易用，开源无广告。\n\non Desktop:\n<p style=\"text-align: center;\">\n    <img alt=\"desktop\" src=\"snapshots/desktop.gif\">\n</p>\n\non Mobile:\n<p style=\"text-align: center;\">\n    <img alt=\"mobile\" src=\"snapshots/mobile.gif\">\n</p>\n\n## Features\n\n✈️ 多平台: Android, Windows, macOS and Linux\n\n💻 自适应多个屏幕尺寸,多种颜色主题可供选择\n\n💡 基本 Material You 设计, 类[Surfboard](https://github.com/getsurfboard/surfboard)用户界面\n\n☁️ 支持通过WebDAV同步数据\n\n✨ 支持一键导入订阅, 深色模式\n\n## Use\n\n### Linux\n\n⚠️ 使用前请确保安装以下依赖\n\n   ```bash\n    sudo apt-get install libayatana-appindicator3-dev\n    sudo apt-get install libkeybinder-3.0-dev\n   ```\n\n### Android\n\n支持下列操作\n\n   ```bash\n    com.follow.clash.action.START\n    \n    com.follow.clash.action.STOP\n    \n    com.follow.clash.action.TOGGLE\n   ```\n\n## Download\n\n<a href=\"https://chen08209.github.io/FlClash-fdroid-repo/repo?fingerprint=789D6D32668712EF7672F9E58DEEB15FBD6DCEEC5AE7A4371EA72F2AAE8A12FD\"><img alt=\"Get it on F-Droid\" src=\"snapshots/get-it-on-fdroid.svg\" width=\"200px\"/></a> <a href=\"https://github.com/chen08209/FlClash/releases\"><img alt=\"Get it on GitHub\" src=\"snapshots/get-it-on-github.svg\" width=\"200px\"/></a>\n\n## Build\n\n1. 更新 submodules\n   ```bash\n   git submodule update --init --recursive\n   ```\n\n2. 安装 `Flutter` 以及 `Golang` 环境\n\n3. 构建应用\n\n    - android\n\n        1. 安装  `Android SDK` ,  `Android NDK`\n\n        2. 设置 `ANDROID_NDK` 环境变量\n\n        3. 运行构建脚本\n\n           ```bash\n           dart .\\setup.dart android\n           ```\n\n    - windows\n\n        1. 你需要一个windows客户端\n\n        2. 安装 `Gcc`，`Inno Setup`\n\n        3. 运行构建脚本\n\n           ```bash\n           dart .\\setup.dart windows --arch <arm64 | amd64>\n           ```\n\n    - linux\n\n        1. 你需要一个linux客户端\n\n        2. 运行构建脚本\n\n           ```bash\n           dart .\\setup.dart linux --arch <arm64 | amd64>\n           ```\n\n    - macOS\n\n        1. 你需要一个macOS客户端\n\n        2. 运行构建脚本\n\n           ```bash\n           dart .\\setup.dart macos --arch <arm64 | amd64>\n           ```\n\n## Star History\n\n支持开发者的最简单方式是点击页面顶部的星标（⭐）。\n\n<p style=\"text-align: center;\">\n    <a href=\"https://api.star-history.com/svg?repos=chen08209/FlClash&Date\">\n        <img alt=\"start\" width=50% src=\"https://api.star-history.com/svg?repos=chen08209/FlClash&Date\"/>\n    </a>\n</p>"
  },
  {
    "path": "analysis_options.yaml",
    "content": "include: package:flutter_lints/flutter.yaml\nanalyzer:\n  exclude:\n    - lib/l10n/intl/**\n  errors:\n    invalid_annotation_target: ignore\n\nlinter:\n  rules:\n    prefer_single_quotes: true"
  },
  {
    "path": "android/.gitignore",
    "content": "gradle-wrapper.jar\n/.gradle\n/captures/\n/gradlew\n/gradlew.bat\n/local.properties\nGeneratedPluginRegistrant.java\n\n# Remember to never publicly share your keystore.\n# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app\nkey.properties\n**/*.keystore\n**/*.jks\n"
  },
  {
    "path": "android/app/build.gradle.kts",
    "content": "import org.jetbrains.kotlin.gradle.dsl.JvmTarget\nimport java.util.Properties\n\nplugins {\n    id(\"com.android.application\")\n    id(\"kotlin-android\")\n    id(\"dev.flutter.flutter-gradle-plugin\")\n    id(\"com.google.gms.google-services\")\n    id(\"com.google.firebase.crashlytics\")\n}\n\nval localPropertiesFile = rootProject.file(\"local.properties\")\nval localProperties = Properties().apply {\n    if (localPropertiesFile.exists()) {\n        localPropertiesFile.inputStream().use { load(it) }\n    }\n}\n\nval mStoreFile: File = file(\"keystore.jks\")\nval mStorePassword: String? = localProperties.getProperty(\"storePassword\")\nval mKeyAlias: String? = localProperties.getProperty(\"keyAlias\")\nval mKeyPassword: String? = localProperties.getProperty(\"keyPassword\")\nval isRelease =\n    mStoreFile.exists() && mStorePassword != null && mKeyAlias != null && mKeyPassword != null\n\n\nandroid {\n    namespace = \"com.follow.clash\"\n    compileSdk = libs.versions.compileSdk.get().toInt()\n    ndkVersion = libs.versions.ndkVersion.get()\n\n\n\n    compileOptions {\n        sourceCompatibility = JavaVersion.VERSION_17\n        targetCompatibility = JavaVersion.VERSION_17\n    }\n\n    defaultConfig {\n        applicationId = \"com.follow.clash\"\n        minSdk = flutter.minSdkVersion\n        targetSdk = libs.versions.targetSdk.get().toInt()\n        versionCode = flutter.versionCode\n        versionName = flutter.versionName\n    }\n\n    signingConfigs {\n        if (isRelease) {\n            create(\"release\") {\n                storeFile = mStoreFile\n                storePassword = mStorePassword\n                keyAlias = mKeyAlias\n                keyPassword = mKeyPassword\n            }\n        }\n    }\n\n    packaging {\n        jniLibs {\n            useLegacyPackaging = true\n        }\n    }\n\n    buildTypes {\n        debug {\n            isMinifyEnabled = false\n            applicationIdSuffix = \".dev\"\n        }\n\n        release {\n            isMinifyEnabled = true\n            isShrinkResources = true\n            if (isRelease) {\n                signingConfig = signingConfigs.getByName(\"release\")\n            } else {\n                signingConfig = signingConfigs.getByName(\"debug\")\n                applicationIdSuffix = \".dev\"\n            }\n\n            proguardFiles(\n                getDefaultProguardFile(\"proguard-android-optimize.txt\"), \"proguard-rules.pro\"\n            )\n        }\n    }\n}\n\nkotlin {\n    compilerOptions {\n        jvmTarget.set(JvmTarget.JVM_17)\n    }\n}\n\nflutter {\n    source = \"../..\"\n}\n\n\ndependencies {\n    implementation(project(\":service\"))\n    implementation(project(\":common\"))\n    implementation(libs.core.splashscreen)\n    implementation(libs.gson)\n    implementation(libs.smali.dexlib2) {\n        exclude(group = \"com.google.guava\", module = \"guava\")\n    }\n    implementation(platform(libs.firebase.bom))\n    implementation(libs.firebase.crashlytics.ndk)\n    implementation(libs.firebase.analytics)\n}"
  },
  {
    "path": "android/app/google-services.json",
    "content": "{\n  \"project_info\": {\n    \"project_number\": \"000000000000\",\n    \"project_id\": \"dev\"\n  },\n  \"client\": [\n    {\n      \"client_info\": {\n        \"mobilesdk_app_id\": \"1:000000000000:android:0000000000000000\",\n        \"android_client_info\": {\n          \"package_name\": \"com.follow.clash\"\n        }\n      },\n      \"oauth_client\": [],\n      \"api_key\": [\n        {\n          \"current_key\": \"0\"\n        }\n      ],\n      \"services\": {\n        \"appinvite_service\": {\n          \"other_platform_oauth_client\": []\n        }\n      }\n    },\n    {\n      \"client_info\": {\n        \"mobilesdk_app_id\": \"1:000000000000:android:0000000000000000\",\n        \"android_client_info\": {\n          \"package_name\": \"com.follow.clash.debug\"\n        }\n      },\n      \"oauth_client\": [],\n      \"api_key\": [\n        {\n          \"current_key\": \"0\"\n        }\n      ],\n      \"services\": {\n        \"appinvite_service\": {\n          \"other_platform_oauth_client\": []\n        }\n      }\n    },\n    {\n      \"client_info\": {\n        \"mobilesdk_app_id\": \"1:000000000000:android:0000000000000000\",\n        \"android_client_info\": {\n          \"package_name\": \"com.follow.clash.dev\"\n        }\n      },\n      \"oauth_client\": [],\n      \"api_key\": [\n        {\n          \"current_key\": \"0\"\n        }\n      ],\n      \"services\": {\n        \"appinvite_service\": {\n          \"other_platform_oauth_client\": []\n        }\n      }\n    }\n  ]\n}"
  },
  {
    "path": "android/app/proguard-rules.pro",
    "content": "\n-keep class com.follow.clash.models.**{ *; }\n\n-keep class com.follow.clash.service.models.**{ *; }"
  },
  {
    "path": "android/app/src/debug/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\">\n    <!-- The INTERNET permission is required for development. Specifically,\n         the Flutter tool needs it to communicate with the running application\n         to allow setting breakpoints, to provide hot reload, etc.\n    -->\n    <application\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"FlClash Debug\"\n        tools:replace=\"android:label\">\n        <service\n            android:name=\".TileService\"\n            android:label=\"FlClash Debug\"\n            tools:replace=\"android:label\" />\n    </application>\n</manifest>\n"
  },
  {
    "path": "android/app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\">\n\n    <uses-feature\n        android:name=\"android.hardware.touchscreen\"\n        android:required=\"false\" />\n    <uses-feature\n        android:name=\"android.hardware.camera\"\n        android:required=\"false\" />\n    <uses-feature\n        android:name=\"android.software.leanback\"\n        android:required=\"false\" />\n\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n    <uses-permission android:name=\"android.permission.FOREGROUND_SERVICE\" />\n    <uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\" />\n    <uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />\n    <uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\" />\n    <uses-permission\n        android:name=\"android.permission.QUERY_ALL_PACKAGES\"\n        tools:ignore=\"QueryAllPackagesPermission\" />\n    <uses-permission android:name=\"android.permission.FOREGROUND_SERVICE_SPECIAL_USE\" />\n    <uses-permission android:name=\"android.permission.POST_NOTIFICATIONS\" />\n\n    <application\n        android:name=\".Application\"\n        android:banner=\"@mipmap/ic_banner\"\n        android:hardwareAccelerated=\"true\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"FlClash\">\n        <activity\n            android:name=\".MainActivity\"\n            android:configChanges=\"orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode\"\n            android:exported=\"true\"\n            android:hardwareAccelerated=\"true\"\n            android:launchMode=\"singleTop\"\n            android:theme=\"@style/LaunchTheme\"\n            android:windowSoftInputMode=\"adjustResize\">\n            <meta-data\n                android:name=\"io.flutter.embedding.android.NormalTheme\"\n                android:resource=\"@style/NormalTheme\" />\n\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n                <category android:name=\"android.intent.category.LEANBACK_LAUNCHER\" />\n            </intent-filter>\n            <intent-filter>\n                <action android:name=\"android.service.quicksettings.action.QS_TILE_PREFERENCES\" />\n            </intent-filter>\n            <intent-filter>\n                <action android:name=\"android.intent.action.VIEW\" />\n\n                <category android:name=\"android.intent.category.DEFAULT\" />\n                <category android:name=\"android.intent.category.BROWSABLE\" />\n\n                <data android:scheme=\"clash\" />\n                <data android:scheme=\"clashmeta\" />\n                <data android:scheme=\"flclash\" />\n\n                <data android:host=\"install-config\" />\n            </intent-filter>\n        </activity>\n\n        <activity\n            android:name=\".TempActivity\"\n            android:excludeFromRecents=\"true\"\n            android:exported=\"true\"\n            android:theme=\"@style/TransparentTheme\">\n            <intent-filter>\n                <category android:name=\"android.intent.category.DEFAULT\" />\n                <action android:name=\"${applicationId}.action.START\" />\n            </intent-filter>\n            <intent-filter>\n                <category android:name=\"android.intent.category.DEFAULT\" />\n                <action android:name=\"${applicationId}.action.STOP\" />\n            </intent-filter>\n            <intent-filter>\n                <category android:name=\"android.intent.category.DEFAULT\" />\n                <action android:name=\"${applicationId}.action.TOGGLE\" />\n            </intent-filter>\n        </activity>\n\n        <service\n            android:name=\".TileService\"\n            android:exported=\"true\"\n            android:icon=\"@drawable/ic\"\n            android:label=\"FlClash\"\n            android:permission=\"android.permission.BIND_QUICK_SETTINGS_TILE\">\n            <intent-filter>\n                <action android:name=\"android.service.quicksettings.action.QS_TILE\" />\n            </intent-filter>\n            <meta-data\n                android:name=\"android.service.quicksettings.TOGGLEABLE_TILE\"\n                android:value=\"true\" />\n        </service>\n\n        <receiver\n            android:name=\".BroadcastReceiver\"\n            android:enabled=\"true\"\n            android:exported=\"true\"\n            android:permission=\"${applicationId}.permission.RECEIVE_BROADCASTS\">\n            <intent-filter>\n                <action android:name=\"${applicationId}.intent.action.SERVICE_CREATED\" />\n                <action android:name=\"${applicationId}.intent.action.SERVICE_DESTROYED\" />\n            </intent-filter>\n        </receiver>\n\n        <meta-data\n            android:name=\"flutterEmbedding\"\n            android:value=\"2\" />\n    </application>\n</manifest>"
  },
  {
    "path": "android/app/src/main/kotlin/com/follow/clash/Application.kt",
    "content": "package com.follow.clash\n\nimport android.app.Application\nimport android.content.Context\nimport com.follow.clash.common.GlobalState\n\nclass Application : Application() {\n\n    override fun attachBaseContext(base: Context?) {\n        super.attachBaseContext(base)\n        GlobalState.init(this)\n    }\n}\n"
  },
  {
    "path": "android/app/src/main/kotlin/com/follow/clash/BroadcastReceiver.kt",
    "content": "package com.follow.clash\n\nimport android.content.BroadcastReceiver\nimport android.content.Context\nimport android.content.Intent\nimport com.follow.clash.common.BroadcastAction\nimport com.follow.clash.common.GlobalState\nimport com.follow.clash.common.action\nimport kotlinx.coroutines.launch\n\nclass BroadcastReceiver : BroadcastReceiver() {\n    override fun onReceive(context: Context?, intent: Intent?) {\n        when (intent?.action) {\n            BroadcastAction.SERVICE_CREATED.action -> {\n                GlobalState.log(\"Receiver service created\")\n                GlobalState.launch {\n                    State.handleStartServiceAction()\n                }\n            }\n\n            BroadcastAction.SERVICE_DESTROYED.action -> {\n                GlobalState.log(\"Receiver service destroyed\")\n                GlobalState.launch {\n                    State.handleStopServiceAction()\n                }\n            }\n        }\n    }\n}"
  },
  {
    "path": "android/app/src/main/kotlin/com/follow/clash/Ext.kt",
    "content": "package com.follow.clash\n\nimport android.app.Application\nimport android.content.Context.MODE_PRIVATE\nimport android.content.pm.PackageManager\nimport android.graphics.Bitmap\nimport android.graphics.drawable.Drawable\nimport android.os.Build\nimport android.os.Handler\nimport android.os.Looper\nimport android.widget.Toast\nimport androidx.core.graphics.drawable.toBitmap\nimport com.follow.clash.common.GlobalState\nimport com.follow.clash.models.SharedState\nimport com.google.gson.Gson\nimport io.flutter.embedding.engine.FlutterEngine\nimport io.flutter.embedding.engine.plugins.FlutterPlugin\nimport io.flutter.plugin.common.MethodChannel\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.suspendCancellableCoroutine\nimport kotlinx.coroutines.withContext\nimport java.io.File\nimport java.io.FileOutputStream\nimport java.util.concurrent.TimeUnit\nimport kotlin.coroutines.resume\n\nprivate const val ICON_TTL_DAYS = 1L\n\nval Application.sharedState: SharedState\n    get() {\n        try {\n            val sp = getSharedPreferences(\"FlutterSharedPreferences\", MODE_PRIVATE)\n            val res = sp.getString(\"flutter.sharedState\", \"\")\n            return Gson().fromJson(res, SharedState::class.java)\n        } catch (_: Exception) {\n            return SharedState()\n        }\n    }\n\n\nprivate var lastToast: Toast? = null\n\nfun Application.showToast(text: String?) {\n    Handler(Looper.getMainLooper()).post {\n        lastToast?.cancel()\n        lastToast = Toast.makeText(this, text, Toast.LENGTH_LONG).apply {\n            show()\n        }\n    }\n\n}\n\nsuspend fun PackageManager.getPackageIconPath(packageName: String): String =\n    withContext(Dispatchers.IO) {\n        val cacheDir = GlobalState.application.cacheDir\n        val iconDir = File(cacheDir, \"icons\").apply { mkdirs() }\n        return@withContext try {\n            val pkgInfo = getPackageInfo(packageName, 0)\n            val lastUpdateTime = pkgInfo.lastUpdateTime\n            val iconFile = File(iconDir, \"${packageName}_${lastUpdateTime}.webp\")\n            if (iconFile.exists() && !isExpired(iconFile)) {\n                return@withContext iconFile.absolutePath\n            }\n            iconDir.listFiles { f -> f.name.startsWith(\"${packageName}_\") }?.forEach(File::delete)\n\n            val icon = getApplicationIcon(packageName)\n            saveDrawableToFile(icon, iconFile)\n            iconFile.absolutePath\n        } catch (_: Exception) {\n            val defaultIconFile = File(iconDir, \"default_icon.webp\")\n            if (!defaultIconFile.exists()) {\n                saveDrawableToFile(defaultActivityIcon, defaultIconFile)\n            }\n            defaultIconFile.absolutePath\n        }\n    }\n\nprivate suspend fun saveDrawableToFile(drawable: Drawable, file: File) {\n    val bitmap = withContext(Dispatchers.Default) {\n        drawable.toBitmap(width = 128, height = 128)\n    }\n    try {\n        val format = when {\n            Build.VERSION.SDK_INT >= Build.VERSION_CODES.R -> {\n                Bitmap.CompressFormat.WEBP_LOSSY\n            }\n\n            else -> {\n                Bitmap.CompressFormat.WEBP\n            }\n        }\n        FileOutputStream(file).use { fos ->\n            bitmap.compress(format, 90, fos)\n        }\n    } finally {\n        if (!bitmap.isRecycled) bitmap.recycle()\n    }\n}\n\nprivate fun isExpired(file: File): Boolean {\n    val now = System.currentTimeMillis()\n    val age = now - file.lastModified()\n    return age > TimeUnit.DAYS.toMillis(ICON_TTL_DAYS)\n}\n\nsuspend fun <T> MethodChannel.awaitResult(\n    method: String, arguments: Any? = null\n): T? = withContext(Dispatchers.Main) {\n    suspendCancellableCoroutine { continuation ->\n        invokeMethod(method, arguments, object : MethodChannel.Result {\n            override fun success(result: Any?) {\n                @Suppress(\"UNCHECKED_CAST\") continuation.resume(result as T?)\n            }\n\n            override fun error(code: String, message: String?, details: Any?) {\n                continuation.resume(null)\n            }\n\n            override fun notImplemented() {\n                continuation.resume(null)\n            }\n        })\n    }\n}\n\ninline fun <reified T : FlutterPlugin> FlutterEngine.plugin(): T? {\n    return plugins.get(T::class.java) as T?\n}\n\nfun <T> MethodChannel.invokeMethodOnMainThread(\n    method: String, arguments: Any? = null, callback: ((Result<T>) -> Unit)? = null\n) {\n    Handler(Looper.getMainLooper()).post {\n        invokeMethod(method, arguments, object : MethodChannel.Result {\n            override fun success(result: Any?) {\n                @Suppress(\"UNCHECKED_CAST\") callback?.invoke(Result.success(result as T))\n            }\n\n            override fun error(errorCode: String, errorMessage: String?, errorDetails: Any?) {\n                val exception = Exception(\"MethodChannel error: $errorCode - $errorMessage\")\n                callback?.invoke(Result.failure(exception))\n            }\n\n            override fun notImplemented() {\n                val exception = NotImplementedError(\"Method not implemented: $method\")\n                callback?.invoke(Result.failure(exception))\n            }\n        })\n    }\n}\n"
  },
  {
    "path": "android/app/src/main/kotlin/com/follow/clash/MainActivity.kt",
    "content": "package com.follow.clash\n\nimport android.os.Bundle\nimport com.follow.clash.common.GlobalState\nimport com.follow.clash.plugins.AppPlugin\nimport com.follow.clash.plugins.ServicePlugin\nimport com.follow.clash.plugins.TilePlugin\nimport io.flutter.embedding.android.FlutterActivity\nimport io.flutter.embedding.engine.FlutterEngine\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.SupervisorJob\nimport kotlinx.coroutines.launch\n\nclass MainActivity : FlutterActivity(),\n    CoroutineScope by CoroutineScope(SupervisorJob() + Dispatchers.Default) {\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n    }\n\n    override fun configureFlutterEngine(flutterEngine: FlutterEngine) {\n        super.configureFlutterEngine(flutterEngine)\n        flutterEngine.plugins.add(AppPlugin())\n        flutterEngine.plugins.add(ServicePlugin())\n        flutterEngine.plugins.add(TilePlugin())\n        State.flutterEngine = flutterEngine\n    }\n\n    override fun onDestroy() {\n        GlobalState.launch {\n            Service.setEventListener(null)\n        }\n        State.flutterEngine = null\n        super.onDestroy()\n    }\n}"
  },
  {
    "path": "android/app/src/main/kotlin/com/follow/clash/Service.kt",
    "content": "package com.follow.clash\n\nimport com.follow.clash.common.GlobalState\nimport com.follow.clash.common.ServiceDelegate\nimport com.follow.clash.common.formatString\nimport com.follow.clash.common.intent\nimport com.follow.clash.service.IAckInterface\nimport com.follow.clash.service.ICallbackInterface\nimport com.follow.clash.service.IEventInterface\nimport com.follow.clash.service.IRemoteInterface\nimport com.follow.clash.service.IResultInterface\nimport com.follow.clash.service.IVoidInterface\nimport com.follow.clash.service.RemoteService\nimport com.follow.clash.service.models.NotificationParams\nimport com.follow.clash.service.models.VpnOptions\nimport kotlinx.coroutines.suspendCancellableCoroutine\nimport kotlin.coroutines.resume\nimport kotlin.coroutines.resumeWithException\n\nobject Service {\n    private val delegate by lazy {\n        ServiceDelegate<IRemoteInterface>(\n            RemoteService::class.intent, ::handleServiceDisconnected\n        ) {\n            IRemoteInterface.Stub.asInterface(it)\n        }\n    }\n\n    var onServiceDisconnected: ((String) -> Unit)? = null\n\n    private fun handleServiceDisconnected(message: String) {\n        onServiceDisconnected?.let {\n            it(message)\n        }\n    }\n\n    fun bind() {\n        delegate.bind()\n    }\n\n    fun unbind() {\n        delegate.unbind()\n    }\n\n    suspend fun invokeAction(data: String, cb: ((result: String) -> Unit)?): Result<Unit> {\n        val res = mutableListOf<ByteArray>()\n        return delegate.useService {\n            it.invokeAction(\n                data, object : ICallbackInterface.Stub() {\n                    override fun onResult(\n                        result: ByteArray?, isSuccess: Boolean, ack: IAckInterface?\n                    ) {\n                        res.add(result ?: byteArrayOf())\n                        ack?.onAck()\n                        if (isSuccess) {\n                            cb?.let { cb ->\n                                cb(res.formatString())\n                            }\n                        }\n                    }\n                })\n        }\n    }\n\n    suspend fun quickSetup(\n        initParamsString: String,\n        setupParamsString: String,\n        onStarted: (() -> Unit)?,\n        onResult: ((result: String) -> Unit)?,\n    ): Result<Unit> {\n        val res = mutableListOf<ByteArray>()\n        return delegate.useService {\n            it.quickSetup(\n                initParamsString,\n                setupParamsString,\n                object : ICallbackInterface.Stub() {\n                    override fun onResult(\n                        result: ByteArray?, isSuccess: Boolean, ack: IAckInterface?\n                    ) {\n                        res.add(result ?: byteArrayOf())\n                        ack?.onAck()\n                        if (isSuccess) {\n                            onResult?.let { cb ->\n                                cb(res.formatString())\n                            }\n                        }\n                    }\n                },\n                object : IVoidInterface.Stub() {\n                    override fun invoke() {\n                        onStarted?.let { onStarted ->\n                            onStarted()\n                        }\n                    }\n                }\n            )\n        }\n    }\n\n    suspend fun setEventListener(\n        cb: ((result: String?) -> Unit)?\n    ): Result<Unit> {\n        val results = HashMap<String, MutableList<ByteArray>>()\n        return delegate.useService {\n            it.setEventListener(\n                when (cb != null) {\n                    true -> object : IEventInterface.Stub() {\n                        override fun onEvent(\n                            id: String, data: ByteArray?, isSuccess: Boolean, ack: IAckInterface?\n                        ) {\n                            if (results[id] == null) {\n                                results[id] = mutableListOf()\n                            }\n                            results[id]?.add(data ?: byteArrayOf())\n                            ack?.onAck()\n                            if (isSuccess) {\n                                cb(results[id]?.formatString())\n                                results.remove(id)\n                            }\n                        }\n                    }\n\n                    false -> null\n                })\n        }\n    }\n\n    suspend fun updateNotificationParams(\n        params: NotificationParams\n    ): Result<Unit> {\n        return delegate.useService {\n            it.updateNotificationParams(params)\n        }\n    }\n\n    suspend fun setCrashlytics(\n        enable: Boolean\n    ): Result<Unit> {\n        return delegate.useService {\n            it.setCrashlytics(enable)\n        }\n    }\n\n    private suspend fun awaitIResultInterface(\n        block: (IResultInterface) -> Unit\n    ): Long = suspendCancellableCoroutine { continuation ->\n        val callback = object : IResultInterface.Stub() {\n            override fun onResult(time: Long) {\n                if (continuation.isActive) {\n                    continuation.resume(time)\n                }\n            }\n        }\n\n        try {\n            block(callback)\n        } catch (e: Exception) {\n            GlobalState.log(\"awaitIResultInterface $e\")\n            if (continuation.isActive) {\n                continuation.resumeWithException(e)\n            }\n        }\n    }\n\n\n    suspend fun startService(options: VpnOptions, runTime: Long): Long {\n        return delegate.useService {\n            awaitIResultInterface { callback ->\n                it.startService(options, runTime, callback)\n            }\n        }.getOrNull() ?: 0L\n    }\n\n    suspend fun stopService(): Long {\n        return delegate.useService {\n            awaitIResultInterface { callback ->\n                it.stopService(callback)\n            }\n        }.getOrNull() ?: 0L\n    }\n\n    suspend fun getRunTime(): Long {\n        return delegate.useService {\n            it.runTime\n        }.getOrNull() ?: 0L\n    }\n}"
  },
  {
    "path": "android/app/src/main/kotlin/com/follow/clash/State.kt",
    "content": "package com.follow.clash\n\nimport android.net.VpnService\nimport com.follow.clash.common.GlobalState\nimport com.follow.clash.models.SharedState\nimport com.follow.clash.plugins.AppPlugin\nimport com.follow.clash.plugins.TilePlugin\nimport com.follow.clash.service.models.NotificationParams\nimport com.google.gson.Gson\nimport io.flutter.embedding.engine.FlutterEngine\nimport kotlinx.coroutines.flow.MutableStateFlow\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.sync.Mutex\nimport kotlinx.coroutines.sync.withLock\n\nenum class RunState {\n    START, PENDING, STOP\n}\n\n\nobject State {\n\n    val runLock = Mutex()\n\n    var runTime: Long = 0\n\n    var sharedState: SharedState = SharedState()\n\n    val runStateFlow: MutableStateFlow<RunState> = MutableStateFlow(RunState.STOP)\n\n    var flutterEngine: FlutterEngine? = null\n\n    val appPlugin: AppPlugin?\n        get() = flutterEngine?.plugin<AppPlugin>()\n\n    val tilePlugin: TilePlugin?\n        get() = flutterEngine?.plugin<TilePlugin>()\n\n    suspend fun handleToggleAction() {\n        var action: (suspend () -> Unit)?\n        runLock.withLock {\n            action = when (runStateFlow.value) {\n                RunState.PENDING -> null\n                RunState.START -> ::handleStopServiceAction\n                RunState.STOP -> ::handleStartServiceAction\n            }\n        }\n        action?.invoke()\n    }\n\n    suspend fun handleSyncState() {\n        runLock.withLock {\n            try {\n                Service.bind()\n                runTime = Service.getRunTime()\n                val runState = when (runTime == 0L) {\n                    true -> RunState.STOP\n                    false -> RunState.START\n                }\n                runStateFlow.tryEmit(runState)\n            } catch (_: Exception) {\n                runStateFlow.tryEmit(RunState.STOP)\n            }\n        }\n    }\n\n    suspend fun handleStartServiceAction() {\n        runLock.withLock {\n            if (runStateFlow.value != RunState.STOP) {\n                return\n            }\n            tilePlugin?.handleStart()\n            if (flutterEngine != null) {\n                return\n            }\n            startServiceWithPref()\n        }\n\n    }\n\n    suspend fun handleStopServiceAction() {\n        runLock.withLock {\n            if (runStateFlow.value != RunState.START) {\n                return\n            }\n            tilePlugin?.handleStop()\n            if (flutterEngine != null) {\n                return\n            }\n            GlobalState.application.showToast(sharedState.stopTip)\n            handleStopService()\n        }\n    }\n\n    fun handleStartService() {\n        val appPlugin = flutterEngine?.plugin<AppPlugin>()\n        if (appPlugin != null) {\n            appPlugin.requestNotificationsPermission {\n                startService()\n            }\n            return\n        }\n        startService()\n    }\n\n    private fun startServiceWithPref() {\n        GlobalState.launch {\n            runLock.withLock {\n                if (runStateFlow.value != RunState.STOP) {\n                    return@launch\n                }\n                sharedState = GlobalState.application.sharedState\n                setupAndStart()\n            }\n        }\n    }\n\n    suspend fun syncState() {\n        GlobalState.setCrashlytics(sharedState.crashlytics)\n        Service.updateNotificationParams(\n            NotificationParams(\n                title = sharedState.currentProfileName,\n                stopText = sharedState.stopText,\n                onlyStatisticsProxy = sharedState.onlyStatisticsProxy\n            )\n        )\n        Service.setCrashlytics(sharedState.crashlytics)\n    }\n\n    private suspend fun setupAndStart() {\n        Service.bind()\n        syncState()\n        GlobalState.application.showToast(sharedState.startTip)\n        val initParams = mutableMapOf<String, Any>()\n        initParams[\"home-dir\"] = GlobalState.application.filesDir.path\n        initParams[\"version\"] = android.os.Build.VERSION.SDK_INT\n        val initParamsString = Gson().toJson(initParams)\n        val setupParamsString = Gson().toJson(sharedState.setupParams)\n        Service.quickSetup(\n            initParamsString,\n            setupParamsString,\n            onStarted = {\n                startService()\n            },\n            onResult = {\n                if (it.isNotEmpty()) {\n                    GlobalState.application.showToast(it)\n                }\n            },\n        )\n    }\n\n    private fun startService() {\n        GlobalState.launch {\n            runLock.withLock {\n                if (runStateFlow.value != RunState.STOP) {\n                    return@launch\n                }\n                try {\n                    runStateFlow.tryEmit(RunState.PENDING)\n                    val options = sharedState.vpnOptions ?: return@launch\n                    appPlugin?.let {\n                        it.prepare(options.enable) {\n                            runTime = Service.startService(options, runTime)\n                            runStateFlow.tryEmit(RunState.START)\n                        }\n                    } ?: run {\n                        val intent = VpnService.prepare(GlobalState.application)\n                        if (intent != null) {\n                            return@launch\n                        }\n                        runTime = Service.startService(options, runTime)\n                        runStateFlow.tryEmit(RunState.START)\n                    }\n                } finally {\n                    if (runStateFlow.value == RunState.PENDING) {\n                        runStateFlow.tryEmit(RunState.STOP)\n                    }\n                }\n            }\n        }\n    }\n\n    fun handleStopService() {\n        GlobalState.launch {\n            runLock.withLock {\n                if (runStateFlow.value != RunState.START) {\n                    return@launch\n                }\n                try {\n                    runStateFlow.tryEmit(RunState.PENDING)\n                    runTime = Service.stopService()\n                    runStateFlow.tryEmit(RunState.STOP)\n                } finally {\n                    if (runStateFlow.value == RunState.PENDING) {\n                        runStateFlow.tryEmit(RunState.START)\n                    }\n                }\n            }\n        }\n    }\n}\n\n\n\n"
  },
  {
    "path": "android/app/src/main/kotlin/com/follow/clash/TempActivity.kt",
    "content": "package com.follow.clash\n\nimport android.app.Activity\nimport android.os.Bundle\nimport com.follow.clash.common.QuickAction\nimport com.follow.clash.common.action\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.SupervisorJob\nimport kotlinx.coroutines.launch\n\nclass TempActivity : Activity(),\n    CoroutineScope by CoroutineScope(SupervisorJob() + Dispatchers.Default) {\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        when (intent.action) {\n            QuickAction.START.action -> {\n                launch {\n                    State.handleStartServiceAction()\n                }\n            }\n\n            QuickAction.STOP.action -> {\n                launch {\n                    State.handleStopServiceAction()\n                }\n            }\n\n            QuickAction.TOGGLE.action -> {\n                launch {\n                    State.handleToggleAction()\n                }\n            }\n        }\n        finish()\n    }\n}"
  },
  {
    "path": "android/app/src/main/kotlin/com/follow/clash/TileService.kt",
    "content": "package com.follow.clash\n\nimport android.annotation.SuppressLint\nimport android.os.Build\nimport android.service.quicksettings.Tile\nimport android.service.quicksettings.TileService\nimport com.follow.clash.common.QuickAction\nimport com.follow.clash.common.quickIntent\nimport com.follow.clash.common.toPendingIntent\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.SupervisorJob\nimport kotlinx.coroutines.cancel\nimport kotlinx.coroutines.launch\n\nclass TileService : TileService() {\n    private var scope: CoroutineScope? = null\n    private fun updateTile(runState: RunState) {\n        if (qsTile != null) {\n            qsTile.state = when (runState) {\n                RunState.START -> Tile.STATE_ACTIVE\n                RunState.PENDING -> Tile.STATE_UNAVAILABLE\n                RunState.STOP -> Tile.STATE_INACTIVE\n            }\n            qsTile.updateTile()\n        }\n    }\n\n    override fun onStartListening() {\n        super.onStartListening()\n        scope?.cancel()\n        scope = CoroutineScope(SupervisorJob() + Dispatchers.Default)\n        scope?.launch {\n            State.handleSyncState()\n            State.runStateFlow.collect {\n                updateTile(it)\n            }\n        }\n    }\n\n    @SuppressLint(\"StartActivityAndCollapseDeprecated\")\n    private fun handleToggle() {\n        val intent = QuickAction.TOGGLE.quickIntent\n        val pendingIntent = intent.toPendingIntent\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {\n            startActivityAndCollapse(pendingIntent)\n        } else {\n            @Suppress(\"DEPRECATION\") startActivityAndCollapse(intent)\n        }\n    }\n\n    override fun onClick() {\n        super.onClick()\n        handleToggle()\n    }\n\n    override fun onStopListening() {\n        scope?.cancel()\n        super.onStopListening()\n    }\n}"
  },
  {
    "path": "android/app/src/main/kotlin/com/follow/clash/models/Package.kt",
    "content": "package com.follow.clash.models\n\ndata class Package(\n    val packageName: String,\n    val label: String,\n    val system: Boolean,\n    val internet: Boolean,\n    val lastUpdateTime: Long,\n)\n"
  },
  {
    "path": "android/app/src/main/kotlin/com/follow/clash/models/State.kt",
    "content": "package com.follow.clash.models\n\nimport com.follow.clash.service.models.VpnOptions\nimport com.google.gson.annotations.SerializedName\n\ndata class SharedState(\n    val startTip: String = \"Starting VPN...\",\n    val stopTip: String = \"Stopping VPN...\",\n    val crashlytics: Boolean = true,\n    val currentProfileName: String = \"FlClash\",\n    val stopText: String = \"Stop\",\n    val onlyStatisticsProxy: Boolean = false,\n    val vpnOptions: VpnOptions? = null,\n    val setupParams: SetupParams? = null,\n)\n\ndata class SetupParams(\n    @SerializedName(\"test-url\")\n    val testUrl: String,\n    @SerializedName(\"selected-map\")\n    val selectedMap: Map<String, String>,\n)\n"
  },
  {
    "path": "android/app/src/main/kotlin/com/follow/clash/plugins/AppPlugin.kt",
    "content": "package com.follow.clash.plugins\n\nimport android.Manifest\nimport android.app.Activity\nimport android.app.ActivityManager\nimport android.content.Intent\nimport android.content.pm.ApplicationInfo\nimport android.content.pm.ComponentInfo\nimport android.content.pm.PackageManager\nimport android.net.VpnService\nimport android.os.Build\nimport androidx.core.app.ActivityCompat\nimport androidx.core.content.ContextCompat\nimport androidx.core.content.ContextCompat.getSystemService\nimport androidx.core.content.pm.ShortcutInfoCompat\nimport androidx.core.content.pm.ShortcutManagerCompat\nimport androidx.core.graphics.drawable.IconCompat\nimport com.android.tools.smali.dexlib2.dexbacked.DexBackedDexFile\nimport com.follow.clash.R\nimport com.follow.clash.common.Components\nimport com.follow.clash.common.GlobalState\nimport com.follow.clash.common.QuickAction\nimport com.follow.clash.common.quickIntent\nimport com.follow.clash.getPackageIconPath\nimport com.follow.clash.models.Package\nimport com.follow.clash.showToast\nimport com.google.gson.Gson\nimport io.flutter.embedding.android.FlutterActivity\nimport io.flutter.embedding.engine.plugins.FlutterPlugin\nimport io.flutter.embedding.engine.plugins.activity.ActivityAware\nimport io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding\nimport io.flutter.plugin.common.MethodCall\nimport io.flutter.plugin.common.MethodChannel\nimport io.flutter.plugin.common.MethodChannel.Result\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.cancel\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.withContext\nimport java.io.File\nimport java.lang.ref.WeakReference\nimport java.util.zip.ZipFile\n\nclass AppPlugin : FlutterPlugin, MethodChannel.MethodCallHandler, ActivityAware {\n\n    companion object {\n        const val VPN_PERMISSION_REQUEST_CODE = 1001\n        const val NOTIFICATION_PERMISSION_REQUEST_CODE = 1002\n    }\n\n    private var activityRef: WeakReference<Activity>? = null\n\n    private lateinit var channel: MethodChannel\n\n    private lateinit var scope: CoroutineScope\n\n    private var vpnPrepareCallback: (suspend () -> Unit)? = null\n\n    private var requestNotificationCallback: (() -> Unit)? = null\n\n    private val packages = mutableListOf<Package>()\n\n    private val skipPrefixList = listOf(\n        \"com.google\",\n        \"com.android.chrome\",\n        \"com.android.vending\",\n        \"com.microsoft\",\n        \"com.apple\",\n        \"com.zhiliaoapp.musically\", // Banned by China\n    )\n\n    private val chinaAppPrefixList = listOf(\n        \"com.tencent\",\n        \"com.alibaba\",\n        \"com.umeng\",\n        \"com.qihoo\",\n        \"com.ali\",\n        \"com.alipay\",\n        \"com.amap\",\n        \"com.sina\",\n        \"com.weibo\",\n        \"com.vivo\",\n        \"com.xiaomi\",\n        \"com.huawei\",\n        \"com.taobao\",\n        \"com.secneo\",\n        \"s.h.e.l.l\",\n        \"com.stub\",\n        \"com.kiwisec\",\n        \"com.secshell\",\n        \"com.wrapper\",\n        \"cn.securitystack\",\n        \"com.mogosec\",\n        \"com.secoen\",\n        \"com.netease\",\n        \"com.mx\",\n        \"com.qq.e\",\n        \"com.baidu\",\n        \"com.bytedance\",\n        \"com.bugly\",\n        \"com.miui\",\n        \"com.oppo\",\n        \"com.coloros\",\n        \"com.iqoo\",\n        \"com.meizu\",\n        \"com.gionee\",\n        \"cn.nubia\",\n        \"com.oplus\",\n        \"andes.oplus\",\n        \"com.unionpay\",\n        \"cn.wps\"\n    )\n\n    private val chinaAppRegex by lazy {\n        (\"(\" + chinaAppPrefixList.joinToString(\"|\").replace(\".\", \"\\\\.\") + \").*\").toRegex()\n    }\n\n    private var isBlockNotification: Boolean = false\n\n    override fun onMethodCall(call: MethodCall, result: Result) {\n        when (call.method) {\n            \"moveTaskToBack\" -> {\n                activityRef?.get()?.moveTaskToBack(true)\n                result.success(true)\n            }\n\n            \"updateExcludeFromRecents\" -> {\n                val value = call.argument<Boolean>(\"value\")\n                updateExcludeFromRecents(value)\n                result.success(true)\n            }\n\n            \"initShortcuts\" -> {\n                initShortcuts(call.arguments as String)\n                result.success(true)\n            }\n\n            \"getPackages\" -> {\n                scope.launch {\n                    result.success(getPackagesToJson())\n                }\n            }\n\n            \"getChinaPackageNames\" -> {\n                scope.launch {\n                    result.success(getChinaPackageNames())\n                }\n            }\n\n            \"getPackageIcon\" -> {\n                handleGetPackageIcon(call, result)\n            }\n\n            \"tip\" -> {\n                val message = call.argument<String>(\"message\")\n                tip(message)\n                result.success(true)\n            }\n\n            else -> {\n                result.notImplemented()\n            }\n        }\n    }\n\n    private fun handleGetPackageIcon(call: MethodCall, result: Result) {\n        scope.launch {\n            val packageName = call.argument<String>(\"packageName\")\n            if (packageName == null) {\n                result.success(\"\")\n                return@launch\n            }\n            val path = GlobalState.application.packageManager.getPackageIconPath(packageName)\n            result.success(path)\n        }\n    }\n\n    private fun initShortcuts(label: String) {\n        val shortcut = with(ShortcutInfoCompat.Builder(GlobalState.application, \"toggle\")) {\n            setShortLabel(label)\n            setIcon(\n                IconCompat.createWithResource(\n                    GlobalState.application,\n                    R.mipmap.ic_launcher_round,\n                )\n            )\n            setIntent(QuickAction.TOGGLE.quickIntent)\n            build()\n        }\n        ShortcutManagerCompat.setDynamicShortcuts(\n            GlobalState.application, listOf(shortcut)\n        )\n    }\n\n    private fun tip(message: String?) {\n        GlobalState.application.showToast(message)\n    }\n\n    @Suppress(\"DEPRECATION\")\n    private fun updateExcludeFromRecents(value: Boolean?) {\n        val am = getSystemService(GlobalState.application, ActivityManager::class.java)\n        val task = am?.appTasks?.firstOrNull {\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {\n                it.taskInfo.taskId == activityRef?.get()?.taskId\n            } else {\n                it.taskInfo.id == activityRef?.get()?.taskId\n            }\n        }\n\n        when (value) {\n            true -> task?.setExcludeFromRecents(value)\n            false -> task?.setExcludeFromRecents(value)\n            null -> task?.setExcludeFromRecents(false)\n        }\n    }\n\n\n    private fun getPackages(): List<Package> {\n        val packageManager = GlobalState.application.packageManager\n        if (packages.isNotEmpty()) return packages\n        packageManager?.getInstalledPackages(PackageManager.GET_META_DATA or PackageManager.GET_PERMISSIONS)\n            ?.filter {\n                it.packageName != GlobalState.application.packageName && it.packageName != \"android\"\n            }?.map {\n                Package(\n                    packageName = it.packageName,\n                    label = it.applicationInfo?.loadLabel(packageManager).toString(),\n                    system = (it.applicationInfo?.flags?.and(ApplicationInfo.FLAG_SYSTEM)) != 0,\n                    lastUpdateTime = it.lastUpdateTime,\n                    internet = it.requestedPermissions?.contains(Manifest.permission.INTERNET) == true\n                )\n            }?.let { packages.addAll(it) }\n        return packages\n    }\n\n    private suspend fun getPackagesToJson(): String {\n        return withContext(Dispatchers.Default) {\n            Gson().toJson(getPackages())\n        }\n    }\n\n    private suspend fun getChinaPackageNames(): String {\n        return withContext(Dispatchers.Default) {\n            val packages: List<String> =\n                getPackages().map { it.packageName }.filter { isChinaPackage(it) }\n            Gson().toJson(packages)\n        }\n    }\n\n    fun requestNotificationsPermission(callBack: () -> Unit) {\n        requestNotificationCallback = callBack\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {\n            val permission = ContextCompat.checkSelfPermission(\n                GlobalState.application, Manifest.permission.POST_NOTIFICATIONS\n            )\n            if (permission == PackageManager.PERMISSION_GRANTED || isBlockNotification) {\n                invokeRequestNotificationCallback()\n                return\n            }\n            activityRef?.get()?.let {\n                ActivityCompat.requestPermissions(\n                    it,\n                    arrayOf(Manifest.permission.POST_NOTIFICATIONS),\n                    NOTIFICATION_PERMISSION_REQUEST_CODE\n                )\n            }\n            return\n        } else {\n            invokeRequestNotificationCallback()\n        }\n\n    }\n\n    fun invokeRequestNotificationCallback() {\n        requestNotificationCallback?.invoke()\n        requestNotificationCallback = null\n    }\n\n    fun prepare(needPrepare: Boolean, callBack: (suspend () -> Unit)) {\n        vpnPrepareCallback = callBack\n        if (!needPrepare) {\n            invokeVpnPrepareCallback()\n            return\n        }\n        val intent = VpnService.prepare(GlobalState.application)\n        if (intent != null) {\n            activityRef?.get()?.startActivityForResult(intent, VPN_PERMISSION_REQUEST_CODE)\n            return\n        }\n        invokeVpnPrepareCallback()\n    }\n\n    fun invokeVpnPrepareCallback() {\n        GlobalState.launch {\n            vpnPrepareCallback?.invoke()\n            vpnPrepareCallback = null\n        }\n    }\n\n\n    @Suppress(\"DEPRECATION\")\n    private fun isChinaPackage(packageName: String): Boolean {\n        val packageManager = GlobalState.application.packageManager ?: return false\n        skipPrefixList.forEach {\n            if (packageName == it || packageName.startsWith(\"$it.\")) return false\n        }\n        val packageManagerFlags = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n            PackageManager.MATCH_UNINSTALLED_PACKAGES or PackageManager.GET_ACTIVITIES or PackageManager.GET_SERVICES or PackageManager.GET_RECEIVERS or PackageManager.GET_PROVIDERS\n        } else {\n            PackageManager.GET_UNINSTALLED_PACKAGES or PackageManager.GET_ACTIVITIES or PackageManager.GET_SERVICES or PackageManager.GET_RECEIVERS or PackageManager.GET_PROVIDERS\n        }\n        if (packageName.matches(chinaAppRegex)) {\n            return true\n        }\n        try {\n            val packageInfo = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {\n                packageManager.getPackageInfo(\n                    packageName, PackageManager.PackageInfoFlags.of(packageManagerFlags.toLong())\n                )\n            } else {\n                packageManager.getPackageInfo(\n                    packageName, packageManagerFlags\n                )\n            }\n            mutableListOf<ComponentInfo>().apply {\n                packageInfo.services?.let { addAll(it) }\n                packageInfo.activities?.let { addAll(it) }\n                packageInfo.receivers?.let { addAll(it) }\n                packageInfo.providers?.let { addAll(it) }\n            }.forEach {\n                if (it.name.matches(chinaAppRegex)) return true\n            }\n            packageInfo.applicationInfo?.publicSourceDir?.let {\n                ZipFile(File(it)).use {\n                    for (packageEntry in it.entries()) {\n                        if (packageEntry.name.startsWith(\"firebase-\")) return false\n                    }\n                    for (packageEntry in it.entries()) {\n                        if (!(packageEntry.name.startsWith(\"classes\") && packageEntry.name.endsWith(\n                                \".dex\"\n                            ))\n                        ) {\n                            continue\n                        }\n                        if (packageEntry.size > 15000000) {\n                            return true\n                        }\n                        val input = it.getInputStream(packageEntry).buffered()\n                        val dexFile = try {\n                            DexBackedDexFile.fromInputStream(null, input)\n                        } catch (e: Exception) {\n                            return false\n                        }\n                        for (clazz in dexFile.classes) {\n                            val clazzName =\n                                clazz.type.substring(1, clazz.type.length - 1).replace(\"/\", \".\")\n                                    .replace(\"$\", \".\")\n                            if (clazzName.matches(chinaAppRegex)) return true\n                        }\n                    }\n                }\n            }\n        } catch (_: Exception) {\n            return false\n        }\n        return false\n    }\n\n    override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {\n        scope = CoroutineScope(Dispatchers.Default)\n        channel =\n            MethodChannel(flutterPluginBinding.binaryMessenger, \"${Components.PACKAGE_NAME}/app\")\n        channel.setMethodCallHandler(this)\n    }\n\n    override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {\n        channel.setMethodCallHandler(null)\n        scope.cancel()\n    }\n\n    override fun onAttachedToActivity(binding: ActivityPluginBinding) {\n        activityRef = WeakReference(binding.activity)\n        binding.addActivityResultListener(::onActivityResult)\n        binding.addRequestPermissionsResultListener(::onRequestPermissionsResultListener)\n    }\n\n    override fun onDetachedFromActivityForConfigChanges() {\n        activityRef = null\n    }\n\n    override fun onReattachedToActivityForConfigChanges(binding: ActivityPluginBinding) {\n        activityRef = WeakReference(binding.activity)\n    }\n\n    override fun onDetachedFromActivity() {\n        channel.invokeMethod(\"exit\", null)\n        activityRef = null\n    }\n\n    private fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?): Boolean {\n        if (requestCode == VPN_PERMISSION_REQUEST_CODE) {\n            if (resultCode == FlutterActivity.RESULT_OK) {\n                invokeVpnPrepareCallback()\n            }\n        }\n        return true\n    }\n\n    private fun onRequestPermissionsResultListener(\n        requestCode: Int, permissions: Array<String>, grantResults: IntArray\n    ): Boolean {\n        if (requestCode == NOTIFICATION_PERMISSION_REQUEST_CODE) {\n            isBlockNotification = true\n        }\n        invokeRequestNotificationCallback()\n        return true\n    }\n}\n"
  },
  {
    "path": "android/app/src/main/kotlin/com/follow/clash/plugins/ServicePlugin.kt",
    "content": "package com.follow.clash.plugins\n\nimport com.follow.clash.RunState\nimport com.follow.clash.Service\nimport com.follow.clash.State\nimport com.follow.clash.common.Components\nimport com.follow.clash.invokeMethodOnMainThread\nimport com.follow.clash.models.SharedState\nimport com.google.gson.Gson\nimport io.flutter.embedding.engine.plugins.FlutterPlugin\nimport io.flutter.plugin.common.MethodCall\nimport io.flutter.plugin.common.MethodChannel\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.SupervisorJob\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.sync.Semaphore\nimport kotlinx.coroutines.sync.withPermit\n\nclass ServicePlugin : FlutterPlugin, MethodChannel.MethodCallHandler,\n    CoroutineScope by CoroutineScope(SupervisorJob() + Dispatchers.Default) {\n    private lateinit var flutterMethodChannel: MethodChannel\n\n    override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {\n        flutterMethodChannel = MethodChannel(\n            flutterPluginBinding.binaryMessenger, \"${Components.PACKAGE_NAME}/service\"\n        )\n        flutterMethodChannel.setMethodCallHandler(this)\n    }\n\n    override fun onDetachedFromEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {\n        flutterMethodChannel.setMethodCallHandler(null)\n    }\n\n    override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) = when (call.method) {\n        \"init\" -> {\n            handleInit(result)\n        }\n\n        \"shutdown\" -> {\n            handleShutdown(result)\n        }\n\n        \"invokeAction\" -> {\n            handleInvokeAction(call, result)\n        }\n\n        \"getRunTime\" -> {\n            handleGetRunTime(result)\n        }\n\n        \"syncState\" -> {\n            handleSyncState(call, result)\n        }\n\n        \"start\" -> {\n            handleStart(result)\n        }\n\n        \"stop\" -> {\n            handleStop(result)\n        }\n\n        else -> {\n            result.notImplemented()\n        }\n    }\n\n    private fun handleInvokeAction(call: MethodCall, result: MethodChannel.Result) {\n        launch {\n            val data = call.arguments<String>()!!\n            Service.invokeAction(data) {\n                result.success(it)\n            }\n        }\n    }\n\n    private fun handleShutdown(result: MethodChannel.Result) {\n        Service.unbind()\n        result.success(true)\n    }\n\n    private fun handleStart(result: MethodChannel.Result) {\n        State.handleStartService()\n        result.success(true)\n    }\n\n    private fun handleStop(result: MethodChannel.Result) {\n        State.handleStopService()\n        result.success(true)\n    }\n\n    val semaphore = Semaphore(10)\n\n    fun handleSendEvent(value: String?) {\n        launch(Dispatchers.Main) {\n            semaphore.withPermit {\n                flutterMethodChannel.invokeMethod(\"event\", value)\n            }\n        }\n    }\n\n    private fun onServiceDisconnected(message: String) {\n        State.runStateFlow.tryEmit(RunState.STOP)\n        flutterMethodChannel.invokeMethodOnMainThread<Any>(\"crash\", message)\n    }\n\n    private fun handleSyncState(call: MethodCall, result: MethodChannel.Result) {\n        val data = call.arguments<String>()!!\n        State.sharedState = Gson().fromJson(data, SharedState::class.java)\n        launch {\n            State.syncState()\n            result.success(\"\")\n        }\n    }\n\n\n    fun handleInit(result: MethodChannel.Result) {\n        Service.bind()\n        launch {\n            Service.setEventListener {\n                handleSendEvent(it)\n            }.onSuccess {\n                result.success(\"\")\n            }.onFailure {\n                result.success(it.message)\n            }\n\n        }\n        Service.onServiceDisconnected = ::onServiceDisconnected\n    }\n\n    private fun handleGetRunTime(result: MethodChannel.Result) {\n        launch {\n            State.handleSyncState()\n            result.success(State.runTime)\n        }\n    }\n}"
  },
  {
    "path": "android/app/src/main/kotlin/com/follow/clash/plugins/TilePlugin.kt",
    "content": "package com.follow.clash.plugins\n\nimport com.follow.clash.common.Components\nimport com.follow.clash.invokeMethodOnMainThread\nimport io.flutter.embedding.engine.plugins.FlutterPlugin\nimport io.flutter.plugin.common.MethodCall\nimport io.flutter.plugin.common.MethodChannel\n\nclass TilePlugin : FlutterPlugin, MethodChannel.MethodCallHandler {\n\n    private lateinit var channel: MethodChannel\n\n    override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {\n        channel =\n            MethodChannel(flutterPluginBinding.binaryMessenger, \"${Components.PACKAGE_NAME}/tile\")\n        channel.setMethodCallHandler(this)\n    }\n\n    override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {\n        channel.setMethodCallHandler(null)\n    }\n\n    fun handleStart() {\n        channel.invokeMethodOnMainThread<Any>(\"start\", null)\n    }\n\n    fun handleStop() {\n        channel.invokeMethodOnMainThread<Any>(\"stop\", null)\n    }\n\n\n    override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {}\n}"
  },
  {
    "path": "android/app/src/main/res/drawable/ic_launcher_foreground.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"108dp\"\n        android:height=\"108dp\"\n        android:viewportWidth=\"240\"\n        android:viewportHeight=\"240\">\n    <group android:scaleX=\"0.924\"\n           android:scaleY=\"0.924\"\n           android:translateX=\"9.12\"\n           android:translateY=\"9.12\">\n        <group android:scaleX=\"0.63461536\"\n               android:scaleY=\"0.63461536\"\n               android:translateX=\"45.96154\"\n               android:translateY=\"43.846153\">\n            <path\n                    android:pathData=\"M60.65,89.6L154.18,35.6A18,18 107.59,0 1,178.77 42.19L178.77,42.19A18,18 107.59,0 1,172.18 66.78L78.65,120.78A18,18 106.67,0 1,54.06 114.19L54.06,114.19A18,18 106.67,0 1,60.65 89.6z\"\n                    android:fillColor=\"#6666FB\"/>\n            <path\n                    android:pathData=\"M84.65,131.17L131.42,104.17A18,18 107.83,0 1,156 110.76L156,110.76A18,18 107.83,0 1,149.42 135.35L102.65,162.35A18,18 106.67,0 1,78.06 155.76L78.06,155.76A18,18 106.67,0 1,84.65 131.17z\"\n                    android:fillColor=\"#336AB6\"/>\n            <path\n                    android:pathData=\"M108.65,172.74L108.65,172.74A18,18 116.03,0 1,133.24 179.33L133.24,179.33A18,18 116.03,0 1,126.65 203.92L126.65,203.92A18,18 116.03,0 1,102.06 197.33L102.06,197.33A18,18 116.03,0 1,108.65 172.74z\"\n                    android:fillColor=\"#5CA8E9\"/>\n        </group>\n    </group>\n</vector>\n"
  },
  {
    "path": "android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@color/ic_launcher_background\"/>\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\"/>\n    <monochrome android:drawable=\"@drawable/ic_launcher_foreground\" />\n</adaptive-icon>"
  },
  {
    "path": "android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@color/ic_launcher_background\"/>\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\"/>\n    <monochrome android:drawable=\"@drawable/ic_launcher_foreground\" />\n</adaptive-icon>"
  },
  {
    "path": "android/app/src/main/res/values/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"ic_launcher_background\">#FAFAFA</color>\n</resources>"
  },
  {
    "path": "android/app/src/main/res/values/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->\n    <style name=\"LaunchTheme\" parent=\"@android:style/Theme.Light.NoTitleBar\">\n        <!-- Show a splash screen on the activity. Automatically removed when\n             the Flutter engine draws its first frame -->\n    </style>\n    <!-- Theme applied to the Android Window as soon as the process has started.\n         This theme determines the color of the Android Window while your\n         Flutter UI initializes, as well as behind your Flutter UI while its\n         running.\n\n         This Theme is only used starting with V2 of Flutter's Android embedding. -->\n    <style name=\"NormalTheme\" parent=\"@android:style/Theme.Light.NoTitleBar\">\n        <item name=\"android:windowBackground\">?android:colorBackground</item>\n    </style>\n    <style name=\"TransparentTheme\" parent=\"Theme.AppCompat.NoActionBar\">\n        <item name=\"android:windowBackground\">@android:color/transparent</item>\n        <item name=\"android:windowNoTitle\">true</item>\n        <item name=\"android:windowIsTranslucent\">true</item>\n    </style>\n</resources>\n"
  },
  {
    "path": "android/app/src/main/res/values-night/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources xmlns:tools=\"http://schemas.android.com/tools\">\n    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->\n    <style name=\"LaunchTheme\" parent=\"@android:style/Theme.Black.NoTitleBar\">\n        <!-- Show a splash screen on the activity. Automatically removed when\n             the Flutter engine draws its first frame -->\n    </style>\n    <!-- Theme applied to the Android Window as soon as the process has started.\n         This theme determines the color of the Android Window while your\n         Flutter UI initializes, as well as behind your Flutter UI while its\n         running.\n\n         This Theme is only used starting with V2 of Flutter's Android embedding. -->\n    <style name=\"NormalTheme\" parent=\"@android:style/Theme.Black.NoTitleBar\">\n        <item name=\"android:windowBackground\">?android:colorBackground</item>\n    </style>\n</resources>\n"
  },
  {
    "path": "android/app/src/main/res/values-night-v27/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources xmlns:tools=\"http://schemas.android.com/tools\">\n    <style name=\"LaunchTheme\" parent=\"@android:style/Theme.Black.NoTitleBar\">\n        <item name=\"android:forceDarkAllowed\" tools:targetApi=\"q\">false</item>\n        <item name=\"android:windowFullscreen\">false</item>\n        <item name=\"android:windowDrawsSystemBarBackgrounds\">false</item>\n        <item name=\"android:windowLayoutInDisplayCutoutMode\">shortEdges</item>\n        <item name=\"android:windowSplashScreenBackground\" tools:targetApi=\"s\">#121212</item>\n        <item name=\"android:windowSplashScreenAnimatedIcon\" tools:targetApi=\"s\">@drawable/ic_launcher_foreground</item>\n        <item name=\"postSplashScreenTheme\">@style/NormalTheme</item>\n    </style>\n</resources>"
  },
  {
    "path": "android/app/src/main/res/values-v27/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources xmlns:tools=\"http://schemas.android.com/tools\">\n    <style name=\"LaunchTheme\" parent=\"@android:style/Theme.Black.NoTitleBar\">\n        <item name=\"android:forceDarkAllowed\" tools:targetApi=\"q\">false</item>\n        <item name=\"android:windowFullscreen\">false</item>\n        <item name=\"android:windowDrawsSystemBarBackgrounds\">false</item>\n        <item name=\"android:windowLayoutInDisplayCutoutMode\">shortEdges</item>\n        <item name=\"android:windowSplashScreenBackground\" tools:targetApi=\"s\">@color/ic_launcher_background</item>\n        <item name=\"android:windowSplashScreenAnimatedIcon\" tools:targetApi=\"s\">@drawable/ic_launcher_foreground</item>\n        <item name=\"postSplashScreenTheme\">@style/NormalTheme</item>\n    </style>\n</resources>"
  },
  {
    "path": "android/app/src/main/res/xml/file_paths.xml",
    "content": "<paths>\n    <files-path\n        name=\"files\"\n        path=\".\"/>\n</paths>\n\n"
  },
  {
    "path": "android/app/src/main/res/xml/network_security_config.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<network-security-config xmlns:tools=\"http://schemas.android.com/tools\"\n    tools:ignore=\"AcceptsUserCertificates\">\n    <base-config>\n        <trust-anchors>\n            <certificates src=\"system\" />\n            <certificates src=\"user\" />\n        </trust-anchors>\n    </base-config>\n    <domain-config cleartextTrafficPermitted=\"true\">\n        <domain includeSubdomains=\"true\">localhost</domain>\n        <domain includeSubdomains=\"true\">127.0.0.1</domain>\n    </domain-config>\n</network-security-config>"
  },
  {
    "path": "android/app/src/profile/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <!-- The INTERNET permission is required for development. Specifically,\n         the Flutter tool needs it to communicate with the running application\n         to allow setting breakpoints, to provide hot reload, etc.\n    -->\n    <uses-permission android:name=\"android.permission.INTERNET\"/>\n</manifest>\n"
  },
  {
    "path": "android/build.gradle.kts",
    "content": "allprojects {\n    repositories {\n        google()\n        mavenCentral()\n    }\n}\n\nval newBuildDir: Directory =\n    rootProject.layout.buildDirectory\n        .dir(\"../../build\")\n        .get()\nrootProject.layout.buildDirectory.value(newBuildDir)\n\nsubprojects {\n    val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)\n    project.layout.buildDirectory.value(newSubprojectBuildDir)\n}\nsubprojects {\n    project.evaluationDependsOn(\":app\")\n}\n\ntasks.register<Delete>(\"clean\") {\n    delete(rootProject.layout.buildDirectory)\n}\n"
  },
  {
    "path": "android/common/.gitignore",
    "content": "/build"
  },
  {
    "path": "android/common/build.gradle.kts",
    "content": "import org.jetbrains.kotlin.gradle.dsl.JvmTarget\n\nplugins {\n    id(\"com.android.library\")\n    id(\"org.jetbrains.kotlin.android\")\n}\n\nandroid {\n    namespace = \"com.follow.clash.common\"\n    compileSdk = libs.versions.compileSdk.get().toInt()\n\n    defaultConfig {\n        minSdk = 21\n        consumerProguardFiles(\"consumer-rules.pro\")\n    }\n\n    buildTypes {\n        release {\n            proguardFiles(\n                getDefaultProguardFile(\"proguard-android-optimize.txt\"),\n                \"proguard-rules.pro\"\n            )\n        }\n    }\n\n    compileOptions {\n        sourceCompatibility = JavaVersion.VERSION_17\n        targetCompatibility = JavaVersion.VERSION_17\n    }\n\n}\n\nkotlin {\n    compilerOptions {\n        jvmTarget.set(JvmTarget.JVM_17)\n    }\n}\n\ndependencies {\n    implementation(libs.androidx.core)\n    implementation(libs.gson)\n    implementation(platform(libs.firebase.bom))\n    implementation(libs.firebase.crashlytics.ndk)\n    implementation(libs.firebase.analytics)\n}"
  },
  {
    "path": "android/common/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <permission\n        android:name=\"${applicationId}.permission.RECEIVE_BROADCASTS\"\n        android:protectionLevel=\"signature\" />\n\n    <uses-permission android:name=\"${applicationId}.permission.RECEIVE_BROADCASTS\" />\n</manifest>"
  },
  {
    "path": "android/common/src/main/java/com/follow/clash/common/Components.kt",
    "content": "package com.follow.clash.common\n\nimport android.content.ComponentName\n\nobject Components {\n    const val PACKAGE_NAME = \"com.follow.clash\"\n\n    val MAIN_ACTIVITY =\n        ComponentName(GlobalState.packageName, \"${PACKAGE_NAME}.MainActivity\")\n\n    val TEMP_ACTIVITY =\n        ComponentName(GlobalState.packageName, \"${PACKAGE_NAME}.TempActivity\")\n\n    val BROADCAST_RECEIVER =\n        ComponentName(GlobalState.packageName, \"${PACKAGE_NAME}.BroadcastReceiver\")\n}"
  },
  {
    "path": "android/common/src/main/java/com/follow/clash/common/Enums.kt",
    "content": "package com.follow.clash.common\n\nimport com.google.gson.annotations.SerializedName\n\n\nenum class QuickAction {\n    STOP,\n    START,\n    TOGGLE,\n}\n\nenum class BroadcastAction {\n    SERVICE_CREATED,\n    SERVICE_DESTROYED,\n}\n\nenum class AccessControlMode {\n    @SerializedName(\"acceptSelected\")\n    ACCEPT_SELECTED,\n\n    @SerializedName(\"rejectSelected\")\n    REJECT_SELECTED,\n}"
  },
  {
    "path": "android/common/src/main/java/com/follow/clash/common/Ext.kt",
    "content": "package com.follow.clash.common\n\nimport android.annotation.SuppressLint\nimport android.app.ActivityManager\nimport android.app.Notification\nimport android.app.NotificationChannel\nimport android.app.NotificationManager\nimport android.app.PendingIntent\nimport android.app.Service\nimport android.content.BroadcastReceiver\nimport android.content.ComponentName\nimport android.content.Context\nimport android.content.Context.RECEIVER_NOT_EXPORTED\nimport android.content.Intent\nimport android.content.IntentFilter\nimport android.content.ServiceConnection\nimport android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE\nimport android.os.Build\nimport android.os.Handler\nimport android.os.IBinder\nimport android.os.Looper\nimport android.os.RemoteException\nimport android.util.Log\nimport androidx.core.content.getSystemService\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.channels.awaitClose\nimport kotlinx.coroutines.delay\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.callbackFlow\nimport kotlinx.coroutines.flow.retryWhen\nimport kotlinx.coroutines.withContext\nimport java.nio.charset.Charset\nimport kotlin.reflect.KClass\n\n//fun Context.startForegroundServiceCompat(intent: Intent?) {\n//    if (Build.VERSION.SDK_INT >= 26) {\n//        startForegroundService(intent)\n//    } else {\n//        startService(intent)\n//    }\n//}\n\nval KClass<*>.intent: Intent\n    get() = Intent(GlobalState.application, this.java)\n\nfun Service.startForegroundCompat(id: Int, notification: Notification) {\n    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {\n        startForeground(id, notification, FOREGROUND_SERVICE_TYPE_SPECIAL_USE)\n    } else {\n        startForeground(id, notification)\n    }\n}\n\nval ComponentName.intent: Intent\n    get() = Intent().apply {\n        setComponent(this@intent)\n        setPackage(GlobalState.packageName)\n    }\n\nval QuickAction.action: String\n    get() = \"${GlobalState.application.packageName}.action.${this.name}\"\n\nval QuickAction.quickIntent: Intent\n    get() = Components.TEMP_ACTIVITY.intent.apply {\n        action = this@quickIntent.action\n        addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_MULTIPLE_TASK)\n    }\n\nval BroadcastAction.action: String\n    get() = \"${GlobalState.application.packageName}.intent.action.${this.name}\"\n\nval Context.processName: String?\n    get() {\n        val pid = android.os.Process.myPid()\n        val activityManager = getSystemService<ActivityManager>()\n        activityManager?.runningAppProcesses?.find { it.pid == pid }?.let {\n            return it.processName\n        }\n        return null\n    }\n\nval BroadcastAction.quickIntent: Intent\n    get() = Components.BROADCAST_RECEIVER.intent.apply {\n        action = this@quickIntent.action\n    }\n\nfun BroadcastAction.sendBroadcast() {\n    val intent = Intent().apply {\n        action = this@sendBroadcast.action\n        Log.d(\"[sendBroadcast]\", \"$action\")\n        setPackage(GlobalState.packageName)\n    }\n    GlobalState.application.sendBroadcast(\n        intent, GlobalState.RECEIVE_BROADCASTS_PERMISSIONS\n    )\n}\n\n\nval Intent.toPendingIntent: PendingIntent\n    get() = PendingIntent.getActivity(\n        GlobalState.application,\n        0,\n        this,\n        PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT\n    )\n\n\nfun Service.startForeground(notification: Notification) {\n    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n        val manager = getSystemService(NotificationManager::class.java)\n        var channel = manager?.getNotificationChannel(GlobalState.NOTIFICATION_CHANNEL)\n        if (channel == null) {\n            channel = NotificationChannel(\n                GlobalState.NOTIFICATION_CHANNEL,\n                \"SERVICE_CHANNEL\",\n                NotificationManager.IMPORTANCE_LOW\n            )\n            manager?.createNotificationChannel(channel)\n        }\n    }\n    startForegroundCompat(GlobalState.NOTIFICATION_ID, notification)\n}\n\n@SuppressLint(\"UnspecifiedRegisterReceiverFlag\")\nfun Context.registerReceiverCompat(\n    receiver: BroadcastReceiver,\n    filter: IntentFilter,\n) = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {\n    registerReceiver(receiver, filter, RECEIVER_NOT_EXPORTED)\n} else {\n    registerReceiver(receiver, filter)\n}\n\nfun Context.receiveBroadcastFlow(\n    configure: IntentFilter.() -> Unit,\n): Flow<Intent> = callbackFlow {\n    val filter = IntentFilter().apply(configure)\n    val receiver = object : BroadcastReceiver() {\n        override fun onReceive(context: Context?, intent: Intent?) {\n            if (context == null || intent == null) return\n            trySend(intent)\n        }\n    }\n    registerReceiverCompat(receiver, filter)\n    awaitClose { unregisterReceiver(receiver) }\n}\n\n\ninline fun <reified T : IBinder> Context.bindServiceFlow(\n    intent: Intent,\n    flags: Int = Context.BIND_AUTO_CREATE,\n    maxRetries: Int = 10,\n    retryDelayMillis: Long = 200L\n): Flow<Pair<IBinder?, String>> = callbackFlow {\n    val connection = object : ServiceConnection {\n        override fun onServiceConnected(name: ComponentName?, binder: IBinder?) {\n            if (binder != null) {\n                try {\n                    @Suppress(\"UNCHECKED_CAST\") val casted = binder as? T\n                    if (casted != null) {\n                        trySend(Pair(casted, \"\"))\n                    } else {\n                        trySend(Pair(null, \"Binder is not of type ${T::class.java}\"))\n                    }\n                } catch (e: RemoteException) {\n                    trySend(Pair(null, \"Failed to link to death: ${e.message}\"))\n                }\n            } else {\n                trySend(Pair(null, \"Binder empty\"))\n            }\n        }\n\n        override fun onServiceDisconnected(name: ComponentName?) {\n            trySend(Pair(null, \"Service disconnected\"))\n        }\n    }\n\n    val success = withContext(Dispatchers.Main) {\n        bindService(intent, connection, flags)\n    }\n\n    if (!success) {\n        throw IllegalStateException(\"bindService() failed, will retry\")\n    }\n\n    awaitClose {\n        Handler(Looper.getMainLooper()).post {\n            unbindService(connection)\n            trySend(Pair(null, \"\"))\n        }\n    }\n}.retryWhen { cause, attempt ->\n    if (attempt < maxRetries && cause is Exception) {\n        delay(retryDelayMillis)\n        true\n    } else {\n        false\n    }\n}\n\n\nval Long.formatBytes: String\n    get() {\n        val units = arrayOf(\"B\", \"KB\", \"MB\", \"GB\", \"TB\")\n        var size = this.toDouble()\n        var unitIndex = 0\n\n        while (size >= 1024 && unitIndex < units.size - 1) {\n            size /= 1024\n            unitIndex++\n        }\n\n        return if (unitIndex == 0) {\n            \"${size.toLong()}${units[unitIndex]}\"\n        } else {\n            \"%.1f${units[unitIndex]}\".format(size)\n        }\n    }\n\nfun String.chunkedForAidl(charset: Charset = Charsets.UTF_8): List<ByteArray> {\n    val allBytes = toByteArray(charset)\n    val total = allBytes.size\n    val maxBytes = when {\n        total <= 100 * 1024 -> total\n        total <= 1024 * 1024 -> 64 * 1024\n        total <= 10 * 1024 * 1024 -> 128 * 1024\n        else -> 256 * 1024\n    }\n\n    val result = mutableListOf<ByteArray>()\n    var index = 0\n    while (index < total) {\n        val end = minOf(index + maxBytes, total)\n        result.add(allBytes.copyOfRange(index, end))\n        index = end\n    }\n    return result\n}\n\n\nfun <T : List<ByteArray>> T.formatString(charset: Charset = Charsets.UTF_8): String {\n    val totalSize = this.sumOf { it.size }\n    val combined = ByteArray(totalSize)\n    var offset = 0\n    forEach { byteArray ->\n        byteArray.copyInto(combined, offset)\n        offset += byteArray.size\n    }\n    return String(combined, charset)\n}"
  },
  {
    "path": "android/common/src/main/java/com/follow/clash/common/GlobalState.kt",
    "content": "package com.follow.clash.common\n\n\nimport android.app.Application\nimport android.util.Log\nimport com.google.firebase.FirebaseApp\nimport com.google.firebase.crashlytics.FirebaseCrashlytics\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\n\nobject GlobalState : CoroutineScope by CoroutineScope(Dispatchers.Default) {\n\n    const val NOTIFICATION_CHANNEL = \"FlClash\"\n\n    const val NOTIFICATION_ID = 1\n\n    val packageName: String\n        get() = application.packageName\n\n    val RECEIVE_BROADCASTS_PERMISSIONS: String\n        get() = \"${packageName}.permission.RECEIVE_BROADCASTS\"\n\n\n    private var _application: Application? = null\n\n    val application: Application\n        get() = _application!!\n\n\n    fun log(text: String) {\n        Log.d(\"[FlClash]\", text)\n    }\n\n    fun init(application: Application) {\n        _application = application\n    }\n\n    fun setCrashlytics(enable: Boolean) {\n        _application?.let {\n            FirebaseApp.initializeApp(it)\n            FirebaseCrashlytics.getInstance().isCrashlyticsCollectionEnabled = enable\n            if (enable) {\n                log(\"init crashlytics ${it.processName}\")\n            }\n        }\n    }\n}"
  },
  {
    "path": "android/common/src/main/java/com/follow/clash/common/Service.kt",
    "content": "package com.follow.clash.common\n\nimport android.content.Intent\nimport android.os.IBinder\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.Job\nimport kotlinx.coroutines.SupervisorJob\nimport kotlinx.coroutines.flow.MutableStateFlow\nimport kotlinx.coroutines.flow.StateFlow\nimport kotlinx.coroutines.flow.filterNotNull\nimport kotlinx.coroutines.flow.first\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.withContext\nimport kotlinx.coroutines.withTimeout\nimport java.util.concurrent.atomic.AtomicBoolean\n\nclass ServiceDelegate<T>(\n    private val intent: Intent,\n    private val onServiceDisconnected: ((String) -> Unit)? = null,\n    private val interfaceCreator: (IBinder) -> T,\n) : CoroutineScope by CoroutineScope(SupervisorJob() + Dispatchers.Default) {\n\n    private val _bindingState = AtomicBoolean(false)\n\n    private var _serviceState = MutableStateFlow<Pair<T?, String>?>(null)\n\n    val serviceState: StateFlow<Pair<T?, String>?> = _serviceState\n    private var job: Job? = null\n\n    private fun handleBind(data: Pair<IBinder?, String>) {\n        data.first?.let {\n            _serviceState.value = Pair(interfaceCreator(it), data.second)\n        } ?: run {\n            _serviceState.value = Pair(null, data.second)\n            unbind()\n            onServiceDisconnected?.invoke(data.second)\n            _bindingState.set(false)\n        }\n    }\n\n    fun bind() {\n        if (_bindingState.compareAndSet(false, true)) {\n            job?.cancel()\n            job = null\n            _serviceState.value = null\n            job = launch {\n                runCatching {\n                    GlobalState.application.bindServiceFlow<IBinder>(intent)\n                        .collect { handleBind(it) }\n                }\n            }\n        }\n    }\n\n    suspend inline fun <R> useService(\n        timeoutMillis: Long = 5000, crossinline block: suspend (T) -> R\n    ): Result<R> {\n        return runCatching {\n            withTimeout(timeoutMillis) {\n                val state = serviceState.filterNotNull().first()\n                state.first?.let {\n                    withContext(Dispatchers.Default) {\n                        block(it)\n                    }\n                } ?: throw Exception(state.second)\n            }\n        }\n    }\n\n    fun unbind() {\n        if (_bindingState.compareAndSet(true, false)) {\n            job?.cancel()\n            job = null\n            _serviceState.value = null\n        }\n    }\n}"
  },
  {
    "path": "android/common/src/main/java/com/follow/clash/common/Utils.kt",
    "content": "package com.follow.clash.common\n\nimport kotlinx.coroutines.delay\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.flow\n\n\nfun tickerFlow(delayMillis: Long, initialDelayMillis: Long = delayMillis): Flow<Unit> = flow {\n    delay(initialDelayMillis)\n    while (true) {\n        emit(Unit)\n        delay(delayMillis)\n    }\n}"
  },
  {
    "path": "android/common/src/main/res/values/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <string name=\"FlClash\">FlClash</string>\n</resources>\n"
  },
  {
    "path": "android/core/.gitignore",
    "content": "/build"
  },
  {
    "path": "android/core/build.gradle.kts",
    "content": "import org.jetbrains.kotlin.gradle.dsl.JvmTarget\n\nplugins {\n    id(\"com.android.library\")\n    id(\"org.jetbrains.kotlin.android\")\n}\n\nandroid {\n    namespace = \"com.follow.clash.core\"\n    compileSdk = libs.versions.compileSdk.get().toInt()\n    ndkVersion = libs.versions.ndkVersion.get()\n\n    defaultConfig {\n        minSdk = libs.versions.minSdk.get().toInt()\n    }\n\n\n    sourceSets {\n        getByName(\"main\") {\n            jniLibs.srcDirs(\"src/main/jniLibs\")\n        }\n    }\n\n    externalNativeBuild {\n        cmake {\n            path(\"src/main/cpp/CMakeLists.txt\")\n            version = \"3.22.1\"\n        }\n    }\n\n    compileOptions {\n        sourceCompatibility = JavaVersion.VERSION_17\n        targetCompatibility = JavaVersion.VERSION_17\n    }\n\n    buildTypes {\n        release {\n            proguardFiles(\n                getDefaultProguardFile(\"proguard-android-optimize.txt\"),\n                \"proguard-rules.pro\"\n            )\n        }\n    }\n}\n\nkotlin {\n    compilerOptions {\n        jvmTarget.set(JvmTarget.JVM_17)\n    }\n}\n\n\ndependencies {\n    implementation(libs.annotation.jvm)\n}\n\nval copyNativeLibs by tasks.register<Copy>(\"copyNativeLibs\") {\n    doFirst {\n        delete(\"src/main/jniLibs\")\n    }\n    from(\"../../libclash/android\")\n    into(\"src/main/jniLibs\")\n\n    doLast {\n        val includesDir = file(\"src/main/jniLibs/includes\")\n        val targetDir = file(\"src/main/cpp/includes\")\n        if (includesDir.exists()) {\n            copy {\n                from(includesDir)\n                into(targetDir)\n            }\n            delete(includesDir)\n        }\n    }\n}\n\nafterEvaluate {\n    tasks.named(\"preBuild\") {\n        dependsOn(copyNativeLibs)\n    }\n}"
  },
  {
    "path": "android/core/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n</manifest>"
  },
  {
    "path": "android/core/src/main/cpp/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.22.1)\n\nproject(\"core\")\n\nmessage(\"CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR}\")\n\nmessage(\"CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}\")\n\n\nif (NOT \"${CMAKE_BUILD_TYPE}\" STREQUAL \"Debug\")\n    set(CMAKE_BUILD_TYPE Release CACHE STRING \"Build type\" FORCE)\n    add_compile_options(-O3 -flto -g0 -fno-exceptions -fno-rtti)\n    add_link_options(-flto -Wl,--gc-sections,--strip-all)\nendif ()\n\nset(LIB_CLASH_PATH \"${CMAKE_SOURCE_DIR}/../jniLibs/${ANDROID_ABI}/libclash.so\")\n\nmessage(\"LIB_CLASH_PATH ${LIB_CLASH_PATH}\")\nif (EXISTS ${LIB_CLASH_PATH})\n    message(\"Found libclash.so for ABI ${ANDROID_ABI}\")\n    add_compile_definitions(LIBCLASH)\n    include_directories(${CMAKE_SOURCE_DIR}/../cpp/includes/${ANDROID_ABI})\n    link_directories(${CMAKE_SOURCE_DIR}/../jniLibs/${ANDROID_ABI})\n    add_library(${CMAKE_PROJECT_NAME} SHARED\n            jni_helper.cpp\n            core.cpp)\n    target_link_libraries(${CMAKE_PROJECT_NAME}\n            clash)\nelse ()\n    message(\"Not found libclash.so for ABI ${ANDROID_ABI}\")\n    add_library(${CMAKE_PROJECT_NAME} SHARED\n            jni_helper.cpp\n            core.cpp)\n    target_link_libraries(${CMAKE_PROJECT_NAME})\nendif ()"
  },
  {
    "path": "android/core/src/main/cpp/core.cpp",
    "content": "#include <jni.h>\n\n#ifdef LIBCLASH\n\n#include \"jni_helper.h\"\n#include \"libclash.h\"\n#include \"bride.h\"\n\nextern \"C\"\nJNIEXPORT void JNICALL\nJava_com_follow_clash_core_Core_startTun(JNIEnv *env, jobject thiz, jint fd, jobject cb,\n                                         jstring stack, jstring address, jstring dns) {\n    const auto interface = new_global(cb);\n    startTUN(interface, fd, get_string(stack), get_string(address), get_string(dns));\n}\n\nextern \"C\"\nJNIEXPORT void JNICALL\nJava_com_follow_clash_core_Core_stopTun(JNIEnv *env, jobject thiz) {\n    stopTun();\n}\n\nextern \"C\"\nJNIEXPORT void JNICALL\nJava_com_follow_clash_core_Core_forceGC(JNIEnv *env, jobject thiz) {\n    forceGC();\n}\n\nextern \"C\"\nJNIEXPORT void JNICALL\nJava_com_follow_clash_core_Core_updateDNS(JNIEnv *env, jobject thiz, jstring dns) {\n    updateDns(get_string(dns));\n}\n\nextern \"C\"\nJNIEXPORT void JNICALL\nJava_com_follow_clash_core_Core_invokeAction(JNIEnv *env, jobject thiz, jstring data, jobject cb) {\n    const auto interface = new_global(cb);\n    invokeAction(interface, get_string(data));\n}\n\nextern \"C\"\nJNIEXPORT void JNICALL\nJava_com_follow_clash_core_Core_setEventListener(JNIEnv *env, jobject thiz, jobject cb) {\n    if (cb != nullptr) {\n        const auto interface = new_global(cb);\n        setEventListener(interface);\n    } else {\n        setEventListener(nullptr);\n    }\n}\n\nextern \"C\"\nJNIEXPORT jstring JNICALL\nJava_com_follow_clash_core_Core_getTraffic(JNIEnv *env, jobject thiz,\n                                           const jboolean only_statistics_proxy) {\n    return new_string(getTraffic(only_statistics_proxy));\n}\n\nextern \"C\"\nJNIEXPORT jstring JNICALL\nJava_com_follow_clash_core_Core_getTotalTraffic(JNIEnv *env, jobject thiz,\n                                                const jboolean only_statistics_proxy) {\n    return new_string(getTotalTraffic(only_statistics_proxy));\n}\n\nextern \"C\"\nJNIEXPORT void JNICALL\nJava_com_follow_clash_core_Core_suspended(JNIEnv *env, jobject thiz, jboolean suspended) {\n    suspend(suspended);\n}\n\nextern \"C\"\nJNIEXPORT void JNICALL\nJava_com_follow_clash_core_Core_quickSetup(JNIEnv *env, jobject thiz, jstring init_params_string,\n                                           jstring setup_params_string, jobject cb) {\n    const auto interface = new_global(cb);\n    quickSetup(interface, get_string(init_params_string), get_string(setup_params_string));\n}\n\n\nstatic jmethodID m_tun_interface_protect;\nstatic jmethodID m_tun_interface_resolve_process;\nstatic jmethodID m_invoke_interface_result;\n\n\nstatic void release_jni_object_impl(void *obj) {\n    ATTACH_JNI();\n    del_global(static_cast<jobject>(obj));\n}\n\nstatic void free_string_impl(char *str) {\n    free(str);\n}\n\nstatic void call_tun_interface_protect_impl(void *tun_interface, const int fd) {\n    ATTACH_JNI();\n    env->CallVoidMethod(static_cast<jobject>(tun_interface),\n                        m_tun_interface_protect,\n                        fd);\n}\n\nstatic char *\ncall_tun_interface_resolve_process_impl(void *tun_interface, const int protocol,\n                                        const char *source,\n                                        const char *target,\n                                        const int uid) {\n    ATTACH_JNI();\n    const auto packageName = reinterpret_cast<jstring>(env->CallObjectMethod(\n            static_cast<jobject>(tun_interface),\n            m_tun_interface_resolve_process,\n            protocol,\n            new_string(source),\n            new_string(target),\n            uid));\n    return get_string(packageName);\n}\n\nstatic void call_invoke_interface_result_impl(void *invoke_interface, const char *data) {\n    ATTACH_JNI();\n    env->CallVoidMethod(static_cast<jobject>(invoke_interface),\n                        m_invoke_interface_result,\n                        new_string(data));\n}\n\nextern \"C\"\nJNIEXPORT jint JNICALL\nJNI_OnLoad(JavaVM *vm, void *) {\n    JNIEnv *env = nullptr;\n    if (vm->GetEnv(reinterpret_cast<void **>(&env), JNI_VERSION_1_6) != JNI_OK) {\n        return JNI_ERR;\n    }\n\n    initialize_jni(vm, env);\n\n    const auto c_tun_interface = find_class(\"com/follow/clash/core/TunInterface\");\n\n    const auto c_invoke_interface = find_class(\"com/follow/clash/core/InvokeInterface\");\n\n    m_tun_interface_protect = find_method(c_tun_interface, \"protect\", \"(I)V\");\n    m_tun_interface_resolve_process = find_method(c_tun_interface, \"resolverProcess\",\n                                                  \"(ILjava/lang/String;Ljava/lang/String;I)Ljava/lang/String;\");\n    m_invoke_interface_result = find_method(c_invoke_interface, \"onResult\",\n                                            \"(Ljava/lang/String;)V\");\n\n\n    protect_func = &call_tun_interface_protect_impl;\n    resolve_process_func = &call_tun_interface_resolve_process_impl;\n    result_func = &call_invoke_interface_result_impl;\n    release_object_func = &release_jni_object_impl;\n    free_string_func = &free_string_impl;\n\n    return JNI_VERSION_1_6;\n}\n#else\nextern \"C\"\nJNIEXPORT void JNICALL\nJava_com_follow_clash_core_Core_startTun(JNIEnv *env, jobject thiz, jint fd, jobject cb,\n                                         jstring stack, jstring address, jstring dns) {\n}\n\nextern \"C\"\nJNIEXPORT void JNICALL\nJava_com_follow_clash_core_Core_stopTun(JNIEnv *env, jobject thiz) {\n}\n\nextern \"C\"\nJNIEXPORT void JNICALL\nJava_com_follow_clash_core_Core_invokeAction(JNIEnv *env, jobject thiz, jstring data, jobject cb) {\n}\n\nextern \"C\"\nJNIEXPORT void JNICALL\nJava_com_follow_clash_core_Core_forceGC(JNIEnv *env, jobject thiz) {\n}\n\nextern \"C\"\nJNIEXPORT void JNICALL\nJava_com_follow_clash_core_Core_updateDNS(JNIEnv *env, jobject thiz, jstring dns) {\n}\n\nextern \"C\"\nJNIEXPORT void JNICALL\nJava_com_follow_clash_core_Core_setEventListener(JNIEnv *env, jobject thiz, jobject cb) {\n}\n\nextern \"C\"\nJNIEXPORT jstring JNICALL\nJava_com_follow_clash_core_Core_getTraffic(JNIEnv *env, jobject thiz,\n                                           const jboolean only_statistics_proxy) {\n}\nextern \"C\"\nJNIEXPORT jstring JNICALL\nJava_com_follow_clash_core_Core_getTotalTraffic(JNIEnv *env, jobject thiz,\n                                                const jboolean only_statistics_proxy) {\n}\n\nextern \"C\"\nJNIEXPORT void JNICALL\nJava_com_follow_clash_core_Core_suspended(JNIEnv *env, jobject thiz, jboolean suspended) {\n}\n\nextern \"C\"\nJNIEXPORT void JNICALL\nJava_com_follow_clash_core_Core_quickSetup(JNIEnv *env, jobject thiz, jstring init_params_string,\n                                           jstring setup_params_string, jobject cb) {\n}\n#endif"
  },
  {
    "path": "android/core/src/main/cpp/jni_helper.cpp",
    "content": "#include \"jni_helper.h\"\n\n#include <cstdlib>\n#include <malloc.h>\n#include <cstring>\n\nstatic JavaVM *global_vm;\n\nstatic jclass c_string;\nstatic jmethodID m_new_string;\nstatic jmethodID m_get_bytes;\n\nvoid initialize_jni(JavaVM *vm, JNIEnv *env) {\n    global_vm = vm;\n\n    c_string = reinterpret_cast<jclass>(new_global(find_class(\"java/lang/String\")));\n    m_new_string = find_method(c_string, \"<init>\", \"([B)V\");\n    m_get_bytes = find_method(c_string, \"getBytes\", \"()[B\");\n}\n\nJavaVM *global_java_vm() {\n    return global_vm;\n}\n\nchar *jni_get_string(JNIEnv *env, jstring str) {\n    const auto array = reinterpret_cast<jbyteArray>(env->CallObjectMethod(str, m_get_bytes));\n    const int length = env->GetArrayLength(array);\n    const auto content = static_cast<char *>(malloc(length + 1));\n    env->GetByteArrayRegion(array, 0, length, reinterpret_cast<jbyte *>(content));\n    content[length] = 0;\n    return content;\n}\n\njstring jni_new_string(JNIEnv *env, const char *str) {\n    const auto length = static_cast<int>(strlen(str));\n    const auto array = env->NewByteArray(length);\n    env->SetByteArrayRegion(array, 0, length, reinterpret_cast<const jbyte *>(str));\n    return reinterpret_cast<jstring>(env->NewObject(c_string, m_new_string, array));\n}\n\nint jni_catch_exception(JNIEnv *env) {\n    const int result = env->ExceptionCheck();\n    if (result) {\n        env->ExceptionDescribe();\n        env->ExceptionClear();\n    }\n    return result;\n}\n\nvoid jni_attach_thread(scoped_jni *jni) {\n    JavaVM *vm = global_java_vm();\n    if (vm->GetEnv(reinterpret_cast<void **>(&jni->env), JNI_VERSION_1_6) == JNI_OK) {\n        jni->require_release = 0;\n        return;\n    }\n    if (vm->AttachCurrentThread(&jni->env, nullptr) != JNI_OK) {\n        abort();\n    }\n    jni->require_release = 1;\n}\n\nvoid jni_detach_thread(const scoped_jni *env) {\n    JavaVM *vm = global_java_vm();\n    if (env->require_release) {\n        vm->DetachCurrentThread();\n    }\n}\n\nvoid release_string(char **str) {\n    free(*str);\n}"
  },
  {
    "path": "android/core/src/main/cpp/jni_helper.h",
    "content": "#pragma once\n\n#include <jni.h>\n\nstruct scoped_jni {\n    JNIEnv *env;\n    int require_release;\n};\n\nextern void initialize_jni(JavaVM *vm, JNIEnv *env);\n\nextern jstring jni_new_string(JNIEnv *env, const char *str);\n\nextern char *jni_get_string(JNIEnv *env, jstring str);\n\nextern int jni_catch_exception(JNIEnv *env);\n\nextern void jni_attach_thread(scoped_jni *jni);\n\nextern void jni_detach_thread(const scoped_jni *env);\n\nextern void release_string( char **str);\n\n#define ATTACH_JNI() __attribute__((unused, cleanup(jni_detach_thread))) \\\n                    scoped_jni _jni{}; \\\n                    jni_attach_thread(&_jni); \\\n                    JNIEnv *env = _jni.env\n\n#define scoped_string __attribute__((cleanup(release_string))) char*\n\n#define find_class(name) env->FindClass(name)\n#define find_method(cls, name, signature) env->GetMethodID(cls, name, signature)\n#define new_global(obj) env->NewGlobalRef(obj)\n#define del_global(obj) env->DeleteGlobalRef(obj)\n#define get_string(jstr) jni_get_string(env, jstr)\n#define new_string(cstr) jni_new_string(env, cstr)\n"
  },
  {
    "path": "android/core/src/main/java/com/follow/clash/core/Core.kt",
    "content": "package com.follow.clash.core\n\nimport java.net.InetAddress\nimport java.net.InetSocketAddress\nimport java.net.URL\n\ndata object Core {\n    private external fun startTun(\n        fd: Int,\n        cb: TunInterface,\n        stack: String,\n        address: String,\n        dns: String,\n    )\n\n    external fun forceGC(\n    )\n\n    external fun updateDNS(\n        dns: String,\n    )\n\n    private fun parseInetSocketAddress(address: String): InetSocketAddress {\n        val url = URL(\"https://$address\")\n\n        return InetSocketAddress(InetAddress.getByName(url.host), url.port)\n    }\n\n    fun startTun(\n        fd: Int,\n        protect: (Int) -> Boolean,\n        resolverProcess: (protocol: Int, source: InetSocketAddress, target: InetSocketAddress, uid: Int) -> String,\n        stack: String,\n        address: String,\n        dns: String,\n    ) {\n        startTun(\n            fd,\n            object : TunInterface {\n                override fun protect(fd: Int) {\n                    protect(fd)\n                }\n\n                override fun resolverProcess(\n                    protocol: Int,\n                    source: String,\n                    target: String,\n                    uid: Int\n                ): String {\n                    return resolverProcess(\n                        protocol,\n                        parseInetSocketAddress(source),\n                        parseInetSocketAddress(target),\n                        uid,\n                    )\n                }\n            },\n            stack,\n            address,\n            dns\n        )\n    }\n\n    external fun suspended(\n        suspended: Boolean,\n    )\n\n    private external fun invokeAction(\n        data: String,\n        cb: InvokeInterface\n    )\n\n    fun invokeAction(\n        data: String,\n        cb: (result: String?) -> Unit\n    ) {\n        invokeAction(\n            data,\n            object : InvokeInterface {\n                override fun onResult(result: String?) {\n                    cb(result)\n                }\n            },\n        )\n    }\n\n    private external fun setEventListener(cb: InvokeInterface?)\n\n    fun callSetEventListener(\n        cb: ((result: String?) -> Unit)?\n    ) {\n        when (cb != null) {\n            true -> setEventListener(\n                object : InvokeInterface {\n                    override fun onResult(result: String?) {\n                        cb(result)\n                    }\n                },\n            )\n\n            false -> setEventListener(null)\n        }\n    }\n\n    fun quickSetup(\n        initParamsString: String,\n        setupParamsString: String,\n        cb: (result: String?) -> Unit,\n    ) {\n        quickSetup(\n            initParamsString,\n            setupParamsString,\n            object : InvokeInterface {\n                override fun onResult(result: String?) {\n                    cb(result)\n                }\n            },\n        )\n    }\n\n    private external fun quickSetup(\n        initParamsString: String,\n        setupParamsString: String,\n        cb: InvokeInterface\n    )\n\n    external fun stopTun()\n\n    external fun getTraffic(onlyStatisticsProxy: Boolean): String\n\n    external fun getTotalTraffic(onlyStatisticsProxy: Boolean): String\n\n    init {\n        System.loadLibrary(\"core\")\n    }\n}"
  },
  {
    "path": "android/core/src/main/java/com/follow/clash/core/InvokeInterface.kt",
    "content": "package com.follow.clash.core\n\nimport androidx.annotation.Keep\n\n@Keep\ninterface InvokeInterface {\n    fun onResult(result: String?)\n}"
  },
  {
    "path": "android/core/src/main/java/com/follow/clash/core/TunInterface.kt",
    "content": "package com.follow.clash.core\n\nimport androidx.annotation.Keep\n\n@Keep\ninterface TunInterface {\n    fun protect(fd: Int)\n    fun resolverProcess(protocol: Int, source: String, target: String, uid: Int): String\n}"
  },
  {
    "path": "android/gradle/libs.versions.toml",
    "content": "[versions]\n#agp = \"8.10.1\"\nfirebaseBom = \"34.2.0\"\nminSdk = \"23\"\ntargetSdk = \"36\"\ncompileSdk = \"36\"\nndkVersion = \"28.0.13004108\"\ncoreKtx = \"1.17.0\"\nannotationJvm = \"1.9.1\"\ncoreSplashscreen = \"1.0.1\"\ngson = \"2.13.1\"\nkotlin = \"2.2.10\"\nsmaliDexlib2 = \"3.0.9\"\nfirebaseCrashlyticsKtx = \"20.0.1\"\nfirebaseCommonKtx = \"22.0.0\"\n\n[libraries]\nbuild-kotlin = { module = \"org.jetbrains.kotlin:kotlin-gradle-plugin\", version.ref = \"kotlin\" }\nandroidx-core = { module = \"androidx.core:core-ktx\", version.ref = \"coreKtx\" }\nannotation-jvm = { module = \"androidx.annotation:annotation-jvm\", version.ref = \"annotationJvm\" }\ncore-splashscreen = { module = \"androidx.core:core-splashscreen\", version.ref = \"coreSplashscreen\" }\nfirebase-analytics = { module = \"com.google.firebase:firebase-analytics\" }\nfirebase-bom = { module = \"com.google.firebase:firebase-bom\", version.ref = \"firebaseBom\" }\nfirebase-crashlytics-ndk = { module = \"com.google.firebase:firebase-crashlytics-ndk\" }\ngson = { module = \"com.google.code.gson:gson\", version.ref = \"gson\" }\nsmali-dexlib2 = { module = \"com.android.tools.smali:smali-dexlib2\", version.ref = \"smaliDexlib2\" }\nfirebase-crashlytics-ktx = { group = \"com.google.firebase\", name = \"firebase-crashlytics-ktx\", version.ref = \"firebaseCrashlyticsKtx\" }\nfirebase-common-ktx = { group = \"com.google.firebase\", name = \"firebase-common-ktx\", version.ref = \"firebaseCommonKtx\" }"
  },
  {
    "path": "android/gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.13-all.zip\n\n"
  },
  {
    "path": "android/gradle.properties",
    "content": "org.gradle.jvmargs=-Xmx4G\nandroid.useAndroidX=true\nandroid.enableJetifier=true\n"
  },
  {
    "path": "android/service/.gitignore",
    "content": "/build"
  },
  {
    "path": "android/service/build.gradle.kts",
    "content": "import org.jetbrains.kotlin.gradle.dsl.JvmTarget\n\nplugins {\n    id(\"com.android.library\")\n    id(\"org.jetbrains.kotlin.android\")\n    id(\"kotlin-parcelize\")\n}\n\nandroid {\n    namespace = \"com.follow.clash.service\"\n    compileSdk = 36\n\n    defaultConfig {\n        minSdk = libs.versions.minSdk.get().toInt()\n    }\n\n    buildFeatures {\n        aidl = true\n    }\n\n    compileOptions {\n        sourceCompatibility = JavaVersion.VERSION_17\n        targetCompatibility = JavaVersion.VERSION_17\n    }\n\n    buildTypes {\n        release {\n            proguardFiles(\n                getDefaultProguardFile(\"proguard-android-optimize.txt\"),\n                \"proguard-rules.pro\"\n            )\n        }\n    }\n}\n\nkotlin {\n    compilerOptions {\n        jvmTarget.set(JvmTarget.JVM_17)\n    }\n}\n\n\ndependencies {\n    implementation(project(\":core\"))\n    implementation(project(\":common\"))\n    implementation(libs.gson)\n    implementation(libs.androidx.core)\n}"
  },
  {
    "path": "android/service/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />\n\n    <application>\n        <service\n            android:name=\".VpnService\"\n            android:exported=\"false\"\n            android:foregroundServiceType=\"specialUse\"\n            android:permission=\"android.permission.BIND_VPN_SERVICE\"\n            android:process=\":remote\">\n            <intent-filter>\n                <action android:name=\"android.net.VpnService\" />\n            </intent-filter>\n            <property\n                android:name=\"android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE\"\n                android:value=\"vpn\" />\n        </service>\n\n        <service\n            android:name=\".CommonService\"\n            android:exported=\"false\"\n            android:foregroundServiceType=\"specialUse\"\n            android:process=\":remote\">\n            <property\n                android:name=\"android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE\"\n                android:value=\"proxy\" />\n        </service>\n\n        <service\n            android:name=\".RemoteService\"\n            android:enabled=\"true\"\n            android:exported=\"false\"\n            android:process=\":remote\" />\n\n        <provider\n            android:name=\".FilesProvider\"\n            android:authorities=\"${applicationId}.files\"\n            android:exported=\"true\"\n            android:grantUriPermissions=\"true\"\n            android:permission=\"android.permission.MANAGE_DOCUMENTS\"\n            android:process=\":remote\">\n            <intent-filter>\n                <action android:name=\"android.content.action.DOCUMENTS_PROVIDER\" />\n            </intent-filter>\n        </provider>\n    </application>\n</manifest>"
  },
  {
    "path": "android/service/src/main/aidl/com/follow/clash/service/IAckInterface.aidl",
    "content": "// IAckInterface.aidl\npackage com.follow.clash.service;\n\nimport com.follow.clash.service.IAckInterface;\n\ninterface IAckInterface {\n   oneway void onAck();\n}"
  },
  {
    "path": "android/service/src/main/aidl/com/follow/clash/service/ICallbackInterface.aidl",
    "content": "// ICallbackInterface.aidl\npackage com.follow.clash.service;\n\nimport com.follow.clash.service.IAckInterface;\n\ninterface ICallbackInterface {\n    oneway void onResult(in byte[] data,in boolean isSuccess, in IAckInterface ack);\n}"
  },
  {
    "path": "android/service/src/main/aidl/com/follow/clash/service/IEventInterface.aidl",
    "content": "// IEventInterface.aidl\npackage com.follow.clash.service;\n\nimport com.follow.clash.service.IAckInterface;\n\ninterface IEventInterface {\n    oneway void onEvent(in String id, in byte[] data,in boolean isSuccess, in IAckInterface ack);\n}"
  },
  {
    "path": "android/service/src/main/aidl/com/follow/clash/service/IRemoteInterface.aidl",
    "content": "// IRemoteInterface.aidl\npackage com.follow.clash.service;\n\nimport com.follow.clash.service.ICallbackInterface;\nimport com.follow.clash.service.IEventInterface;\nimport com.follow.clash.service.IResultInterface;\nimport com.follow.clash.service.IVoidInterface;\nimport com.follow.clash.service.models.VpnOptions;\nimport com.follow.clash.service.models.NotificationParams;\n\ninterface IRemoteInterface {\n    void invokeAction(in String data, in ICallbackInterface callback);\n    void quickSetup(in String initParamsString, in String setupParamsString, in ICallbackInterface callback, in IVoidInterface onStarted);\n    void updateNotificationParams(in NotificationParams params);\n    void startService(in VpnOptions options, in long runTime, in IResultInterface result);\n    void stopService(in IResultInterface result);\n    void setEventListener(in IEventInterface event);\n    void setCrashlytics(in boolean enable);\n    long getRunTime();\n}"
  },
  {
    "path": "android/service/src/main/aidl/com/follow/clash/service/IResultInterface.aidl",
    "content": "// IResultInterface.aidl\npackage com.follow.clash.service;\n\ninterface IResultInterface {\n    oneway void onResult(in long runTime);\n}"
  },
  {
    "path": "android/service/src/main/aidl/com/follow/clash/service/IVoidInterface.aidl",
    "content": "// IVoidInterface.aidl\npackage com.follow.clash.service;\n\ninterface IVoidInterface {\n    oneway void invoke();\n}"
  },
  {
    "path": "android/service/src/main/aidl/com/follow/clash/service/models/AccessControl.aidl",
    "content": "//AccessControl.aidl\npackage com.follow.clash.service.models;\n\nparcelable AccessControl;"
  },
  {
    "path": "android/service/src/main/aidl/com/follow/clash/service/models/NotificationParams.aidl",
    "content": "//NotificationParams.aidl\npackage com.follow.clash.service.models;\n\nparcelable NotificationParams;"
  },
  {
    "path": "android/service/src/main/aidl/com/follow/clash/service/models/VpnOptions.aidl",
    "content": "//VpnOptions.aidl\npackage com.follow.clash.service.models;\n\nimport com.follow.clash.service.models.AccessControl;\n\nparcelable VpnOptions;"
  },
  {
    "path": "android/service/src/main/java/com/follow/clash/service/CommonService.kt",
    "content": "package com.follow.clash.service\n\nimport android.app.Service\nimport android.content.Intent\nimport android.os.Binder\nimport android.os.IBinder\nimport com.follow.clash.core.Core\nimport com.follow.clash.service.modules.NetworkObserveModule\nimport com.follow.clash.service.modules.NotificationModule\nimport com.follow.clash.service.modules.SuspendModule\nimport com.follow.clash.service.modules.moduleLoader\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\n\nclass CommonService : Service(), IBaseService,\n    CoroutineScope by CoroutineScope(Dispatchers.Default) {\n\n    private val self: CommonService\n        get() = this\n\n    private val loader = moduleLoader {\n        install(NetworkObserveModule(self))\n        install(NotificationModule(self))\n        install(SuspendModule(self))\n    }\n\n    override fun onCreate() {\n        super.onCreate()\n        handleCreate()\n    }\n\n    override fun onDestroy() {\n        handleDestroy()\n        super.onDestroy()\n    }\n\n    override fun onLowMemory() {\n        Core.forceGC()\n        super.onLowMemory()\n    }\n\n    private val binder = LocalBinder()\n\n    inner class LocalBinder : Binder() {\n        fun getService(): CommonService = this@CommonService\n    }\n\n    override fun onBind(intent: Intent): IBinder {\n        return binder\n    }\n\n    override fun start() {\n        try {\n            loader.load()\n        } catch (_: Exception) {\n            stop()\n        }\n    }\n\n    override fun stop() {\n        loader.cancel()\n        stopSelf()\n    }\n}"
  },
  {
    "path": "android/service/src/main/java/com/follow/clash/service/FilesProvider.kt",
    "content": "package com.follow.clash.service\n\nimport android.database.Cursor\nimport android.database.MatrixCursor\nimport android.os.CancellationSignal\nimport android.os.ParcelFileDescriptor\nimport android.provider.DocumentsContract\nimport android.provider.DocumentsProvider\nimport java.io.File\nimport java.io.FileNotFoundException\n\nclass FilesProvider : DocumentsProvider() {\n\n    companion object {\n        private const val DEFAULT_ROOT_ID = \"0\"\n\n        private val DEFAULT_DOCUMENT_COLUMNS = arrayOf(\n            DocumentsContract.Document.COLUMN_DOCUMENT_ID,\n            DocumentsContract.Document.COLUMN_DISPLAY_NAME,\n            DocumentsContract.Document.COLUMN_MIME_TYPE,\n            DocumentsContract.Document.COLUMN_FLAGS,\n            DocumentsContract.Document.COLUMN_SIZE,\n        )\n        private val DEFAULT_ROOT_COLUMNS = arrayOf(\n            DocumentsContract.Root.COLUMN_ROOT_ID,\n            DocumentsContract.Root.COLUMN_FLAGS,\n            DocumentsContract.Root.COLUMN_ICON,\n            DocumentsContract.Root.COLUMN_TITLE,\n            DocumentsContract.Root.COLUMN_SUMMARY,\n            DocumentsContract.Root.COLUMN_DOCUMENT_ID\n        )\n    }\n\n    override fun onCreate(): Boolean {\n        return true\n    }\n\n    override fun queryRoots(projection: Array<String>?): Cursor {\n        return MatrixCursor(projection ?: DEFAULT_ROOT_COLUMNS).apply {\n            newRow().apply {\n                add(DocumentsContract.Root.COLUMN_ROOT_ID, DEFAULT_ROOT_ID)\n                add(DocumentsContract.Root.COLUMN_FLAGS, DocumentsContract.Root.FLAG_LOCAL_ONLY)\n                add(DocumentsContract.Root.COLUMN_ICON, R.drawable.ic_service)\n                add(DocumentsContract.Root.COLUMN_TITLE, \"FlClash\")\n                add(DocumentsContract.Root.COLUMN_SUMMARY, \"Data\")\n                add(DocumentsContract.Root.COLUMN_DOCUMENT_ID, \"/\")\n            }\n        }\n    }\n\n\n    override fun queryChildDocuments(\n        parentDocumentId: String,\n        projection: Array<String>?,\n        sortOrder: String?\n    ): Cursor {\n        val result = MatrixCursor(resolveDocumentProjection(projection))\n        val parentFile = if (parentDocumentId == \"/\") {\n            context?.filesDir\n        } else {\n            File(parentDocumentId)\n        } ?: throw FileNotFoundException(\"Parent directory not found\")\n        parentFile.listFiles()?.forEach { file ->\n            includeFile(result, file)\n        }\n        return result\n    }\n\n    override fun queryDocument(documentId: String, projection: Array<String>?): Cursor {\n        val result = MatrixCursor(resolveDocumentProjection(projection))\n        val file = File(documentId)\n        includeFile(result, file)\n        return result\n    }\n\n    override fun openDocument(\n        documentId: String,\n        mode: String,\n        signal: CancellationSignal?\n    ): ParcelFileDescriptor {\n        val file = File(documentId)\n        val accessMode = ParcelFileDescriptor.parseMode(mode)\n        return ParcelFileDescriptor.open(file, accessMode)\n    }\n\n    private fun includeFile(result: MatrixCursor, file: File) {\n        result.newRow().apply {\n            add(DocumentsContract.Document.COLUMN_DOCUMENT_ID, file.absolutePath)\n            add(DocumentsContract.Document.COLUMN_DISPLAY_NAME, file.name)\n            add(DocumentsContract.Document.COLUMN_SIZE, file.length())\n            add(\n                DocumentsContract.Document.COLUMN_FLAGS,\n                DocumentsContract.Document.FLAG_SUPPORTS_WRITE or DocumentsContract.Document.FLAG_SUPPORTS_DELETE\n            )\n            add(DocumentsContract.Document.COLUMN_MIME_TYPE, getDocumentType(file))\n        }\n    }\n\n    private fun getDocumentType(file: File): String {\n        return if (file.isDirectory) {\n            DocumentsContract.Document.MIME_TYPE_DIR\n        } else {\n            \"application/octet-stream\"\n        }\n    }\n\n    private fun resolveDocumentProjection(projection: Array<String>?): Array<String> {\n        return projection ?: DEFAULT_DOCUMENT_COLUMNS\n    }\n}"
  },
  {
    "path": "android/service/src/main/java/com/follow/clash/service/IBaseService.kt",
    "content": "package com.follow.clash.service\n\nimport com.follow.clash.common.BroadcastAction\nimport com.follow.clash.common.GlobalState\nimport com.follow.clash.common.sendBroadcast\n\ninterface IBaseService {\n    fun handleCreate() {\n        GlobalState.log(\"Service create\")\n        BroadcastAction.SERVICE_CREATED.sendBroadcast()\n    }\n\n    fun handleDestroy() {\n        GlobalState.log(\"Service destroy\")\n        BroadcastAction.SERVICE_DESTROYED.sendBroadcast()\n    }\n\n    fun start()\n\n    fun stop()\n}"
  },
  {
    "path": "android/service/src/main/java/com/follow/clash/service/RemoteService.kt",
    "content": "package com.follow.clash.service\n\nimport android.app.Service\nimport android.content.Intent\nimport android.os.IBinder\nimport com.follow.clash.common.GlobalState\nimport com.follow.clash.common.ServiceDelegate\nimport com.follow.clash.common.chunkedForAidl\nimport com.follow.clash.common.intent\nimport com.follow.clash.core.Core\nimport com.follow.clash.service.State.delegate\nimport com.follow.clash.service.State.intent\nimport com.follow.clash.service.State.runLock\nimport com.follow.clash.service.models.NotificationParams\nimport com.follow.clash.service.models.VpnOptions\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.SupervisorJob\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.suspendCancellableCoroutine\nimport kotlinx.coroutines.sync.withLock\nimport java.util.UUID\nimport kotlin.coroutines.resume\n\nclass RemoteService : Service(),\n    CoroutineScope by CoroutineScope(SupervisorJob() + Dispatchers.Default) {\n    private fun handleStopService(result: IResultInterface) {\n        launch {\n            runLock.withLock {\n                delegate?.useService { service ->\n                    service.stop()\n                    delegate?.unbind()\n                }\n                State.runTime = 0\n                result.onResult(0)\n            }\n        }\n    }\n\n    private fun handleServiceDisconnected(message: String) {\n        GlobalState.log(\"Background service disconnected: $message\")\n        intent = null\n        delegate = null\n    }\n\n    private fun handleStartService(runTime: Long, result: IResultInterface) {\n        launch {\n            runLock.withLock {\n                val nextIntent = when (State.options?.enable == true) {\n                    true -> VpnService::class.intent\n                    false -> CommonService::class.intent\n                }\n                if (intent != nextIntent) {\n                    delegate?.unbind()\n                    delegate = ServiceDelegate(nextIntent, ::handleServiceDisconnected) { binder ->\n                        when (binder) {\n                            is VpnService.LocalBinder -> binder.getService()\n                            is CommonService.LocalBinder -> binder.getService()\n                            else -> throw IllegalArgumentException(\"Invalid binder type\")\n                        }\n                    }\n                    intent = nextIntent\n                    delegate?.bind()\n                }\n                delegate?.useService { service ->\n                    service.start()\n                }\n                State.runTime = when (runTime != 0L) {\n                    true -> runTime\n                    false -> System.currentTimeMillis()\n                }\n                result.onResult(State.runTime)\n            }\n        }\n    }\n\n    private val binder = object : IRemoteInterface.Stub() {\n        override fun invokeAction(data: String, callback: ICallbackInterface) {\n            Core.invokeAction(data) {\n                launch {\n                    runCatching {\n                        val chunks = it?.chunkedForAidl() ?: listOf()\n                        for ((index, chunk) in chunks.withIndex()) {\n                            suspendCancellableCoroutine { cont ->\n                                callback.onResult(\n                                    chunk,\n                                    index == chunks.lastIndex,\n                                    object : IAckInterface.Stub() {\n                                        override fun onAck() {\n                                            cont.resume(Unit)\n                                        }\n                                    },\n                                )\n                            }\n                        }\n                    }\n                }\n            }\n        }\n\n        override fun quickSetup(\n            initParamsString: String,\n            setupParamsString: String,\n            callback: ICallbackInterface,\n            onStarted: IVoidInterface\n        ) {\n            Core.quickSetup(initParamsString, setupParamsString) {\n                launch {\n                    runCatching {\n                        val chunks = it?.chunkedForAidl() ?: listOf()\n                        for ((index, chunk) in chunks.withIndex()) {\n                            suspendCancellableCoroutine { cont ->\n                                callback.onResult(\n                                    chunk,\n                                    index == chunks.lastIndex,\n                                    object : IAckInterface.Stub() {\n                                        override fun onAck() {\n                                            cont.resume(Unit)\n                                        }\n                                    },\n                                )\n                            }\n                        }\n                    }\n                }\n            }\n            onStarted()\n        }\n\n        override fun updateNotificationParams(params: NotificationParams?) {\n            State.notificationParamsFlow.tryEmit(params)\n        }\n\n\n        override fun startService(\n            options: VpnOptions,\n            runtime: Long,\n            result: IResultInterface,\n        ) {\n            GlobalState.log(\"remote startService\")\n            State.options = options\n            handleStartService(runtime, result)\n        }\n\n        override fun stopService(result: IResultInterface) {\n            handleStopService(result)\n        }\n\n        override fun setEventListener(eventListener: IEventInterface?) {\n            GlobalState.log(\"RemoveEventListener ${eventListener == null}\")\n            when (eventListener != null) {\n                true -> Core.callSetEventListener {\n                    launch {\n                        runCatching {\n                            val id = UUID.randomUUID().toString()\n                            val chunks = it?.chunkedForAidl() ?: listOf()\n                            for ((index, chunk) in chunks.withIndex()) {\n                                suspendCancellableCoroutine { cont ->\n                                    eventListener.onEvent(\n                                        id,\n                                        chunk,\n                                        index == chunks.lastIndex,\n                                        object : IAckInterface.Stub() {\n                                            override fun onAck() {\n                                                cont.resume(Unit)\n                                            }\n                                        },\n                                    )\n                                }\n                            }\n                        }\n                    }\n                }\n\n                false -> Core.callSetEventListener(null)\n            }\n        }\n\n        override fun setCrashlytics(enable: Boolean) {\n            GlobalState.setCrashlytics(enable)\n        }\n\n        override fun getRunTime(): Long {\n            return State.runTime\n        }\n    }\n\n    override fun onBind(intent: Intent?): IBinder {\n        return binder\n    }\n\n    override fun onDestroy() {\n        GlobalState.log(\"Remote service destroy\")\n        super.onDestroy()\n    }\n}"
  },
  {
    "path": "android/service/src/main/java/com/follow/clash/service/State.kt",
    "content": "package com.follow.clash.service\n\nimport android.content.Intent\nimport com.follow.clash.common.ServiceDelegate\nimport com.follow.clash.service.models.NotificationParams\nimport com.follow.clash.service.models.VpnOptions\nimport kotlinx.coroutines.flow.MutableStateFlow\nimport kotlinx.coroutines.sync.Mutex\n\nobject State {\n    var options: VpnOptions? = null\n    var notificationParamsFlow: MutableStateFlow<NotificationParams?> = MutableStateFlow(\n        NotificationParams()\n    )\n\n    val runLock = Mutex()\n    var runTime: Long = 0L\n\n    var delegate: ServiceDelegate<IBaseService>? = null\n\n    var intent: Intent? = null\n}"
  },
  {
    "path": "android/service/src/main/java/com/follow/clash/service/VpnService.kt",
    "content": "package com.follow.clash.service\n\nimport android.content.Intent\nimport android.net.ConnectivityManager\nimport android.net.ProxyInfo\nimport android.os.Binder\nimport android.os.Build\nimport android.os.IBinder\nimport android.os.Parcel\nimport android.os.RemoteException\nimport android.util.Log\nimport androidx.core.content.getSystemService\nimport com.follow.clash.common.AccessControlMode\nimport com.follow.clash.common.GlobalState\nimport com.follow.clash.core.Core\nimport com.follow.clash.service.models.VpnOptions\nimport com.follow.clash.service.models.getIpv4RouteAddress\nimport com.follow.clash.service.models.getIpv6RouteAddress\nimport com.follow.clash.service.models.toCIDR\nimport com.follow.clash.service.modules.NetworkObserveModule\nimport com.follow.clash.service.modules.NotificationModule\nimport com.follow.clash.service.modules.SuspendModule\nimport com.follow.clash.service.modules.moduleLoader\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport java.net.InetSocketAddress\nimport android.net.VpnService as SystemVpnService\n\nclass VpnService : SystemVpnService(), IBaseService,\n    CoroutineScope by CoroutineScope(Dispatchers.Default) {\n\n    private val self: VpnService\n        get() = this\n\n    private val loader = moduleLoader {\n        install(NetworkObserveModule(self))\n        install(NotificationModule(self))\n        install(SuspendModule(self))\n    }\n\n    override fun onCreate() {\n        super.onCreate()\n        handleCreate()\n    }\n\n    override fun onDestroy() {\n        handleDestroy()\n        super.onDestroy()\n    }\n\n    private val connectivity by lazy {\n        getSystemService<ConnectivityManager>()\n    }\n    private val uidPageNameMap = mutableMapOf<Int, String>()\n\n    private fun resolverProcess(\n        protocol: Int,\n        source: InetSocketAddress,\n        target: InetSocketAddress,\n        uid: Int,\n    ): String {\n        val nextUid = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {\n            connectivity?.getConnectionOwnerUid(protocol, source, target) ?: -1\n        } else {\n            uid\n        }\n        if (nextUid == -1) {\n            return \"\"\n        }\n        if (!uidPageNameMap.containsKey(nextUid)) {\n            uidPageNameMap[nextUid] = this.packageManager?.getPackagesForUid(nextUid)?.first() ?: \"\"\n        }\n        return uidPageNameMap[nextUid] ?: \"\"\n    }\n\n    val VpnOptions.address\n        get(): String = buildString {\n            append(IPV4_ADDRESS)\n            if (ipv6) {\n                append(\",\")\n                append(IPV6_ADDRESS)\n            }\n        }\n\n    val VpnOptions.dns\n        get(): String {\n            if (dnsHijacking) {\n                return NET_ANY\n            }\n            return buildString {\n                append(DNS)\n                if (ipv6) {\n                    append(\",\")\n                    append(DNS6)\n                }\n            }\n        }\n\n\n    override fun onLowMemory() {\n        Core.forceGC()\n        super.onLowMemory()\n    }\n\n    private val binder = LocalBinder()\n\n    inner class LocalBinder : Binder() {\n        fun getService(): VpnService = this@VpnService\n\n        override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean {\n            try {\n                val isSuccess = super.onTransact(code, data, reply, flags)\n                if (!isSuccess) {\n                    GlobalState.log(\"VpnService disconnected\")\n                    handleDestroy()\n                }\n                return isSuccess\n            } catch (e: RemoteException) {\n                GlobalState.log(\"VpnService onTransact $e\")\n                return false\n            }\n        }\n    }\n\n    override fun onBind(intent: Intent): IBinder {\n        return binder\n    }\n\n    private fun handleStart(options: VpnOptions) {\n        val fd = with(Builder()) {\n            val cidr = IPV4_ADDRESS.toCIDR()\n            addAddress(cidr.address, cidr.prefixLength)\n            Log.d(\n                \"addAddress\", \"address: ${cidr.address} prefixLength:${cidr.prefixLength}\"\n            )\n            val routeAddress = options.getIpv4RouteAddress()\n            if (routeAddress.isNotEmpty()) {\n                try {\n                    routeAddress.forEach { i ->\n                        Log.d(\n                            \"addRoute4\", \"address: ${i.address} prefixLength:${i.prefixLength}\"\n                        )\n                        addRoute(i.address, i.prefixLength)\n                    }\n                } catch (_: Exception) {\n                    addRoute(NET_ANY, 0)\n                }\n            } else {\n                addRoute(NET_ANY, 0)\n            }\n            if (options.ipv6) {\n                try {\n                    val cidr = IPV6_ADDRESS.toCIDR()\n                    Log.d(\n                        \"addAddress6\", \"address: ${cidr.address} prefixLength:${cidr.prefixLength}\"\n                    )\n                    addAddress(cidr.address, cidr.prefixLength)\n                } catch (_: Exception) {\n                    Log.d(\n                        \"addAddress6\", \"IPv6 is not supported.\"\n                    )\n                }\n\n                try {\n                    val routeAddress = options.getIpv6RouteAddress()\n                    if (routeAddress.isNotEmpty()) {\n                        try {\n                            routeAddress.forEach { i ->\n                                Log.d(\n                                    \"addRoute6\",\n                                    \"address: ${i.address} prefixLength:${i.prefixLength}\"\n                                )\n                                addRoute(i.address, i.prefixLength)\n                            }\n                        } catch (_: Exception) {\n                            addRoute(\"::\", 0)\n                        }\n                    } else {\n                        addRoute(NET_ANY6, 0)\n                    }\n                } catch (_: Exception) {\n                    addRoute(NET_ANY6, 0)\n                }\n            }\n            addDnsServer(DNS)\n            if (options.ipv6) {\n                addDnsServer(DNS6)\n            }\n            setMtu(9000)\n            options.accessControlProps.let { accessControl ->\n                if (accessControl.enable) {\n                    when (accessControl.mode) {\n                        AccessControlMode.ACCEPT_SELECTED -> {\n                            (accessControl.acceptList + packageName).forEach {\n                                addAllowedApplication(it)\n                            }\n                        }\n\n                        AccessControlMode.REJECT_SELECTED -> {\n                            (accessControl.rejectList - packageName).forEach {\n                                addDisallowedApplication(it)\n                            }\n                        }\n                    }\n                }\n            }\n            setSession(\"FlClash\")\n            setBlocking(false)\n            if (Build.VERSION.SDK_INT >= 29) {\n                setMetered(false)\n            }\n            if (options.allowBypass) {\n                allowBypass()\n            }\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && options.systemProxy) {\n                GlobalState.log(\"Open http proxy\")\n                setHttpProxy(\n                    ProxyInfo.buildDirectProxy(\n                        \"127.0.0.1\", options.port, options.bypassDomain\n                    )\n                )\n            }\n            establish()?.detachFd()\n                ?: throw NullPointerException(\"Establish VPN rejected by system\")\n        }\n        Core.startTun(\n            fd,\n            protect = this::protect,\n            resolverProcess = this::resolverProcess,\n            options.stack,\n            options.address,\n            options.dns\n        )\n    }\n\n    override fun start() {\n        try {\n            loader.load()\n            State.options?.let {\n                handleStart(it)\n            }\n        } catch (_: Exception) {\n            stop()\n        }\n    }\n\n    override fun stop() {\n        loader.cancel()\n        Core.stopTun()\n        stopSelf()\n    }\n\n    companion object {\n        private const val IPV4_ADDRESS = \"172.19.0.1/30\"\n        private const val IPV6_ADDRESS = \"fdfe:dcba:9876::1/126\"\n        private const val DNS = \"172.19.0.2\"\n        private const val DNS6 = \"fdfe:dcba:9876::2\"\n        private const val NET_ANY = \"0.0.0.0\"\n        private const val NET_ANY6 = \"::\"\n    }\n}"
  },
  {
    "path": "android/service/src/main/java/com/follow/clash/service/models/NotificationParams.kt",
    "content": "package com.follow.clash.service.models\n\nimport android.os.Parcelable\nimport kotlinx.parcelize.Parcelize\n\n@Parcelize\ndata class NotificationParams(\n    val title: String = \"FlClash\",\n    val stopText: String = \"STOP\",\n    val onlyStatisticsProxy: Boolean = false,\n) : Parcelable"
  },
  {
    "path": "android/service/src/main/java/com/follow/clash/service/models/Traffic.kt",
    "content": "package com.follow.clash.service.models\n\nimport com.follow.clash.common.GlobalState\nimport com.follow.clash.common.formatBytes\nimport com.follow.clash.core.Core\nimport com.google.gson.Gson\n\ndata class Traffic(\n    val up: Long,\n    val down: Long,\n)\n\nval Traffic.speedText: String\n    get() = \"${up.formatBytes}/s↑  ${down.formatBytes}/s↓\"\n\nfun Core.getSpeedTrafficText(onlyStatisticsProxy: Boolean): String {\n    try {\n        val res = getTraffic(onlyStatisticsProxy)\n        val traffic = Gson().fromJson(res, Traffic::class.java)\n        return traffic.speedText\n    } catch (e: Exception) {\n        GlobalState.log(e.message + \"\")\n        return \"\"\n    }\n}"
  },
  {
    "path": "android/service/src/main/java/com/follow/clash/service/models/VpnOptions.kt",
    "content": "package com.follow.clash.service.models\n\nimport android.os.Parcelable\nimport com.follow.clash.common.AccessControlMode\nimport kotlinx.parcelize.Parcelize\nimport java.net.InetAddress\n\n@Parcelize\ndata class AccessControlProps(\n    val enable: Boolean,\n    val mode: AccessControlMode,\n    val acceptList: List<String>,\n    val rejectList: List<String>,\n) : Parcelable\n\n@Parcelize\ndata class VpnOptions(\n    val enable: Boolean,\n    val port: Int,\n    val ipv6: Boolean,\n    val dnsHijacking: Boolean,\n    val accessControlProps: AccessControlProps,\n    val allowBypass: Boolean,\n    val systemProxy: Boolean,\n    val bypassDomain: List<String>,\n    val stack: String,\n    val routeAddress: List<String>,\n) : Parcelable\n\ndata class CIDR(val address: InetAddress, val prefixLength: Int)\n\nfun VpnOptions.getIpv4RouteAddress(): List<CIDR> {\n    return routeAddress.filter {\n        it.isIpv4()\n    }.map {\n        it.toCIDR()\n    }\n}\n\nfun VpnOptions.getIpv6RouteAddress(): List<CIDR> {\n    return routeAddress.filter {\n        it.isIpv6()\n    }.map {\n        it.toCIDR()\n    }\n}\n\nfun String.isIpv4(): Boolean {\n    val parts = split(\"/\")\n    if (parts.size != 2) {\n        throw IllegalArgumentException(\"Invalid CIDR format\")\n    }\n    val address = InetAddress.getByName(parts[0])\n    return address.address.size == 4\n}\n\nfun String.isIpv6(): Boolean {\n    val parts = split(\"/\")\n    if (parts.size != 2) {\n        throw IllegalArgumentException(\"Invalid CIDR format\")\n    }\n    val address = InetAddress.getByName(parts[0])\n    return address.address.size == 16\n}\n\nfun String.toCIDR(): CIDR {\n    val parts = split(\"/\")\n    if (parts.size != 2) {\n        throw IllegalArgumentException(\"Invalid CIDR format\")\n    }\n    val ipAddress = parts[0]\n    val prefixLength =\n        parts[1].toIntOrNull() ?: throw IllegalArgumentException(\"Invalid prefix length\")\n\n    val address = InetAddress.getByName(ipAddress)\n\n    val maxPrefix = if (address.address.size == 4) 32 else 128\n    if (prefixLength < 0 || prefixLength > maxPrefix) {\n        throw IllegalArgumentException(\"Invalid prefix length for IP version\")\n    }\n\n    return CIDR(address, prefixLength)\n}"
  },
  {
    "path": "android/service/src/main/java/com/follow/clash/service/modules/Module.kt",
    "content": "package com.follow.clash.service.modules\n\nabstract class Module {\n\n    private var isInstall: Boolean = false\n\n    protected abstract fun onInstall()\n    protected abstract fun onUninstall()\n\n    fun install() {\n        isInstall = true\n        onInstall()\n    }\n\n    fun uninstall() {\n        onUninstall()\n        isInstall = false\n    }\n}"
  },
  {
    "path": "android/service/src/main/java/com/follow/clash/service/modules/ModuleLoader.kt",
    "content": "package com.follow.clash.service.modules\n\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.Job\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.sync.Mutex\nimport kotlinx.coroutines.sync.withLock\n\ninterface ModuleLoaderScope {\n    fun <T : Module> install(module: T): T\n}\n\ninterface ModuleLoader {\n    fun load()\n\n    fun cancel()\n}\n\nprivate val mutex = Mutex()\nfun CoroutineScope.moduleLoader(block: suspend ModuleLoaderScope.() -> Unit): ModuleLoader {\n    val modules = mutableListOf<Module>()\n    var job: Job? = null\n\n    return object : ModuleLoader {\n        override fun load() {\n            job = launch(Dispatchers.IO) {\n                mutex.withLock {\n                    val scope = object : ModuleLoaderScope {\n                        override fun <T : Module> install(module: T): T {\n                            modules.add(module)\n                            module.install()\n                            return module\n                        }\n                    }\n                    scope.block()\n                }\n            }\n        }\n\n        override fun cancel() {\n            launch(Dispatchers.IO) {\n                job?.cancel()\n                mutex.withLock {\n                    modules.asReversed().forEach { it.uninstall() }\n                    modules.clear()\n                }\n            }\n        }\n    }\n}"
  },
  {
    "path": "android/service/src/main/java/com/follow/clash/service/modules/NetworkObserveModule.kt",
    "content": "package com.follow.clash.service.modules\n\nimport android.app.Service\nimport android.net.ConnectivityManager\nimport android.net.LinkProperties\nimport android.net.Network\nimport android.net.NetworkCapabilities\nimport android.net.NetworkCapabilities.TRANSPORT_SATELLITE\nimport android.net.NetworkCapabilities.TRANSPORT_USB\nimport android.net.NetworkRequest\nimport android.os.Build\nimport androidx.core.content.getSystemService\nimport com.follow.clash.core.Core\nimport java.net.Inet4Address\nimport java.net.Inet6Address\nimport java.net.InetAddress\nimport java.util.concurrent.ConcurrentHashMap\n\nprivate data class NetworkInfo(\n    @Volatile var losingMs: Long = 0, @Volatile var dnsList: List<InetAddress> = emptyList()\n) {\n    fun isAvailable(): Boolean = losingMs < System.currentTimeMillis()\n}\n\nclass NetworkObserveModule(private val service: Service) : Module() {\n\n    private val networkInfos = ConcurrentHashMap<Network, NetworkInfo>()\n    private val connectivity by lazy {\n        service.getSystemService<ConnectivityManager>()\n    }\n    private var preDnsList = listOf<String>()\n\n    private val request = NetworkRequest.Builder().apply {\n        addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN)\n        addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {\n            addCapability(NetworkCapabilities.NET_CAPABILITY_FOREGROUND)\n        }\n        addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED)\n    }.build()\n\n    private val callback = object : ConnectivityManager.NetworkCallback() {\n        override fun onAvailable(network: Network) {\n            networkInfos[network] = NetworkInfo()\n            onUpdateNetwork()\n            super.onAvailable(network)\n        }\n\n        override fun onLosing(network: Network, maxMsToLive: Int) {\n            networkInfos[network]?.losingMs = System.currentTimeMillis() + maxMsToLive\n            onUpdateNetwork()\n            setUnderlyingNetworks(network)\n            super.onLosing(network, maxMsToLive)\n        }\n\n        override fun onLost(network: Network) {\n            networkInfos.remove(network)\n            onUpdateNetwork()\n            setUnderlyingNetworks(network)\n            super.onLost(network)\n        }\n\n        override fun onLinkPropertiesChanged(network: Network, linkProperties: LinkProperties) {\n            networkInfos[network]?.dnsList = linkProperties.dnsServers\n            onUpdateNetwork()\n            setUnderlyingNetworks(network)\n            super.onLinkPropertiesChanged(network, linkProperties)\n        }\n    }\n\n\n    override fun onInstall() {\n        onUpdateNetwork()\n        connectivity?.registerNetworkCallback(request, callback)\n    }\n\n    private fun networkToInt(entry: Map.Entry<Network, NetworkInfo>): Int {\n        val capabilities = connectivity?.getNetworkCapabilities(entry.key)\n        return when {\n            capabilities == null -> 100\n            capabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN) -> 90\n            capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI) -> 0\n            capabilities.hasTransport(NetworkCapabilities.TRANSPORT_ETHERNET) -> 1\n            Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && capabilities.hasTransport(\n                TRANSPORT_USB\n            ) -> 2\n\n            capabilities.hasTransport(NetworkCapabilities.TRANSPORT_BLUETOOTH) -> 3\n            capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR) -> 4\n            Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM && capabilities.hasTransport(\n                TRANSPORT_SATELLITE\n            ) -> 5\n\n            else -> 20\n        } + (if (entry.value.isAvailable()) 0 else 10)\n    }\n\n    fun onUpdateNetwork() {\n        val dnsList = (networkInfos.asSequence().minByOrNull { networkToInt(it) }?.value?.dnsList\n            ?: emptyList()).map { x -> x.asSocketAddressText(53) }\n        if (dnsList == preDnsList) {\n            return\n        }\n        preDnsList = dnsList\n        Core.updateDNS(dnsList.toSet().joinToString(\",\"))\n    }\n\n    fun setUnderlyingNetworks(network: Network) {\n//        if (service is VpnService && Build.VERSION.SDK_INT in 22..28) {\n//            service.setUnderlyingNetworks(arrayOf(network))\n//        }\n    }\n\n    override fun onUninstall() {\n        connectivity?.unregisterNetworkCallback(callback)\n        networkInfos.clear()\n        onUpdateNetwork()\n    }\n}\n\nfun InetAddress.asSocketAddressText(port: Int): String {\n    return when (this) {\n        is Inet6Address -> \"[${numericToTextFormat(this)}]:$port\"\n\n        is Inet4Address -> \"${this.hostAddress}:$port\"\n\n        else -> throw IllegalArgumentException(\"Unsupported Inet type ${this.javaClass}\")\n    }\n}\n\nprivate fun numericToTextFormat(address: Inet6Address): String {\n    val src = address.address\n    val sb = StringBuilder(39)\n    for (i in 0 until 8) {\n        sb.append(\n            Integer.toHexString(\n                src[i shl 1].toInt() shl 8 and 0xff00 or (src[(i shl 1) + 1].toInt() and 0xff)\n            )\n        )\n        if (i < 7) {\n            sb.append(\":\")\n        }\n    }\n    if (address.scopeId > 0) {\n        sb.append(\"%\")\n        sb.append(address.scopeId)\n    }\n    return sb.toString()\n}"
  },
  {
    "path": "android/service/src/main/java/com/follow/clash/service/modules/NotificationModule.kt",
    "content": "package com.follow.clash.service.modules\n\nimport android.app.Notification.FOREGROUND_SERVICE_IMMEDIATE\nimport android.app.Service\nimport android.app.Service.STOP_FOREGROUND_REMOVE\nimport android.content.Intent\nimport android.os.Build\nimport android.os.PowerManager\nimport androidx.core.app.NotificationCompat\nimport androidx.core.content.getSystemService\nimport com.follow.clash.common.Components\nimport com.follow.clash.common.GlobalState\nimport com.follow.clash.common.QuickAction\nimport com.follow.clash.common.quickIntent\nimport com.follow.clash.common.receiveBroadcastFlow\nimport com.follow.clash.common.startForeground\nimport com.follow.clash.common.tickerFlow\nimport com.follow.clash.common.toPendingIntent\nimport com.follow.clash.core.Core\nimport com.follow.clash.service.R\nimport com.follow.clash.service.State\nimport com.follow.clash.service.models.NotificationParams\nimport com.follow.clash.service.models.getSpeedTrafficText\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.cancel\nimport kotlinx.coroutines.flow.combine\nimport kotlinx.coroutines.flow.distinctUntilChanged\nimport kotlinx.coroutines.flow.filter\nimport kotlinx.coroutines.flow.map\nimport kotlinx.coroutines.flow.onStart\nimport kotlinx.coroutines.launch\n\ndata class ExtendedNotificationParams(\n    val title: String,\n    val stopText: String,\n    val onlyStatisticsProxy: Boolean,\n    val contentText: String,\n)\n\nval NotificationParams.extended: ExtendedNotificationParams\n    get() = ExtendedNotificationParams(\n        title, stopText, onlyStatisticsProxy, Core.getSpeedTrafficText(onlyStatisticsProxy)\n    )\n\nclass NotificationModule(private val service: Service) : Module() {\n    private val scope = CoroutineScope(Dispatchers.Default)\n\n    override fun onInstall() {\n        scope.launch {\n            val screenFlow = service.receiveBroadcastFlow {\n                addAction(Intent.ACTION_SCREEN_ON)\n                addAction(Intent.ACTION_SCREEN_OFF)\n            }.map { intent ->\n                intent.action == Intent.ACTION_SCREEN_ON\n            }.onStart {\n                emit(isScreenOn())\n            }\n\n            combine(\n                tickerFlow(1000, 0), State.notificationParamsFlow, screenFlow\n            ) { _, params, screenOn ->\n                params?.extended to screenOn\n            }.filter { (params, screenOn) -> params != null && screenOn }\n                .distinctUntilChanged { old, new -> old.first == new.first && old.second == new.second }\n                .collect { (params, _) ->\n                    update(params!!)\n                }\n\n            State.notificationParamsFlow.value?.let {\n                update(it.extended)\n            } ?: run {\n                update(NotificationParams().extended)\n            }\n        }\n    }\n\n    private fun isScreenOn(): Boolean {\n        val pm = service.getSystemService<PowerManager>()\n        return when (pm != null) {\n            true -> pm.isInteractive\n            false -> true\n        }\n    }\n\n    private val notificationBuilder: NotificationCompat.Builder by lazy {\n        val intent = Intent().setComponent(Components.MAIN_ACTIVITY)\n        with(\n            NotificationCompat.Builder(\n                service, GlobalState.NOTIFICATION_CHANNEL\n            )\n        ) {\n            setSmallIcon(R.drawable.ic)\n            setContentTitle(\"FlClash\")\n            setContentIntent(intent.toPendingIntent)\n            setPriority(NotificationCompat.PRIORITY_HIGH)\n            setCategory(NotificationCompat.CATEGORY_SERVICE)\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {\n                foregroundServiceBehavior = FOREGROUND_SERVICE_IMMEDIATE\n            }\n            setOngoing(true)\n            setShowWhen(true)\n            setOnlyAlertOnce(true)\n        }\n    }\n\n    private fun update(params: ExtendedNotificationParams) {\n        service.startForeground(\n            with(notificationBuilder) {\n                setContentTitle(params.title)\n                setContentText(params.contentText)\n                clearActions()\n                addAction(\n                    0, params.stopText, QuickAction.STOP.quickIntent.toPendingIntent\n                ).build()\n            })\n    }\n\n    override fun onUninstall() {\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {\n            service.stopForeground(STOP_FOREGROUND_REMOVE)\n        } else {\n            service.stopForeground(true)\n        }\n        scope.cancel()\n    }\n}"
  },
  {
    "path": "android/service/src/main/java/com/follow/clash/service/modules/SuspendModule.kt",
    "content": "package com.follow.clash.service.modules\n\nimport android.app.Service\nimport android.content.Intent\nimport android.os.PowerManager\nimport androidx.core.content.getSystemService\nimport com.follow.clash.common.receiveBroadcastFlow\nimport com.follow.clash.core.Core\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.cancel\nimport kotlinx.coroutines.flow.map\nimport kotlinx.coroutines.flow.onStart\nimport kotlinx.coroutines.launch\n\n\nclass SuspendModule(private val service: Service) : Module() {\n    private val scope = CoroutineScope(Dispatchers.Default)\n\n    private fun isScreenOn(): Boolean {\n        val pm = service.getSystemService<PowerManager>()\n        return when (pm != null) {\n            true -> pm.isInteractive\n            false -> true\n        }\n    }\n\n    val isDeviceIdleMode: Boolean\n        get() {\n            return service.getSystemService<PowerManager>()?.isDeviceIdleMode ?: true\n        }\n\n    private fun onUpdate(isScreenOn: Boolean) {\n        if (isScreenOn) {\n            Core.suspended(false)\n            return\n        }\n        Core.suspended(isDeviceIdleMode)\n    }\n\n    override fun onInstall() {\n        scope.launch {\n            val screenFlow = service.receiveBroadcastFlow {\n                addAction(Intent.ACTION_SCREEN_ON)\n                addAction(Intent.ACTION_SCREEN_OFF)\n            }.map { intent ->\n                intent.action == Intent.ACTION_SCREEN_ON\n            }.onStart {\n                emit(isScreenOn())\n            }\n\n            screenFlow.collect {\n                    onUpdate(it)\n                }\n        }\n    }\n\n    override fun onUninstall() {\n        scope.cancel()\n    }\n}"
  },
  {
    "path": "android/service/src/main/res/drawable/ic.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:width=\"240dp\"\n    android:height=\"240dp\"\n    android:viewportWidth=\"240\"\n    android:viewportHeight=\"240\"\n    tools:ignore=\"VectorRaster\">\n  <path\n      android:pathData=\"M48.1,80.89L168.44,11.41c11.08,-6.4 25.24,-2.6 31.64,8.48 0,0 0,0 0,0h0c6.4,11.08 2.6,25.24 -8.48,31.64 0,0 0,0 0,0l-120.34,69.48c-11.08,6.4 -25.24,2.6 -31.64,-8.48 0,0 0,0 0,0h0c-6.4,-11.08 -2.6,-25.24 8.48,-31.64 0,0 0,0 0,0Z\"\n      android:fillColor=\"#FFFFFF\"/>\n  <path\n      android:pathData=\"M78.98,134.37l60.18,-34.74c11.07,-6.39 25.23,-2.59 31.63,8.48h0c6.4,11.07 2.61,25.24 -8.47,31.64l-60.18,34.74c-11.08,6.4 -25.24,2.6 -31.64,-8.48 0,0 0,0 0,0h0c-6.4,-11.08 -2.6,-25.24 8.48,-31.64h0Z\"\n      android:fillColor=\"#FFFFFF\"/>\n  <path\n      android:pathData=\"M109.86,187.86h0c11.08,-6.4 25.24,-2.6 31.64,8.48 0,0 0,0 0,0h0c6.4,11.08 2.6,25.24 -8.48,31.64 0,0 0,0 0,0h0c-11.08,6.4 -25.24,2.6 -31.64,-8.48 0,0 0,0 0,0h0c-6.4,-11.08 -2.6,-25.24 8.48,-31.64 0,0 0,0 0,0Z\"\n      android:fillColor=\"#FFFFFF\"/>\n</vector>\n"
  },
  {
    "path": "android/service/src/main/res/drawable/ic_service.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:width=\"240dp\"\n    android:height=\"240dp\"\n    android:viewportWidth=\"240\"\n    android:viewportHeight=\"240\"\n    tools:ignore=\"VectorRaster\">\n  <path\n      android:pathData=\"M48.1,80.89L168.44,11.41c11.08,-6.4 25.24,-2.6 31.64,8.48 0,0 0,0 0,0h0c6.4,11.08 2.6,25.24 -8.48,31.64 0,0 0,0 0,0l-120.34,69.48c-11.08,6.4 -25.24,2.6 -31.64,-8.48 0,0 0,0 0,0h0c-6.4,-11.08 -2.6,-25.24 8.48,-31.64 0,0 0,0 0,0Z\"\n      android:fillColor=\"#6666FB\"/>\n  <path\n      android:pathData=\"M78.98,134.37l60.18,-34.74c11.07,-6.39 25.23,-2.59 31.63,8.48h0c6.4,11.07 2.61,25.24 -8.47,31.64l-60.18,34.74c-11.08,6.4 -25.24,2.6 -31.64,-8.48 0,0 0,0 0,0h0c-6.4,-11.08 -2.6,-25.24 8.48,-31.64h0Z\"\n      android:fillColor=\"#336AB6\"/>\n  <path\n      android:pathData=\"M109.86,187.86h0c11.08,-6.4 25.24,-2.6 31.64,8.48 0,0 0,0 0,0h0c6.4,11.08 2.6,25.24 -8.48,31.64 0,0 0,0 0,0h0c-11.08,6.4 -25.24,2.6 -31.64,-8.48 0,0 0,0 0,0h0c-6.4,-11.08 -2.6,-25.24 8.48,-31.64 0,0 0,0 0,0Z\"\n      android:fillColor=\"#5CA8E9\"/>\n</vector>\n"
  },
  {
    "path": "android/settings.gradle.kts",
    "content": "pluginManagement {\n    val flutterSdkPath =\n        run {\n            val properties = java.util.Properties()\n            file(\"local.properties\").inputStream().use { properties.load(it) }\n            val flutterSdkPath = properties.getProperty(\"flutter.sdk\")\n            require(flutterSdkPath != null) { \"flutter.sdk not set in local.properties\" }\n            flutterSdkPath\n        }\n\n    includeBuild(\"$flutterSdkPath/packages/flutter_tools/gradle\")\n\n    repositories {\n        google()\n        mavenCentral()\n        gradlePluginPortal()\n    }\n}\n\nplugins {\n    id(\"dev.flutter.flutter-plugin-loader\") version \"1.0.0\"\n    id(\"com.android.application\") version \"8.12.2\" apply false\n    id(\"org.jetbrains.kotlin.android\") version \"2.2.10\" apply false\n    id(\"com.google.gms.google-services\") version (\"4.3.15\") apply false\n    id(\"com.google.firebase.crashlytics\") version (\"2.8.1\") apply false\n}\n\n\ninclude(\":app\")\ninclude(\":core\")\ninclude(\":service\")\ninclude(\":common\")\n"
  },
  {
    "path": "arb/intl_en.arb",
    "content": "{\n  \"rule\": \"Rule\",\n  \"global\": \"Global\",\n  \"direct\": \"Direct\",\n  \"dashboard\": \"Dashboard\",\n  \"proxies\": \"Proxies\",\n  \"profile\": \"Profile\",\n  \"profiles\": \"Profiles\",\n  \"tools\": \"Tools\",\n  \"logs\": \"Logs\",\n  \"logsDesc\": \"Log capture records\",\n  \"resources\": \"Resources\",\n  \"resourcesDesc\": \"External resource related info\",\n  \"trafficUsage\": \"Traffic usage\",\n  \"coreInfo\": \"Core info\",\n  \"networkSpeed\": \"Network speed\",\n  \"outboundMode\": \"Outbound mode\",\n  \"networkDetection\": \"Network detection\",\n  \"upload\": \"Upload\",\n  \"download\": \"Download\",\n  \"noProxy\": \"No proxy\",\n  \"noProxyDesc\": \"Please create a profile or add a valid profile\",\n  \"nullProfileDesc\": \"No profile, Please add a profile\",\n  \"settings\": \"Settings\",\n  \"language\": \"Language\",\n  \"defaultText\": \"Default\",\n  \"more\": \"More\",\n  \"other\": \"Other\",\n  \"about\": \"About\",\n  \"en\": \"English\",\n  \"ja\": \"Japanese\",\n  \"ru\": \"Russian\",\n  \"zh_CN\": \"Simplified Chinese\",\n  \"theme\": \"Theme\",\n  \"themeDesc\": \"Set dark mode,adjust the color\",\n  \"override\": \"Override\",\n  \"overrideDesc\": \"Override Proxy related config\",\n  \"allowLan\": \"AllowLan\",\n  \"allowLanDesc\": \"Allow access proxy through the LAN\",\n  \"tun\": \"TUN\",\n  \"tunDesc\": \"only effective in administrator mode\",\n  \"minimizeOnExit\": \"Minimize on exit\",\n  \"minimizeOnExitDesc\": \"Modify the default system exit event\",\n  \"autoLaunch\": \"Auto launch\",\n  \"autoLaunchDesc\": \"Follow the system self startup\",\n  \"silentLaunch\": \"SilentLaunch\",\n  \"silentLaunchDesc\": \"Start in the background\",\n  \"autoRun\": \"AutoRun\",\n  \"autoRunDesc\": \"Auto run when the application is opened\",\n  \"logcat\": \"Logcat\",\n  \"logcatDesc\": \"Disabling will hide the log entry\",\n  \"autoCheckUpdate\": \"Auto check updates\",\n  \"autoCheckUpdateDesc\": \"Auto check for updates when the app starts\",\n  \"accessControl\": \"AccessControl\",\n  \"accessControlDesc\": \"Configure application access proxy\",\n  \"application\": \"Application\",\n  \"applicationDesc\": \"Modify application related settings\",\n  \"edit\": \"Edit\",\n  \"confirm\": \"Confirm\",\n  \"update\": \"Update\",\n  \"add\": \"Add\",\n  \"save\": \"Save\",\n  \"delete\": \"Delete\",\n  \"years\": \"Years\",\n  \"months\": \"Months\",\n  \"hours\": \"Hours\",\n  \"days\": \"Days\",\n  \"minutes\": \"Minutes\",\n  \"seconds\": \"Seconds\",\n  \"ago\": \" Ago\",\n  \"just\": \"Just\",\n  \"qrcode\": \"QR code\",\n  \"qrcodeDesc\": \"Scan QR code to obtain profile\",\n  \"url\": \"URL\",\n  \"urlDesc\": \"Obtain profile through URL\",\n  \"file\": \"File\",\n  \"fileDesc\": \"Directly upload profile\",\n  \"name\": \"Name\",\n  \"profileNameNullValidationDesc\": \"Please input the profile name\",\n  \"profileUrlNullValidationDesc\": \"Please input the profile URL\",\n  \"profileUrlInvalidValidationDesc\": \"Please input a valid profile URL\",\n  \"autoUpdate\": \"Auto update\",\n  \"autoUpdateInterval\": \"Auto update interval (minutes)\",\n  \"profileAutoUpdateIntervalNullValidationDesc\": \"Please enter the auto update interval time\",\n  \"profileAutoUpdateIntervalInvalidValidationDesc\": \"Please input a valid interval time format\",\n  \"themeMode\": \"Theme mode\",\n  \"themeColor\": \"Theme color\",\n  \"preview\": \"Preview\",\n  \"auto\": \"Auto\",\n  \"light\": \"Light\",\n  \"dark\": \"Dark\",\n  \"importFromURL\": \"Import from URL\",\n  \"submit\": \"Submit\",\n  \"doYouWantToPass\": \"Do you want to pass\",\n  \"create\": \"Create\",\n  \"defaultSort\": \"Sort by default\",\n  \"delaySort\": \"Sort by delay\",\n  \"nameSort\": \"Sort by name\",\n  \"pleaseUploadFile\": \"Please upload file\",\n  \"pleaseUploadValidQrcode\": \"Please upload a valid QR code\",\n  \"blacklistMode\": \"Blacklist mode\",\n  \"whitelistMode\": \"Whitelist mode\",\n  \"filterSystemApp\": \"Filter system app\",\n  \"cancelFilterSystemApp\": \"Cancel filter system app\",\n  \"selectAll\": \"Select all\",\n  \"cancelSelectAll\": \"Cancel select all\",\n  \"appAccessControl\": \"App access control\",\n  \"accessControlAllowDesc\": \"Only allow selected app to enter VPN\",\n  \"accessControlNotAllowDesc\": \"The selected application will be excluded from VPN\",\n  \"selected\": \"Selected\",\n  \"unableToUpdateCurrentProfileDesc\": \"unable to update current profile\",\n  \"noMoreInfoDesc\": \"No more info\",\n  \"profileParseErrorDesc\": \"profile parse error\",\n  \"proxyPort\": \"ProxyPort\",\n  \"proxyPortDesc\": \"Set the Clash listening port\",\n  \"port\": \"Port\",\n  \"logLevel\": \"LogLevel\",\n  \"show\": \"Show\",\n  \"exit\": \"Exit\",\n  \"systemProxy\": \"System proxy\",\n  \"project\": \"Project\",\n  \"core\": \"Core\",\n  \"tabAnimation\": \"Tab animation\",\n  \"desc\": \"A multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free.\",\n  \"startVpn\": \"Starting VPN...\",\n  \"stopVpn\": \"Stopping VPN...\",\n  \"discovery\": \"Discovery a new version\",\n  \"compatible\": \"Compatibility mode\",\n  \"compatibleDesc\": \"Opening it will lose part of its application ability and gain the support of full amount of Clash.\",\n  \"notSelectedTip\": \"The current proxy group cannot be selected.\",\n  \"tip\": \"tip\",\n  \"account\": \"Account\",\n  \"backup\": \"Backup\",\n  \"backupSuccess\": \"Backup success\",\n  \"noInfo\": \"No info\",\n  \"pleaseBindWebDAV\": \"Please bind WebDAV\",\n  \"bind\": \"Bind\",\n  \"connectivity\": \"Connectivity：\",\n  \"webDAVConfiguration\": \"WebDAV configuration\",\n  \"address\": \"Address\",\n  \"addressHelp\": \"WebDAV server address\",\n  \"addressTip\": \"Please enter a valid WebDAV address\",\n  \"password\": \"Password\",\n  \"checkUpdate\": \"Check for updates\",\n  \"discoverNewVersion\": \"Discover the new version\",\n  \"checkUpdateError\": \"The current application is already the latest version\",\n  \"goDownload\": \"Go to download\",\n  \"unknown\": \"Unknown\",\n  \"geoData\": \"GeoData\",\n  \"externalResources\": \"External resources\",\n  \"checking\": \"Checking...\",\n  \"country\": \"Country\",\n  \"checkError\": \"Check error\",\n  \"search\": \"Search\",\n  \"allowBypass\": \"Allow applications to bypass VPN\",\n  \"allowBypassDesc\": \"Some apps can bypass VPN when turned on\",\n  \"externalController\": \"ExternalController\",\n  \"externalControllerDesc\": \"Once enabled, the Clash kernel can be controlled on port 9090\",\n  \"ipv6Desc\": \"When turned on it will be able to receive IPv6 traffic\",\n  \"app\": \"App\",\n  \"general\": \"General\",\n  \"vpnSystemProxyDesc\": \"Attach HTTP proxy to VpnService\",\n  \"systemProxyDesc\": \"Attach HTTP proxy to VpnService\",\n  \"unifiedDelay\": \"Unified delay\",\n  \"unifiedDelayDesc\": \"Remove extra delays such as handshaking\",\n  \"tcpConcurrent\": \"TCP concurrent\",\n  \"tcpConcurrentDesc\": \"Enabling it will allow TCP concurrency\",\n  \"geodataLoader\": \"Geo Low Memory Mode\",\n  \"geodataLoaderDesc\": \"Enabling will use the Geo low memory loader\",\n  \"requests\": \"Requests\",\n  \"requestsDesc\": \"View recently request records\",\n  \"findProcessMode\": \"Find process\",\n  \"init\": \"Init\",\n  \"infiniteTime\": \"Long term effective\",\n  \"expirationTime\": \"Expiration time\",\n  \"connections\": \"Connections\",\n  \"connectionsDesc\": \"View current connections data\",\n  \"intranetIP\": \"Intranet IP\",\n  \"view\": \"View\",\n  \"cut\": \"Cut\",\n  \"copy\": \"Copy\",\n  \"paste\": \"Paste\",\n  \"testUrl\": \"Test url\",\n  \"sync\": \"Sync\",\n  \"exclude\": \"Hidden from recent tasks\",\n  \"excludeDesc\": \"When the app is in the background, the app is hidden from the recent task\",\n  \"oneColumn\": \"One column\",\n  \"twoColumns\": \"Two columns\",\n  \"threeColumns\": \"Three columns\",\n  \"fourColumns\": \"Four columns\",\n  \"expand\": \"Standard\",\n  \"shrink\": \"Shrink\",\n  \"min\": \"Min\",\n  \"tab\": \"Tab\",\n  \"list\": \"List\",\n  \"delay\": \"Delay\",\n  \"style\": \"Style\",\n  \"size\": \"Size\",\n  \"sort\": \"Sort\",\n  \"columns\": \"Columns\",\n  \"proxiesSetting\": \"Proxies setting\",\n  \"proxyGroup\": \"Proxy group\",\n  \"go\": \"Go\",\n  \"externalLink\": \"External link\",\n  \"otherContributors\": \"Other contributors\",\n  \"autoCloseConnections\": \"Auto close connections\",\n  \"autoCloseConnectionsDesc\": \"Auto close connections after change node\",\n  \"onlyStatisticsProxy\": \"Only statistics proxy\",\n  \"onlyStatisticsProxyDesc\": \"When turned on, only statistics proxy traffic\",\n  \"pureBlackMode\": \"Pure black mode\",\n  \"keepAliveIntervalDesc\": \"Tcp keep alive interval\",\n  \"entries\": \" entries\",\n  \"local\": \"Local\",\n  \"remote\": \"Remote\",\n  \"remoteBackupDesc\": \"Backup local data to WebDAV\",\n  \"localBackupDesc\": \"Backup local data to local\",\n  \"mode\": \"Mode\",\n  \"time\": \"Time\",\n  \"source\": \"Source\",\n  \"allApps\": \"All apps\",\n  \"onlyOtherApps\": \"Only third-party apps\",\n  \"action\": \"Action\",\n  \"intelligentSelected\": \"Intelligent selection\",\n  \"clipboardImport\": \"Clipboard import\",\n  \"clipboardExport\": \"Export clipboard\",\n  \"layout\": \"Layout\",\n  \"tight\": \"Tight\",\n  \"standard\": \"Standard\",\n  \"loose\": \"Loose\",\n  \"profilesSort\": \"Profiles sort\",\n  \"start\": \"Start\",\n  \"stop\": \"Stop\",\n  \"appDesc\": \"Processing app related settings\",\n  \"vpnDesc\": \"Modify VPN related settings\",\n  \"dnsDesc\": \"Update DNS related settings\",\n  \"key\": \"Key\",\n  \"value\": \"Value\",\n  \"hostsDesc\": \"Add Hosts\",\n  \"vpnTip\": \"Changes take effect after restarting the VPN\",\n  \"vpnEnableDesc\": \"Auto routes all system traffic through VpnService\",\n  \"options\": \"Options\",\n  \"loopback\": \"Loopback unlock tool\",\n  \"loopbackDesc\": \"Used for UWP loopback unlocking\",\n  \"providers\": \"Providers\",\n  \"proxyProviders\": \"Proxy providers\",\n  \"ruleProviders\": \"Rule providers\",\n  \"overrideDns\": \"Override Dns\",\n  \"overrideDnsDesc\": \"Turning it on will override the DNS options in the profile\",\n  \"status\": \"Status\",\n  \"statusDesc\": \"System DNS will be used when turned off\",\n  \"preferH3Desc\": \"Prioritize the use of DOH's http/3\",\n  \"respectRules\": \"Respect rules\",\n  \"respectRulesDesc\": \"DNS connection following rules, need to configure proxy-server-nameserver\",\n  \"dnsMode\": \"DNS mode\",\n  \"fakeipRange\": \"Fakeip range\",\n  \"fakeipFilter\": \"Fakeip filter\",\n  \"defaultNameserver\": \"Default nameserver\",\n  \"defaultNameserverDesc\": \"For resolving DNS server\",\n  \"nameserver\": \"Nameserver\",\n  \"nameserverDesc\": \"For resolving domain\",\n  \"useHosts\": \"Use hosts\",\n  \"useSystemHosts\": \"Use system hosts\",\n  \"nameserverPolicy\": \"Nameserver policy\",\n  \"nameserverPolicyDesc\": \"Specify the corresponding nameserver policy\",\n  \"proxyNameserver\": \"Proxy nameserver\",\n  \"proxyNameserverDesc\": \"Domain for resolving proxy nodes\",\n  \"fallback\": \"Fallback\",\n  \"fallbackDesc\": \"Generally use offshore DNS\",\n  \"fallbackFilter\": \"Fallback filter\",\n  \"geoipCode\": \"Geoip code\",\n  \"ipcidr\": \"Ipcidr\",\n  \"domain\": \"Domain\",\n  \"reset\": \"Reset\",\n  \"action_view\": \"Show/Hide\",\n  \"action_start\": \"Start/Stop\",\n  \"action_mode\": \"Switch mode\",\n  \"action_proxy\": \"System proxy\",\n  \"action_tun\": \"TUN\",\n  \"disclaimer\": \"Disclaimer\",\n  \"disclaimerDesc\": \"This software is only used for non-commercial purposes such as learning exchanges and scientific research. It is strictly prohibited to use this software for commercial purposes. Any commercial activity, if any, has nothing to do with this software.\",\n  \"agree\": \"Agree\",\n  \"hotkeyManagement\": \"Hotkey Management\",\n  \"hotkeyManagementDesc\": \"Use keyboard to control applications\",\n  \"pressKeyboard\": \"Please press the keyboard.\",\n  \"inputCorrectHotkey\": \"Please enter the correct hotkey\",\n  \"hotkeyConflict\": \"Hotkey conflict\",\n  \"remove\": \"Remove\",\n  \"noHotKey\": \"No HotKey\",\n  \"noNetwork\": \"No network\",\n  \"ipv6InboundDesc\": \"Allow IPv6 inbound\",\n  \"exportLogs\": \"Export logs\",\n  \"exportSuccess\": \"Export Success\",\n  \"iconStyle\": \"Icon style\",\n  \"onlyIcon\": \"Icon\",\n  \"noIcon\": \"None\",\n  \"stackMode\": \"Stack mode\",\n  \"network\": \"Network\",\n  \"networkDesc\": \"Modify network-related settings\",\n  \"bypassDomain\": \"Bypass domain\",\n  \"bypassDomainDesc\": \"Only takes effect when the system proxy is enabled\",\n  \"resetTip\": \"Make sure to reset\",\n  \"regExp\": \"RegExp\",\n  \"icon\": \"Icon\",\n  \"iconConfiguration\": \"Icon configuration\",\n  \"noData\": \"No data\",\n  \"adminAutoLaunch\": \"Admin auto launch\",\n  \"adminAutoLaunchDesc\": \"Boot up by using admin mode\",\n  \"fontFamily\": \"FontFamily\",\n  \"systemFont\": \"System font\",\n  \"toggle\": \"Toggle\",\n  \"system\": \"System\",\n  \"routeMode\": \"Route mode\",\n  \"routeMode_bypassPrivate\": \"Bypass private route address\",\n  \"routeMode_config\": \"Use config\",\n  \"routeAddress\": \"Route address\",\n  \"routeAddressDesc\": \"Config listen route address\",\n  \"pleaseInputAdminPassword\": \"Please enter the admin password\",\n  \"copyEnvVar\": \"Copying environment variables\",\n  \"memoryInfo\": \"Memory info\",\n  \"cancel\": \"Cancel\",\n  \"fileIsUpdate\": \"The file has been modified. Do you want to save the changes?\",\n  \"profileHasUpdate\": \"The profile has been modified. Do you want to disable auto update?\",\n  \"hasCacheChange\": \"Do you want to cache the changes?\",\n  \"copySuccess\": \"Copy success\",\n  \"copyLink\": \"Copy link\",\n  \"exportFile\": \"Export file\",\n  \"cacheCorrupt\": \"The cache is corrupt. Do you want to clear it?\",\n  \"detectionTip\": \"Relying on third-party api is for reference only\",\n  \"listen\": \"Listen\",\n  \"undo\": \"undo\",\n  \"redo\": \"redo\",\n  \"none\": \"none\",\n  \"basicConfig\": \"Basic configuration\",\n  \"basicConfigDesc\": \"Modify the basic configuration globally\",\n  \"advancedConfig\": \"Advanced configuration\",\n  \"advancedConfigDesc\": \"Provide diverse configuration options\",\n  \"selectedCountTitle\": \"{count} items have been selected\",\n  \"addRule\": \"Add rule\",\n  \"ruleName\": \"Rule name\",\n  \"content\": \"Content\",\n  \"subRule\": \"Sub rule\",\n  \"ruleTarget\": \"Rule target\",\n  \"sourceIp\": \"Source IP\",\n  \"noResolve\": \"No resolve IP\",\n  \"getOriginRules\": \"Get original rules\",\n  \"overrideOriginRules\": \"Override the original rule\",\n  \"addedOriginRules\": \"Attach on the original rules\",\n  \"enableOverride\": \"Enable override\",\n  \"saveChanges\": \"Do you want to save the changes?\",\n  \"generalDesc\": \"Modify general settings\",\n  \"findProcessModeDesc\": \"There is a certain performance loss after opening\",\n  \"tabAnimationDesc\": \"Effective only in mobile view\",\n  \"saveTip\": \"Are you sure you want to save?\",\n  \"colorSchemes\": \"Color schemes\",\n  \"palette\": \"Palette\",\n  \"tonalSpotScheme\": \"TonalSpot\",\n  \"fidelityScheme\": \"Fidelity\",\n  \"monochromeScheme\": \"Monochrome\",\n  \"neutralScheme\": \"Neutral\",\n  \"vibrantScheme\": \"Vibrant\",\n  \"expressiveScheme\": \"Expressive\",\n  \"contentScheme\": \"Content\",\n  \"rainbowScheme\": \"Rainbow\",\n  \"fruitSaladScheme\": \"FruitSalad\",\n  \"developerMode\": \"Developer mode\",\n  \"developerModeEnableTip\": \"Developer mode is enabled.\",\n  \"messageTest\": \"Message test\",\n  \"messageTestTip\": \"This is a message.\",\n  \"crashTest\": \"Crash test\",\n  \"clearData\": \"Clear Data\",\n  \"textScale\": \"Text Scaling\",\n  \"internet\": \"Internet\",\n  \"systemApp\": \"System APP\",\n  \"noNetworkApp\": \"No network APP\",\n  \"contactMe\": \"Contact me\",\n  \"restoreStrategy\": \"Restore strategy\",\n  \"restoreStrategy_override\": \"Override\",\n  \"restoreStrategy_compatible\": \"Compatible\",\n  \"logsTest\": \"Logs test\",\n  \"emptyTip\": \"{label} cannot be empty\",\n  \"urlTip\": \"{label} must be a url\",\n  \"numberTip\": \"{label} must be a number\",\n  \"interval\": \"Interval\",\n  \"existsTip\": \"Current {label} already exists\",\n  \"deleteTip\": \"Are you sure you want to delete the current {label}?\",\n  \"deleteMultipTip\": \"Are you sure you want to delete the selected {label}?\",\n  \"nullTip\": \"No {label} yet\",\n  \"script\": \"Script\",\n  \"color\": \"Color\",\n  \"rename\": \"Rename\",\n  \"unnamed\": \"Unnamed\",\n  \"pleaseEnterScriptName\": \"Please enter a script name\",\n  \"overrideInvalidTip\": \"Does not take effect in script mode\",\n  \"mixedPort\": \"Mixed Port\",\n  \"socksPort\": \"Socks Port\",\n  \"redirPort\": \"Redir Port\",\n  \"tproxyPort\": \"Tproxy Port\",\n  \"portTip\": \"{label} must be between 1024 and 49151\",\n  \"portConflictTip\": \"Please enter a different port\",\n  \"import\": \"Import\",\n  \"importFile\": \"Import from file\",\n  \"importUrl\": \"Import from URL\",\n  \"autoSetSystemDns\": \"Auto set system DNS\",\n  \"details\": \"{label} details\",\n  \"creationTime\": \"Creation time\",\n  \"process\": \"Process\",\n  \"host\": \"Host\",\n  \"destination\": \"Destination\",\n  \"destinationGeoIP\": \"Destination GeoIP\",\n  \"destinationIPASN\": \"Destination IPASN\",\n  \"specialProxy\": \"Special proxy\",\n  \"specialRules\": \"special rules\",\n  \"remoteDestination\": \"Remote destination\",\n  \"networkType\": \"Network type\",\n  \"proxyChains\": \"Proxy chains\",\n  \"log\": \"Log\",\n  \"connection\": \"Connection\",\n  \"request\": \"Request\",\n  \"connected\": \"Connected\",\n  \"disconnected\": \"Disconnected\",\n  \"connecting\": \"Connecting...\",\n  \"restartCoreTip\": \"Are you sure you want to restart the core?\",\n  \"forceRestartCoreTip\": \"Are you sure you want to force restart the core?\",\n  \"dnsHijacking\": \"DNS hijacking\",\n  \"coreStatus\": \"Core status\",\n  \"dataCollectionTip\": \"Data Collection Notice\",\n  \"dataCollectionContent\": \"This app uses Firebase Crashlytics to collect crash information to improve app stability.\\nThe collected data includes device information and crash details, but does not contain personal sensitive data.\\nYou can disable this feature in settings.\",\n  \"crashlytics\": \"Crash Analysis\",\n  \"crashlyticsTip\": \"When enabled, automatically uploads crash logs without sensitive information when the app crashes\",\n  \"appendSystemDns\": \"Append System DNS\",\n  \"appendSystemDnsTip\": \"Forcefully append system DNS to the configuration\",\n  \"editRule\": \"Edit rule\",\n  \"overrideMode\": \"Override mode\",\n  \"standardModeDesc\": \"Standard mode, override basic configuration, provide simple rule addition capability\",\n  \"scriptModeDesc\": \"Script mode, use external extension scripts, provide one-click override configuration capability\",\n  \"addedRules\": \"Added rules\",\n  \"controlGlobalAddedRules\": \"Control global added rules\",\n  \"overrideScript\": \"Override script\",\n  \"goToConfigureScript\": \"Go to configure script\",\n  \"editGlobalRules\": \"Edit global rules\",\n  \"externalFetch\": \"External fetch\",\n  \"confirmForceCrashCore\": \"Are you sure you want to force crash the core?\",\n  \"confirmClearAllData\": \"Are you sure you want to clear all data?\",\n  \"loading\": \"Loading...\",\n  \"loadTest\": \"Load test\",\n  \"yearsAgo\": \"{count, plural, =1{1 year ago} other{{count} years ago}}\",\n  \"monthsAgo\": \"{count, plural, =1{1 month ago} other{{count} months ago}}\",\n  \"daysAgo\": \"{count, plural, =1{1 day ago} other{{count} days ago}}\",\n  \"hoursAgo\": \"{count, plural, =1{1 hour ago} other{{count} hours ago}}\",\n  \"minutesAgo\": \"{count, plural, =1{1 minute ago} other{{count} minutes ago}}\",\n  \"justNow\": \"Just now\",\n  \"noLongerRemind\": \"Don't remind again\",\n  \"accessControlSettings\": \"Access Control Settings\",\n  \"turnOn\": \"Turn On\",\n  \"turnOff\": \"Turn Off\",\n  \"coreConfigChangeDetected\": \"Core configuration change detected\",\n  \"reload\": \"Reload\",\n  \"vpnConfigChangeDetected\": \"VPN configuration change detected\",\n  \"restart\": \"Restart\",\n  \"speedStatistics\": \"Speed statistics\",\n  \"resetPageChangesTip\": \"The current page has changes. Are you sure you want to reset?\",\n  \"overwriteTypeCustom\": \"Custom\",\n  \"overwriteTypeCustomDesc\": \"Custom mode, fully customize proxy groups and rules\",\n  \"unknownNetworkError\": \"Unknown network error\",\n  \"networkRequestException\": \"Network request exception, please try again later.\",\n  \"restoreException\": \"Recovery exception\",\n  \"networkException\": \"Network exception, please check your connection and try again\",\n  \"invalidBackupFile\": \"Invalid backup file\",\n  \"pruneCache\": \"Prune cache\",\n  \"backupAndRestore\": \"Backup and Restore\",\n  \"backupAndRestoreDesc\": \"Sync data via WebDAV or files\",\n  \"restore\": \"Restore\",\n  \"restoreSuccess\": \"Restore success\",\n  \"restoreFromWebDAVDesc\": \"Restore data via WebDAV\",\n  \"restoreFromFileDesc\": \"Restore data via file\",\n  \"restoreOnlyConfig\": \"Restore configuration files only\",\n  \"restoreAllData\": \"Restore all data\",\n  \"addProfile\": \"Add Profile\",\n  \"delayTest\": \"Delay Test\"\n}"
  },
  {
    "path": "arb/intl_ja.arb",
    "content": "{\n  \"rule\": \"ルール\",\n  \"global\": \"グローバル\",\n  \"direct\": \"ダイレクト\",\n  \"dashboard\": \"ダッシュボード\",\n  \"proxies\": \"プロキシ\",\n  \"profile\": \"プロファイル\",\n  \"profiles\": \"プロファイル一覧\",\n  \"tools\": \"ツール\",\n  \"logs\": \"ログ\",\n  \"logsDesc\": \"ログキャプチャ記録\",\n  \"resources\": \"リソース\",\n  \"resourcesDesc\": \"外部リソース関連情報\",\n  \"trafficUsage\": \"トラフィック使用量\",\n  \"coreInfo\": \"コア情報\",\n  \"networkSpeed\": \"ネットワーク速度\",\n  \"outboundMode\": \"アウトバウンドモード\",\n  \"networkDetection\": \"ネットワーク検出\",\n  \"upload\": \"アップロード\",\n  \"download\": \"ダウンロード\",\n  \"noProxy\": \"プロキシなし\",\n  \"noProxyDesc\": \"プロファイルを作成するか、有効なプロファイルを追加してください\",\n  \"nullProfileDesc\": \"プロファイルがありません。追加してください\",\n  \"settings\": \"設定\",\n  \"language\": \"言語\",\n  \"defaultText\": \"デフォルト\",\n  \"more\": \"詳細\",\n  \"other\": \"その他\",\n  \"about\": \"について\",\n  \"en\": \"英語\",\n  \"ja\": \"日本語\",\n  \"ru\": \"ロシア語\",\n  \"zh_CN\": \"簡体字中国語\",\n  \"theme\": \"テーマ\",\n  \"themeDesc\": \"ダークモードの設定、色の調整\",\n  \"override\": \"上書き\",\n  \"overrideDesc\": \"プロキシ関連設定を上書き\",\n  \"allowLan\": \"LANを許可\",\n  \"allowLanDesc\": \"LAN経由でのプロキシアクセスを許可\",\n  \"tun\": \"TUN\",\n  \"tunDesc\": \"管理者モードでのみ有効\",\n  \"minimizeOnExit\": \"終了時に最小化\",\n  \"minimizeOnExitDesc\": \"システムの終了イベントを変更\",\n  \"autoLaunch\": \"自動起動\",\n  \"autoLaunchDesc\": \"システムの自動起動に従う\",\n  \"silentLaunch\": \"バックグラウンド起動\",\n  \"silentLaunchDesc\": \"バックグラウンドで起動\",\n  \"autoRun\": \"自動実行\",\n  \"autoRunDesc\": \"アプリ起動時に自動実行\",\n  \"logcat\": \"ログキャット\",\n  \"logcatDesc\": \"無効化するとログエントリを非表示\",\n  \"autoCheckUpdate\": \"自動更新チェック\",\n  \"autoCheckUpdateDesc\": \"起動時に更新を自動チェック\",\n  \"accessControl\": \"アクセス制御\",\n  \"accessControlDesc\": \"アプリケーションのプロキシアクセスを設定\",\n  \"application\": \"アプリケーション\",\n  \"applicationDesc\": \"アプリ関連設定を変更\",\n  \"edit\": \"編集\",\n  \"confirm\": \"確認\",\n  \"update\": \"更新\",\n  \"add\": \"追加\",\n  \"save\": \"保存\",\n  \"delete\": \"削除\",\n  \"years\": \"年\",\n  \"months\": \"月\",\n  \"hours\": \"時間\",\n  \"days\": \"日\",\n  \"minutes\": \"分\",\n  \"seconds\": \"秒\",\n  \"ago\": \"前\",\n  \"just\": \"たった今\",\n  \"qrcode\": \"QRコード\",\n  \"qrcodeDesc\": \"QRコードをスキャンしてプロファイルを取得\",\n  \"url\": \"URL\",\n  \"urlDesc\": \"URL経由でプロファイルを取得\",\n  \"file\": \"ファイル\",\n  \"fileDesc\": \"プロファイルを直接アップロード\",\n  \"name\": \"名前\",\n  \"profileNameNullValidationDesc\": \"プロファイル名を入力してください\",\n  \"profileUrlNullValidationDesc\": \"プロファイルURLを入力してください\",\n  \"profileUrlInvalidValidationDesc\": \"有効なプロファイルURLを入力してください\",\n  \"autoUpdate\": \"自動更新\",\n  \"autoUpdateInterval\": \"自動更新間隔（分）\",\n  \"profileAutoUpdateIntervalNullValidationDesc\": \"自動更新間隔を入力してください\",\n  \"profileAutoUpdateIntervalInvalidValidationDesc\": \"有効な間隔形式を入力してください\",\n  \"themeMode\": \"テーマモード\",\n  \"themeColor\": \"テーマカラー\",\n  \"preview\": \"プレビュー\",\n  \"auto\": \"自動\",\n  \"light\": \"ライト\",\n  \"dark\": \"ダーク\",\n  \"importFromURL\": \"URLからインポート\",\n  \"submit\": \"送信\",\n  \"doYouWantToPass\": \"通過させますか？\",\n  \"create\": \"作成\",\n  \"defaultSort\": \"デフォルト順\",\n  \"delaySort\": \"遅延順\",\n  \"nameSort\": \"名前順\",\n  \"pleaseUploadFile\": \"ファイルをアップロードしてください\",\n  \"pleaseUploadValidQrcode\": \"有効なQRコードをアップロードしてください\",\n  \"blacklistMode\": \"ブラックリストモード\",\n  \"whitelistMode\": \"ホワイトリストモード\",\n  \"filterSystemApp\": \"システムアプリを除外\",\n  \"cancelFilterSystemApp\": \"システムアプリの除外を解除\",\n  \"selectAll\": \"すべて選択\",\n  \"cancelSelectAll\": \"全選択解除\",\n  \"appAccessControl\": \"アプリアクセス制御\",\n  \"accessControlAllowDesc\": \"選択したアプリのみVPNを許可\",\n  \"accessControlNotAllowDesc\": \"選択したアプリをVPNから除外\",\n  \"selected\": \"選択済み\",\n  \"unableToUpdateCurrentProfileDesc\": \"現在のプロファイルを更新できません\",\n  \"noMoreInfoDesc\": \"追加情報なし\",\n  \"profileParseErrorDesc\": \"プロファイル解析エラー\",\n  \"proxyPort\": \"プロキシポート\",\n  \"proxyPortDesc\": \"Clashのリスニングポートを設定\",\n  \"port\": \"ポート\",\n  \"logLevel\": \"ログレベル\",\n  \"show\": \"表示\",\n  \"exit\": \"終了\",\n  \"systemProxy\": \"システムプロキシ\",\n  \"project\": \"プロジェクト\",\n  \"core\": \"コア\",\n  \"tabAnimation\": \"タブアニメーション\",\n  \"desc\": \"ClashMetaベースのマルチプラットフォームプロキシクライアント。シンプルで使いやすく、オープンソースで広告なし。\",\n  \"startVpn\": \"VPNを開始中...\",\n  \"stopVpn\": \"VPNを停止中...\",\n  \"discovery\": \"新しいバージョンを発見\",\n  \"compatible\": \"互換モード\",\n  \"compatibleDesc\": \"有効化すると一部機能を失いますが、Clashの完全サポートを獲得\",\n  \"notSelectedTip\": \"現在のプロキシグループは選択できません\",\n  \"tip\": \"ヒント\",\n  \"account\": \"アカウント\",\n  \"backup\": \"バックアップ\",\n  \"backupSuccess\": \"バックアップ成功\",\n  \"noInfo\": \"情報なし\",\n  \"pleaseBindWebDAV\": \"WebDAVをバインドしてください\",\n  \"bind\": \"バインド\",\n  \"connectivity\": \"接続性：\",\n  \"webDAVConfiguration\": \"WebDAV設定\",\n  \"address\": \"アドレス\",\n  \"addressHelp\": \"WebDAVサーバーアドレス\",\n  \"addressTip\": \"有効なWebDAVアドレスを入力\",\n  \"password\": \"パスワード\",\n  \"checkUpdate\": \"更新を確認\",\n  \"discoverNewVersion\": \"新バージョンを発見\",\n  \"checkUpdateError\": \"アプリは最新版です\",\n  \"goDownload\": \"ダウンロードへ\",\n  \"unknown\": \"不明\",\n  \"geoData\": \"地域データ\",\n  \"externalResources\": \"外部リソース\",\n  \"checking\": \"確認中...\",\n  \"country\": \"国\",\n  \"checkError\": \"確認エラー\",\n  \"search\": \"検索\",\n  \"allowBypass\": \"アプリがVPNをバイパスすることを許可\",\n  \"allowBypassDesc\": \"有効化すると一部アプリがVPNをバイパス\",\n  \"externalController\": \"外部コントローラー\",\n  \"externalControllerDesc\": \"有効化するとClashコアをポート9090で制御可能\",\n  \"ipv6Desc\": \"有効化するとIPv6トラフィックを受信可能\",\n  \"app\": \"アプリ\",\n  \"general\": \"一般\",\n  \"vpnSystemProxyDesc\": \"HTTPプロキシをVpnServiceに接続\",\n  \"systemProxyDesc\": \"HTTPプロキシをVpnServiceに接続\",\n  \"unifiedDelay\": \"統一遅延\",\n  \"unifiedDelayDesc\": \"ハンドシェイクなどの余分な遅延を削除\",\n  \"tcpConcurrent\": \"TCP並列処理\",\n  \"tcpConcurrentDesc\": \"TCP並列処理を許可\",\n  \"geodataLoader\": \"Geo低メモリモード\",\n  \"geodataLoaderDesc\": \"有効化するとGeo低メモリローダーを使用\",\n  \"requests\": \"リクエスト\",\n  \"requestsDesc\": \"最近のリクエスト記録を表示\",\n  \"findProcessMode\": \"プロセス検出\",\n  \"init\": \"初期化\",\n  \"infiniteTime\": \"長期有効\",\n  \"expirationTime\": \"有効期限\",\n  \"connections\": \"接続\",\n  \"connectionsDesc\": \"現在の接続データを表示\",\n  \"intranetIP\": \"イントラネットIP\",\n  \"view\": \"表示\",\n  \"cut\": \"切り取り\",\n  \"copy\": \"コピー\",\n  \"paste\": \"貼り付け\",\n  \"testUrl\": \"URLテスト\",\n  \"sync\": \"同期\",\n  \"exclude\": \"最近のタスクから非表示\",\n  \"excludeDesc\": \"アプリがバックグラウンド時に最近のタスクから非表示\",\n  \"oneColumn\": \"1列\",\n  \"twoColumns\": \"2列\",\n  \"threeColumns\": \"3列\",\n  \"fourColumns\": \"4列\",\n  \"expand\": \"標準\",\n  \"shrink\": \"縮小\",\n  \"min\": \"最小化\",\n  \"tab\": \"タブ\",\n  \"list\": \"リスト\",\n  \"delay\": \"遅延\",\n  \"style\": \"スタイル\",\n  \"size\": \"サイズ\",\n  \"sort\": \"並び替え\",\n  \"columns\": \"列\",\n  \"proxiesSetting\": \"プロキシ設定\",\n  \"proxyGroup\": \"プロキシグループ\",\n  \"go\": \"移動\",\n  \"externalLink\": \"外部リンク\",\n  \"otherContributors\": \"その他の貢献者\",\n  \"autoCloseConnections\": \"接続を自動閉じる\",\n  \"autoCloseConnectionsDesc\": \"ノード変更後に接続を自動閉じる\",\n  \"onlyStatisticsProxy\": \"プロキシのみ統計\",\n  \"onlyStatisticsProxyDesc\": \"有効化するとプロキシトラフィックのみ統計\",\n  \"pureBlackMode\": \"純黒モード\",\n  \"keepAliveIntervalDesc\": \"TCPキープアライブ間隔\",\n  \"entries\": \" エントリ\",\n  \"local\": \"ローカル\",\n  \"remote\": \"リモート\",\n  \"remoteBackupDesc\": \"WebDAVにデータをバックアップ\",\n  \"localBackupDesc\": \"ローカルにデータをバックアップ\",\n  \"mode\": \"モード\",\n  \"time\": \"時間\",\n  \"source\": \"ソース\",\n  \"allApps\": \"全アプリ\",\n  \"onlyOtherApps\": \"サードパーティアプリのみ\",\n  \"action\": \"アクション\",\n  \"intelligentSelected\": \"インテリジェント選択\",\n  \"clipboardImport\": \"クリップボードからインポート\",\n  \"clipboardExport\": \"クリップボードにエクスポート\",\n  \"layout\": \"レイアウト\",\n  \"tight\": \"密\",\n  \"standard\": \"標準\",\n  \"loose\": \"疎\",\n  \"profilesSort\": \"プロファイルの並び替え\",\n  \"start\": \"開始\",\n  \"stop\": \"停止\",\n  \"appDesc\": \"アプリ関連設定の処理\",\n  \"vpnDesc\": \"VPN関連設定の変更\",\n  \"dnsDesc\": \"DNS関連設定の更新\",\n  \"key\": \"キー\",\n  \"value\": \"値\",\n  \"hostsDesc\": \"ホストを追加\",\n  \"vpnTip\": \"変更はVPN再起動後に有効\",\n  \"vpnEnableDesc\": \"VpnService経由で全システムトラフィックをルーティング\",\n  \"options\": \"オプション\",\n  \"loopback\": \"ループバック解除ツール\",\n  \"loopbackDesc\": \"UWPループバック解除用\",\n  \"providers\": \"プロバイダー\",\n  \"proxyProviders\": \"プロキシプロバイダー\",\n  \"ruleProviders\": \"ルールプロバイダー\",\n  \"overrideDns\": \"DNS上書き\",\n  \"overrideDnsDesc\": \"有効化するとプロファイルのDNS設定を上書き\",\n  \"status\": \"ステータス\",\n  \"statusDesc\": \"無効時はシステムDNSを使用\",\n  \"preferH3Desc\": \"DOHのHTTP/3を優先使用\",\n  \"respectRules\": \"ルール尊重\",\n  \"respectRulesDesc\": \"DNS接続がルールに従う（proxy-server-nameserverの設定が必要）\",\n  \"dnsMode\": \"DNSモード\",\n  \"fakeipRange\": \"Fakeip範囲\",\n  \"fakeipFilter\": \"Fakeipフィルター\",\n  \"defaultNameserver\": \"デフォルトネームサーバー\",\n  \"defaultNameserverDesc\": \"DNSサーバーの解決用\",\n  \"nameserver\": \"ネームサーバー\",\n  \"nameserverDesc\": \"ドメイン解決用\",\n  \"useHosts\": \"ホストを使用\",\n  \"useSystemHosts\": \"システムホストを使用\",\n  \"nameserverPolicy\": \"ネームサーバーポリシー\",\n  \"nameserverPolicyDesc\": \"対応するネームサーバーポリシーを指定\",\n  \"proxyNameserver\": \"プロキシネームサーバー\",\n  \"proxyNameserverDesc\": \"プロキシノード解決用ドメイン\",\n  \"fallback\": \"フォールバック\",\n  \"fallbackDesc\": \"通常はオフショアDNSを使用\",\n  \"fallbackFilter\": \"フォールバックフィルター\",\n  \"geoipCode\": \"GeoIPコード\",\n  \"ipcidr\": \"IPCIDR\",\n  \"domain\": \"ドメイン\",\n  \"reset\": \"リセット\",\n  \"action_view\": \"表示/非表示\",\n  \"action_start\": \"開始/停止\",\n  \"action_mode\": \"モード切替\",\n  \"action_proxy\": \"システムプロキシ\",\n  \"action_tun\": \"TUN\",\n  \"disclaimer\": \"免責事項\",\n  \"disclaimerDesc\": \"本ソフトウェアは学習交流や科学研究などの非営利目的でのみ使用されます。商用利用は厳禁です。いかなる商用活動も本ソフトウェアとは無関係です。\",\n  \"agree\": \"同意\",\n  \"hotkeyManagement\": \"ホットキー管理\",\n  \"hotkeyManagementDesc\": \"キーボードでアプリを制御\",\n  \"pressKeyboard\": \"キーボードを押してください\",\n  \"inputCorrectHotkey\": \"正しいホットキーを入力\",\n  \"hotkeyConflict\": \"ホットキー競合\",\n  \"remove\": \"削除\",\n  \"noHotKey\": \"ホットキーなし\",\n  \"noNetwork\": \"ネットワークなし\",\n  \"ipv6InboundDesc\": \"IPv6インバウンドを許可\",\n  \"exportLogs\": \"ログをエクスポート\",\n  \"exportSuccess\": \"エクスポート成功\",\n  \"iconStyle\": \"アイコンスタイル\",\n  \"onlyIcon\": \"アイコンのみ\",\n  \"noIcon\": \"なし\",\n  \"stackMode\": \"スタックモード\",\n  \"network\": \"ネットワーク\",\n  \"networkDesc\": \"ネットワーク関連設定の変更\",\n  \"bypassDomain\": \"バイパスドメイン\",\n  \"bypassDomainDesc\": \"システムプロキシ有効時のみ適用\",\n  \"resetTip\": \"リセットを確定\",\n  \"regExp\": \"正規表現\",\n  \"icon\": \"アイコン\",\n  \"iconConfiguration\": \"アイコン設定\",\n  \"noData\": \"データなし\",\n  \"adminAutoLaunch\": \"管理者自動起動\",\n  \"adminAutoLaunchDesc\": \"管理者モードで起動\",\n  \"fontFamily\": \"フォントファミリー\",\n  \"systemFont\": \"システムフォント\",\n  \"toggle\": \"トグル\",\n  \"system\": \"システム\",\n  \"routeMode\": \"ルートモード\",\n  \"routeMode_bypassPrivate\": \"プライベートルートをバイパス\",\n  \"routeMode_config\": \"設定を使用\",\n  \"routeAddress\": \"ルートアドレス\",\n  \"routeAddressDesc\": \"ルートアドレスを設定\",\n  \"pleaseInputAdminPassword\": \"管理者パスワードを入力\",\n  \"copyEnvVar\": \"環境変数をコピー\",\n  \"memoryInfo\": \"メモリ情報\",\n  \"cancel\": \"キャンセル\",\n  \"fileIsUpdate\": \"ファイルが変更されました。保存しますか？\",\n  \"profileHasUpdate\": \"プロファイルが変更されました。自動更新を無効化しますか？\",\n  \"hasCacheChange\": \"変更をキャッシュしますか？\",\n  \"copySuccess\": \"コピー成功\",\n  \"copyLink\": \"リンクをコピー\",\n  \"exportFile\": \"ファイルをエクスポート\",\n  \"cacheCorrupt\": \"キャッシュが破損しています。クリアしますか？\",\n  \"detectionTip\": \"サードパーティAPIに依存（参考値）\",\n  \"listen\": \"リスン\",\n  \"undo\": \"元に戻す\",\n  \"redo\": \"やり直す\",\n  \"none\": \"なし\",\n  \"basicConfig\": \"基本設定\",\n  \"basicConfigDesc\": \"基本設定をグローバルに変更\",\n  \"advancedConfig\": \"高度な設定\",\n  \"advancedConfigDesc\": \"多様な設定を提供\",\n  \"selectedCountTitle\": \"{count} 項目が選択されています\",\n  \"addRule\": \"ルールを追加\",\n  \"ruleName\": \"ルール名\",\n  \"content\": \"内容\",\n  \"subRule\": \"サブルール\",\n  \"ruleTarget\": \"ルール対象\",\n  \"sourceIp\": \"送信元IP\",\n  \"noResolve\": \"IPを解決しない\",\n  \"getOriginRules\": \"元のルールを取得\",\n  \"overrideOriginRules\": \"元のルールを上書き\",\n  \"addedOriginRules\": \"元のルールに追加\",\n  \"enableOverride\": \"上書きを有効化\",\n  \"saveChanges\": \"変更を保存しますか？\",\n  \"generalDesc\": \"一般設定を変更\",\n  \"findProcessModeDesc\": \"有効化するとパフォーマンスが若干低下します\",\n  \"tabAnimationDesc\": \"モバイル表示でのみ有効\",\n  \"saveTip\": \"保存してもよろしいですか？\",\n  \"colorSchemes\": \"カラースキーム\",\n  \"palette\": \"パレット\",\n  \"tonalSpotScheme\": \"トーンスポット\",\n  \"fidelityScheme\": \"ハイファイデリティー\",\n  \"monochromeScheme\": \"モノクローム\",\n  \"neutralScheme\": \"ニュートラル\",\n  \"vibrantScheme\": \"ビブラント\",\n  \"expressiveScheme\": \"エクスプレッシブ\",\n  \"contentScheme\": \"コンテンツテーマ\",\n  \"rainbowScheme\": \"レインボー\",\n  \"fruitSaladScheme\": \"フルーツサラダ\",\n  \"developerMode\": \"デベロッパーモード\",\n  \"developerModeEnableTip\": \"デベロッパーモードが有効になりました。\",\n  \"messageTest\": \"メッセージテスト\",\n  \"messageTestTip\": \"これはメッセージです。\",\n  \"crashTest\": \"クラッシュテスト\",\n  \"clearData\": \"データを消去\",\n  \"zoom\": \"ズーム\",\n  \"textScale\": \"テキストスケーリング\",\n  \"internet\": \"インターネット\",\n  \"systemApp\": \"システムアプリ\",\n  \"noNetworkApp\": \"ネットワークなしアプリ\",\n  \"contactMe\": \"連絡する\",\n  \"restoreStrategy\": \"復元ストラテジー\",\n  \"restoreStrategy_override\": \"上書き\",\n  \"restoreStrategy_compatible\": \"互換\",\n  \"logsTest\": \"ログテスト\",\n  \"emptyTip\": \"{label}は空欄にできません\",\n  \"urlTip\": \"{label}はURLである必要があります\",\n  \"numberTip\": \"{label}は数字でなければなりません\",\n  \"interval\": \"インターバル\",\n  \"existsTip\": \"現在の{label}は既に存在しています\",\n  \"deleteTip\": \"現在の{label}を削除してもよろしいですか？\",\n  \"deleteMultipTip\": \"選択された{label}を削除してもよろしいですか？\",\n  \"nullTip\": \"まだ{label}はありません\",\n  \"script\": \"スクリプト\",\n  \"color\": \"カラー\",\n  \"rename\": \"リネーム\",\n  \"unnamed\": \"無題\",\n  \"pleaseEnterScriptName\": \"スクリプト名を入力してください\",\n  \"overrideInvalidTip\": \"スクリプトモードでは有効になりません\",\n  \"mixedPort\": \"混合ポート\",\n  \"socksPort\": \"Socksポート\",\n  \"redirPort\": \"Redirポート\",\n  \"tproxyPort\": \"Tproxyポート\",\n  \"portTip\": \"{label} は 1024 から 49151 の間でなければなりません\",\n  \"portConflictTip\": \"別のポートを入力してください\",\n  \"import\": \"インポート\",\n  \"importFile\": \"ファイルからインポート\",\n  \"importUrl\": \"URLからインポート\",\n  \"autoSetSystemDns\": \"オートセットシステムDNS\",\n  \"details\": \"{label}詳細\",\n  \"creationTime\": \"作成時間\",\n  \"process\": \"プロセス\",\n  \"host\": \"ホスト\",\n  \"destination\": \"宛先\",\n  \"destinationGeoIP\": \"宛先地理情報\",\n  \"destinationIPASN\": \"宛先IP ASN\",\n  \"specialProxy\": \"特殊プロキシ\",\n  \"specialRules\": \"特殊ルール\",\n  \"remoteDestination\": \"リモート宛先\",\n  \"networkType\": \"ネットワーク種別\",\n  \"proxyChains\": \"プロキシチェーン\",\n  \"log\": \"ログ\",\n  \"connection\": \"接続\",\n  \"request\": \"リクエスト\",\n  \"connected\": \"接続済み\",\n  \"disconnected\": \"切断済み\",\n  \"connecting\": \"接続中...\",\n  \"restartCoreTip\": \"コアを再起動してもよろしいですか？\",\n  \"forceRestartCoreTip\": \"コアを強制再起動してもよろしいですか？\",\n  \"dnsHijacking\": \"DNSハイジャッキング\",\n  \"coreStatus\": \"コアステータス\",\n  \"dataCollectionTip\": \"データ収集説明\",\n  \"dataCollectionContent\": \"本アプリはFirebase Crashlyticsを使用してクラッシュ情報を収集し、アプリの安定性を向上させます。\\n収集されるデータにはデバイス情報とクラッシュ詳細が含まれますが、個人の機密データは含まれません。\\n設定でこの機能を無効にすることができます。\",\n  \"crashlytics\": \"クラッシュ分析\",\n  \"crashlyticsTip\": \"有効にすると、アプリがクラッシュした際に機密情報を含まないクラッシュログを自動的にアップロードします\",\n  \"appendSystemDns\": \"システムDNSを追加\",\n  \"appendSystemDnsTip\": \"設定にシステムDNSを強制的に追加します\",\n  \"editRule\": \"ルールを編集\",\n  \"overrideMode\": \"上書きモード\",\n  \"standardModeDesc\": \"標準モード、基本設定を上書きし、シンプルなルール追加機能を提供\",\n  \"scriptModeDesc\": \"スクリプトモード、外部拡張スクリプトを使用し、ワンクリックで設定を上書きする機能を提供\",\n  \"addedRules\": \"追加ルール\",\n  \"controlGlobalAddedRules\": \"グローバル追加ルールを制御\",\n  \"overrideScript\": \"上書きスクリプト\",\n  \"goToConfigureScript\": \"スクリプト設定に移動\",\n  \"editGlobalRules\": \"グローバルルールを編集\",\n  \"externalFetch\": \"外部取得\",\n  \"confirmForceCrashCore\": \"コアを強制的にクラッシュさせてもよろしいですか？\",\n  \"confirmClearAllData\": \"すべてのデータをクリアしてもよろしいですか？\",\n  \"loading\": \"読み込み中...\",\n  \"loadTest\": \"読み込みテスト\",\n  \"yearsAgo\": \"{count}年前\",\n  \"monthsAgo\": \"{count}ヶ月前\",\n  \"daysAgo\": \"{count}日前\",\n  \"hoursAgo\": \"{count}時間前\",\n  \"minutesAgo\": \"{count}分前\",\n  \"justNow\": \"たった今\",\n  \"noLongerRemind\": \"今後表示しない\",\n  \"accessControlSettings\": \"アクセス制御設定\",\n  \"turnOn\": \"オン\",\n  \"turnOff\": \"オフ\",\n  \"coreConfigChangeDetected\": \"コア設定の変更が検出されました\",\n  \"reload\": \"リロード\",\n  \"vpnConfigChangeDetected\": \"VPN設定の変更が検出されました\",\n  \"restart\": \"再起動\",\n  \"speedStatistics\": \"速度統計\",\n  \"resetPageChangesTip\": \"現在のページに変更があります。リセットしてもよろしいですか？\",\n  \"overwriteTypeCustom\": \"カスタム\",\n  \"overwriteTypeCustomDesc\": \"カスタムモード、プロキシグループとルールを完全にカスタマイズ可能\",\n  \"unknownNetworkError\": \"不明なネットワークエラー\",\n  \"networkRequestException\": \"ネットワーク要求例外、後でもう一度試してください。\",\n  \"restoreException\": \"復元例外\",\n  \"networkException\": \"ネットワーク例外、接続を確認してもう一度お試しください\",\n  \"invalidBackupFile\": \"無効なバックアップファイル\",\n  \"pruneCache\": \"キャッシュの削除\",\n  \"backupAndRestore\": \"バックアップと復元\",\n  \"backupAndRestoreDesc\": \"WebDAVまたはファイルを介してデータを同期する\",\n  \"restore\": \"復元\",\n  \"restoreSuccess\": \"復元に成功しました\",\n  \"restoreFromWebDAVDesc\": \"WebDAVを介してデータを復元する\",\n  \"restoreFromFileDesc\": \"ファイルを介してデータを復元する\",\n  \"restoreOnlyConfig\": \"設定ファイルのみを復元する\",\n  \"restoreAllData\": \"すべてのデータを復元する\",\n  \"addProfile\": \"プロファイルを追加\",\n  \"delayTest\": \"遅延テスト\"\n}"
  },
  {
    "path": "arb/intl_ru.arb",
    "content": "{\n  \"rule\": \"Правило\",\n  \"global\": \"Глобальный\",\n  \"direct\": \"Прямой\",\n  \"dashboard\": \"Панель управления\",\n  \"proxies\": \"Прокси\",\n  \"profile\": \"Профиль\",\n  \"profiles\": \"Профили\",\n  \"tools\": \"Инструменты\",\n  \"logs\": \"Логи\",\n  \"logsDesc\": \"Записи захвата логов\",\n  \"resources\": \"Ресурсы\",\n  \"resourcesDesc\": \"Информация, связанная с внешними ресурсами\",\n  \"trafficUsage\": \"Использование трафика\",\n  \"coreInfo\": \"Информация о ядре\",\n  \"networkSpeed\": \"Скорость сети\",\n  \"outboundMode\": \"Режим исходящего трафика\",\n  \"networkDetection\": \"Обнаружение сети\",\n  \"upload\": \"Загрузка\",\n  \"download\": \"Скачивание\",\n  \"noProxy\": \"Нет прокси\",\n  \"noProxyDesc\": \"Пожалуйста, создайте профиль или добавьте действительный профиль\",\n  \"nullProfileDesc\": \"Нет профиля, пожалуйста, добавьте профиль\",\n  \"settings\": \"Настройки\",\n  \"language\": \"Язык\",\n  \"defaultText\": \"По умолчанию\",\n  \"more\": \"Еще\",\n  \"other\": \"Другое\",\n  \"about\": \"О программе\",\n  \"en\": \"Английский\",\n  \"ja\": \"Японский\",\n  \"ru\": \"Русский\",\n  \"zh_CN\": \"Упрощенный китайский\",\n  \"theme\": \"Тема\",\n  \"themeDesc\": \"Установить темный режим, настроить цвет\",\n  \"override\": \"Переопределить\",\n  \"overrideDesc\": \"Переопределить конфигурацию, связанную с прокси\",\n  \"allowLan\": \"Разрешить LAN\",\n  \"allowLanDesc\": \"Разрешить доступ к прокси через локальную сеть\",\n  \"tun\": \"TUN\",\n  \"tunDesc\": \"действительно только в режиме администратора\",\n  \"minimizeOnExit\": \"Свернуть при выходе\",\n  \"minimizeOnExitDesc\": \"Изменить стандартное событие выхода из системы\",\n  \"autoLaunch\": \"Автозапуск\",\n  \"autoLaunchDesc\": \"Следовать автозапуску системы\",\n  \"silentLaunch\": \"Тихий запуск\",\n  \"silentLaunchDesc\": \"Запуск в фоновом режиме\",\n  \"autoRun\": \"Автозапуск\",\n  \"autoRunDesc\": \"Автоматический запуск при открытии приложения\",\n  \"logcat\": \"Logcat\",\n  \"logcatDesc\": \"Отключение скроет запись логов\",\n  \"autoCheckUpdate\": \"Автопроверка обновлений\",\n  \"autoCheckUpdateDesc\": \"Автоматически проверять обновления при запуске приложения\",\n  \"accessControl\": \"Контроль доступа\",\n  \"accessControlDesc\": \"Настройка доступа приложений к прокси\",\n  \"application\": \"Приложение\",\n  \"applicationDesc\": \"Изменение настроек, связанных с приложением\",\n  \"edit\": \"Редактировать\",\n  \"confirm\": \"Подтвердить\",\n  \"update\": \"Обновить\",\n  \"add\": \"Добавить\",\n  \"save\": \"Сохранить\",\n  \"delete\": \"Удалить\",\n  \"years\": \"Лет\",\n  \"months\": \"Месяцев\",\n  \"hours\": \"Часов\",\n  \"days\": \"Дней\",\n  \"minutes\": \"Минут\",\n  \"seconds\": \"Секунд\",\n  \"ago\": \" назад\",\n  \"just\": \"Только что\",\n  \"qrcode\": \"QR-код\",\n  \"qrcodeDesc\": \"Сканируйте QR-код для получения профиля\",\n  \"url\": \"URL\",\n  \"urlDesc\": \"Получить профиль через URL\",\n  \"file\": \"Файл\",\n  \"fileDesc\": \"Прямая загрузка профиля\",\n  \"name\": \"Имя\",\n  \"profileNameNullValidationDesc\": \"Пожалуйста, введите имя профиля\",\n  \"profileUrlNullValidationDesc\": \"Пожалуйста, введите URL профиля\",\n  \"profileUrlInvalidValidationDesc\": \"Пожалуйста, введите действительный URL профиля\",\n  \"autoUpdate\": \"Автообновление\",\n  \"autoUpdateInterval\": \"Интервал автообновления (минуты)\",\n  \"profileAutoUpdateIntervalNullValidationDesc\": \"Пожалуйста, введите интервал времени для автообновления\",\n  \"profileAutoUpdateIntervalInvalidValidationDesc\": \"Пожалуйста, введите действительный формат интервала времени\",\n  \"themeMode\": \"Режим темы\",\n  \"themeColor\": \"Цвет темы\",\n  \"preview\": \"Предпросмотр\",\n  \"auto\": \"Авто\",\n  \"light\": \"Светлый\",\n  \"dark\": \"Темный\",\n  \"importFromURL\": \"Импорт из URL\",\n  \"submit\": \"Отправить\",\n  \"doYouWantToPass\": \"Вы хотите пропустить\",\n  \"create\": \"Создать\",\n  \"defaultSort\": \"Сортировка по умолчанию\",\n  \"delaySort\": \"Сортировка по задержке\",\n  \"nameSort\": \"Сортировка по имени\",\n  \"pleaseUploadFile\": \"Пожалуйста, загрузите файл\",\n  \"pleaseUploadValidQrcode\": \"Пожалуйста, загрузите действительный QR-код\",\n  \"blacklistMode\": \"Режим черного списка\",\n  \"whitelistMode\": \"Режим белого списка\",\n  \"filterSystemApp\": \"Фильтровать системные приложения\",\n  \"cancelFilterSystemApp\": \"Отменить фильтрацию системных приложений\",\n  \"selectAll\": \"Выбрать все\",\n  \"cancelSelectAll\": \"Отменить выбор всего\",\n  \"appAccessControl\": \"Контроль доступа приложений\",\n  \"accessControlAllowDesc\": \"Разрешить только выбранным приложениям доступ к VPN\",\n  \"accessControlNotAllowDesc\": \"Выбранные приложения будут исключены из VPN\",\n  \"selected\": \"Выбрано\",\n  \"unableToUpdateCurrentProfileDesc\": \"невозможно обновить текущий профиль\",\n  \"noMoreInfoDesc\": \"Нет дополнительной информации\",\n  \"profileParseErrorDesc\": \"ошибка разбора профиля\",\n  \"proxyPort\": \"Порт прокси\",\n  \"proxyPortDesc\": \"Установить порт прослушивания Clash\",\n  \"port\": \"Порт\",\n  \"logLevel\": \"Уровень логов\",\n  \"show\": \"Показать\",\n  \"exit\": \"Выход\",\n  \"systemProxy\": \"Системный прокси\",\n  \"project\": \"Проект\",\n  \"core\": \"Ядро\",\n  \"tabAnimation\": \"Анимация вкладок\",\n  \"desc\": \"Многоплатформенный прокси-клиент на основе ClashMeta, простой и удобный в использовании, с открытым исходным кодом и без рекламы.\",\n  \"startVpn\": \"Запуск VPN...\",\n  \"stopVpn\": \"Остановка VPN...\",\n  \"discovery\": \"Обнаружена новая версия\",\n  \"compatible\": \"Режим совместимости\",\n  \"compatibleDesc\": \"Включение приведет к потере части функциональности приложения, но обеспечит полную поддержку Clash.\",\n  \"notSelectedTip\": \"Текущая группа прокси не может быть выбрана.\",\n  \"tip\": \"подсказка\",\n  \"backupAndRecovery\": \"Резервное копирование и восстановление\",\n  \"backupAndRecoveryDesc\": \"Синхронизация данных через WebDAV или файл\",\n  \"account\": \"Аккаунт\",\n  \"backup\": \"Резервное копирование\",\n  \"recovery\": \"Восстановление\",\n  \"recoveryProfiles\": \"Только восстановление профилей\",\n  \"recoveryAll\": \"Восстановить все данные\",\n  \"recoverySuccess\": \"Восстановление успешно\",\n  \"backupSuccess\": \"Резервное копирование успешно\",\n  \"noInfo\": \"Нет информации\",\n  \"pleaseBindWebDAV\": \"Пожалуйста, привяжите WebDAV\",\n  \"bind\": \"Привязать\",\n  \"connectivity\": \"Связь：\",\n  \"webDAVConfiguration\": \"Конфигурация WebDAV\",\n  \"address\": \"Адрес\",\n  \"addressHelp\": \"Адрес сервера WebDAV\",\n  \"addressTip\": \"Пожалуйста, введите действительный адрес WebDAV\",\n  \"password\": \"Пароль\",\n  \"checkUpdate\": \"Проверить обновления\",\n  \"discoverNewVersion\": \"Обнаружена новая версия\",\n  \"checkUpdateError\": \"Текущее приложение уже является последней версией\",\n  \"goDownload\": \"Перейти к загрузке\",\n  \"unknown\": \"Неизвестно\",\n  \"geoData\": \"Геоданные\",\n  \"externalResources\": \"Внешние ресурсы\",\n  \"checking\": \"Проверка...\",\n  \"country\": \"Страна\",\n  \"checkError\": \"Ошибка проверки\",\n  \"search\": \"Поиск\",\n  \"allowBypass\": \"Разрешить приложениям обходить VPN\",\n  \"allowBypassDesc\": \"Некоторые приложения могут обходить VPN при включении\",\n  \"externalController\": \"Внешний контроллер\",\n  \"externalControllerDesc\": \"При включении ядро Clash можно контролировать на порту 9090\",\n  \"ipv6Desc\": \"При включении будет возможно получать IPv6 трафик\",\n  \"app\": \"Приложение\",\n  \"general\": \"Общие\",\n  \"vpnSystemProxyDesc\": \"Прикрепить HTTP-прокси к VpnService\",\n  \"systemProxyDesc\": \"Прикрепить HTTP-прокси к VpnService\",\n  \"unifiedDelay\": \"Унифицированная задержка\",\n  \"unifiedDelayDesc\": \"Убрать дополнительные задержки, такие как рукопожатие\",\n  \"tcpConcurrent\": \"TCP параллелизм\",\n  \"tcpConcurrentDesc\": \"Включение позволит использовать параллелизм TCP\",\n  \"geodataLoader\": \"Режим низкого потребления памяти для геоданных\",\n  \"geodataLoaderDesc\": \"Включение будет использовать загрузчик геоданных с низким потреблением памяти\",\n  \"requests\": \"Запросы\",\n  \"requestsDesc\": \"Просмотр последних записей запросов\",\n  \"findProcessMode\": \"Режим поиска процесса\",\n  \"init\": \"Инициализация\",\n  \"infiniteTime\": \"Долгосрочное действие\",\n  \"expirationTime\": \"Время истечения\",\n  \"connections\": \"Соединения\",\n  \"connectionsDesc\": \"Просмотр текущих данных о соединениях\",\n  \"intranetIP\": \"Внутренний IP\",\n  \"view\": \"Просмотр\",\n  \"cut\": \"Вырезать\",\n  \"copy\": \"Копировать\",\n  \"paste\": \"Вставить\",\n  \"testUrl\": \"Тест URL\",\n  \"sync\": \"Синхронизация\",\n  \"exclude\": \"Скрыть из последних задач\",\n  \"excludeDesc\": \"Когда приложение находится в фоновом режиме, оно скрыто из последних задач\",\n  \"oneColumn\": \"Один столбец\",\n  \"twoColumns\": \"Два столбца\",\n  \"threeColumns\": \"Три столбца\",\n  \"fourColumns\": \"Четыре столбца\",\n  \"expand\": \"Стандартный\",\n  \"shrink\": \"Сжать\",\n  \"min\": \"Мин\",\n  \"tab\": \"Вкладка\",\n  \"list\": \"Список\",\n  \"delay\": \"Задержка\",\n  \"style\": \"Стиль\",\n  \"size\": \"Размер\",\n  \"sort\": \"Сортировка\",\n  \"columns\": \"Столбцы\",\n  \"proxiesSetting\": \"Настройка прокси\",\n  \"proxyGroup\": \"Группа прокси\",\n  \"go\": \"Перейти\",\n  \"externalLink\": \"Внешняя ссылка\",\n  \"otherContributors\": \"Другие участники\",\n  \"autoCloseConnections\": \"Автоматическое закрытие соединений\",\n  \"autoCloseConnectionsDesc\": \"Автоматически закрывать соединения после смены узла\",\n  \"onlyStatisticsProxy\": \"Только статистика прокси\",\n  \"onlyStatisticsProxyDesc\": \"При включении будет учитываться только трафик прокси\",\n  \"pureBlackMode\": \"Чисто черный режим\",\n  \"keepAliveIntervalDesc\": \"Интервал поддержания TCP-соединения\",\n  \"entries\": \" записей\",\n  \"local\": \"Локальный\",\n  \"remote\": \"Удаленный\",\n  \"remoteBackupDesc\": \"Резервное копирование локальных данных на WebDAV\",\n  \"remoteRecoveryDesc\": \"Восстановление данных с WebDAV\",\n  \"localBackupDesc\": \"Резервное копирование локальных данных на локальный диск\",\n  \"localRecoveryDesc\": \"Восстановление данных из файла\",\n  \"mode\": \"Режим\",\n  \"time\": \"Время\",\n  \"source\": \"Источник\",\n  \"allApps\": \"Все приложения\",\n  \"onlyOtherApps\": \"Только сторонние приложения\",\n  \"action\": \"Действие\",\n  \"intelligentSelected\": \"Интеллектуальный выбор\",\n  \"clipboardImport\": \"Импорт из буфера обмена\",\n  \"clipboardExport\": \"Экспорт в буфер обмена\",\n  \"layout\": \"Макет\",\n  \"tight\": \"Плотный\",\n  \"standard\": \"Стандартный\",\n  \"loose\": \"Свободный\",\n  \"profilesSort\": \"Сортировка профилей\",\n  \"start\": \"Старт\",\n  \"stop\": \"Стоп\",\n  \"appDesc\": \"Обработка настроек, связанных с приложением\",\n  \"vpnDesc\": \"Изменение настроек, связанных с VPN\",\n  \"dnsDesc\": \"Обновление настроек, связанных с DNS\",\n  \"key\": \"Ключ\",\n  \"value\": \"Значение\",\n  \"hostsDesc\": \"Добавить Hosts\",\n  \"vpnTip\": \"Изменения вступят в силу после перезапуска VPN\",\n  \"vpnEnableDesc\": \"Автоматически направляет весь системный трафик через VpnService\",\n  \"options\": \"Опции\",\n  \"loopback\": \"Инструмент разблокировки Loopback\",\n  \"loopbackDesc\": \"Используется для разблокировки Loopback UWP\",\n  \"providers\": \"Провайдеры\",\n  \"proxyProviders\": \"Провайдеры прокси\",\n  \"ruleProviders\": \"Провайдеры правил\",\n  \"overrideDns\": \"Переопределить DNS\",\n  \"overrideDnsDesc\": \"Включение переопределит настройки DNS в профиле\",\n  \"status\": \"Статус\",\n  \"statusDesc\": \"Системный DNS будет использоваться при выключении\",\n  \"preferH3Desc\": \"Приоритетное использование HTTP/3 для DOH\",\n  \"respectRules\": \"Соблюдение правил\",\n  \"respectRulesDesc\": \"DNS-соединение следует правилам, необходимо настроить proxy-server-nameserver\",\n  \"dnsMode\": \"Режим DNS\",\n  \"fakeipRange\": \"Диапазон Fakeip\",\n  \"fakeipFilter\": \"Фильтр Fakeip\",\n  \"defaultNameserver\": \"Сервер имен по умолчанию\",\n  \"defaultNameserverDesc\": \"Для разрешения DNS-сервера\",\n  \"nameserver\": \"Сервер имен\",\n  \"nameserverDesc\": \"Для разрешения домена\",\n  \"useHosts\": \"Использовать hosts\",\n  \"useSystemHosts\": \"Использовать системные hosts\",\n  \"nameserverPolicy\": \"Политика сервера имен\",\n  \"nameserverPolicyDesc\": \"Указать соответствующую политику сервера имен\",\n  \"proxyNameserver\": \"Прокси-сервер имен\",\n  \"proxyNameserverDesc\": \"Домен для разрешения прокси-узлов\",\n  \"fallback\": \"Резервный\",\n  \"fallbackDesc\": \"Обычно используется оффшорный DNS\",\n  \"fallbackFilter\": \"Фильтр резервного DNS\",\n  \"geoipCode\": \"Код Geoip\",\n  \"ipcidr\": \"IPCIDR\",\n  \"domain\": \"Домен\",\n  \"reset\": \"Сброс\",\n  \"action_view\": \"Показать/Скрыть\",\n  \"action_start\": \"Старт/Стоп\",\n  \"action_mode\": \"Переключить режим\",\n  \"action_proxy\": \"Системный прокси\",\n  \"action_tun\": \"TUN\",\n  \"disclaimer\": \"Отказ от ответственности\",\n  \"disclaimerDesc\": \"Это программное обеспечение используется только в некоммерческих целях, таких как учебные обмены и научные исследования. Запрещено использовать это программное обеспечение в коммерческих целях. Любая коммерческая деятельность, если таковая имеется, не имеет отношения к этому программному обеспечению.\",\n  \"agree\": \"Согласен\",\n  \"hotkeyManagement\": \"Управление горячими клавишами\",\n  \"hotkeyManagementDesc\": \"Использование клавиатуры для управления приложением\",\n  \"pressKeyboard\": \"Пожалуйста, нажмите клавишу.\",\n  \"inputCorrectHotkey\": \"Пожалуйста, введите правильную горячую клавишу\",\n  \"hotkeyConflict\": \"Конфликт горячих клавиш\",\n  \"remove\": \"Удалить\",\n  \"noHotKey\": \"Нет горячей клавиши\",\n  \"noNetwork\": \"Нет сети\",\n  \"ipv6InboundDesc\": \"Разрешить входящий IPv6\",\n  \"exportLogs\": \"Экспорт логов\",\n  \"exportSuccess\": \"Экспорт успешен\",\n  \"iconStyle\": \"Стиль иконки\",\n  \"onlyIcon\": \"Только иконка\",\n  \"noIcon\": \"Нет иконки\",\n  \"stackMode\": \"Режим стека\",\n  \"network\": \"Сеть\",\n  \"networkDesc\": \"Изменение настроек, связанных с сетью\",\n  \"bypassDomain\": \"Обход домена\",\n  \"bypassDomainDesc\": \"Действует только при включенном системном прокси\",\n  \"resetTip\": \"Убедитесь, что хотите сбросить\",\n  \"regExp\": \"Регулярное выражение\",\n  \"icon\": \"Иконка\",\n  \"iconConfiguration\": \"Конфигурация иконки\",\n  \"noData\": \"Нет данных\",\n  \"adminAutoLaunch\": \"Автозапуск с правами администратора\",\n  \"adminAutoLaunchDesc\": \"Запуск с правами администратора при загрузке системы\",\n  \"fontFamily\": \"Семейство шрифтов\",\n  \"systemFont\": \"Системный шрифт\",\n  \"toggle\": \"Переключить\",\n  \"system\": \"Система\",\n  \"routeMode\": \"Режим маршрутизации\",\n  \"routeMode_bypassPrivate\": \"Обход частных адресов маршрутизации\",\n  \"routeMode_config\": \"Использовать конфигурацию\",\n  \"routeAddress\": \"Адрес маршрутизации\",\n  \"routeAddressDesc\": \"Настройка адреса прослушивания маршрутизации\",\n  \"pleaseInputAdminPassword\": \"Пожалуйста, введите пароль администратора\",\n  \"copyEnvVar\": \"Копирование переменных окружения\",\n  \"memoryInfo\": \"Информация о памяти\",\n  \"cancel\": \"Отмена\",\n  \"fileIsUpdate\": \"Файл был изменен. Хотите сохранить изменения?\",\n  \"profileHasUpdate\": \"Профиль был изменен. Хотите отключить автообновление?\",\n  \"hasCacheChange\": \"Хотите сохранить изменения в кэше?\",\n  \"copySuccess\": \"Копирование успешно\",\n  \"copyLink\": \"Копировать ссылку\",\n  \"exportFile\": \"Экспорт файла\",\n  \"cacheCorrupt\": \"Кэш поврежден. Хотите очистить его?\",\n  \"detectionTip\": \"Опирается на сторонний API, только для справки\",\n  \"listen\": \"Слушать\",\n  \"undo\": \"Отменить\",\n  \"redo\": \"Повторить\",\n  \"none\": \"Нет\",\n  \"basicConfig\": \"Базовая конфигурация\",\n  \"basicConfigDesc\": \"Глобальное изменение базовых настроек\",\n  \"advancedConfig\": \"Расширенная конфигурация\",\n  \"advancedConfigDesc\": \"Предоставляет разнообразные варианты конфигурации\",\n  \"selectedCountTitle\": \"Выбрано {count} элементов\",\n  \"addRule\": \"Добавить правило\",\n  \"ruleName\": \"Название правила\",\n  \"content\": \"Содержание\",\n  \"subRule\": \"Подправило\",\n  \"ruleTarget\": \"Цель правила\",\n  \"sourceIp\": \"Исходный IP\",\n  \"noResolve\": \"Не разрешать IP\",\n  \"getOriginRules\": \"Получить оригинальные правила\",\n  \"overrideOriginRules\": \"Переопределить оригинальное правило\",\n  \"addedOriginRules\": \"Добавить к оригинальным правилам\",\n  \"enableOverride\": \"Включить переопределение\",\n  \"saveChanges\": \"Сохранить изменения?\",\n  \"generalDesc\": \"Изменение общих настроек\",\n  \"findProcessModeDesc\": \"При включении возможны небольшие потери производительности\",\n  \"tabAnimationDesc\": \"Действительно только в мобильном виде\",\n  \"saveTip\": \"Вы уверены, что хотите сохранить?\",\n  \"colorSchemes\": \"Цветовые схемы\",\n  \"palette\": \"Палитра\",\n  \"tonalSpotScheme\": \"Тональный акцент\",\n  \"fidelityScheme\": \"Точная передача\",\n  \"monochromeScheme\": \"Монохром\",\n  \"neutralScheme\": \"Нейтральные\",\n  \"vibrantScheme\": \"Яркие\",\n  \"expressiveScheme\": \"Экспрессивные\",\n  \"contentScheme\": \"Контентная тема\",\n  \"rainbowScheme\": \"Радужные\",\n  \"fruitSaladScheme\": \"Фруктовый микс\",\n  \"developerMode\": \"Режим разработчика\",\n  \"developerModeEnableTip\": \"Режим разработчика активирован.\",\n  \"messageTest\": \"Тестирование сообщения\",\n  \"messageTestTip\": \"Это сообщение.\",\n  \"crashTest\": \"Тест на сбои\",\n  \"clearData\": \"Очистить данные\",\n  \"zoom\": \"Масштаб\",\n  \"textScale\": \"Масштабирование текста\",\n  \"internet\": \"Интернет\",\n  \"systemApp\": \"Системное приложение\",\n  \"noNetworkApp\": \"Приложение без сети\",\n  \"contactMe\": \"Свяжитесь со мной\",\n  \"restoreStrategy\": \"Стратегия восстановления\",\n  \"restoreStrategy_override\": \"Перезаписать\",\n  \"restoreStrategy_compatible\": \"Совместимый\",\n  \"logsTest\": \"Тест журналов\",\n  \"emptyTip\": \"{label} не может быть пустым\",\n  \"urlTip\": \"{label} должен быть URL\",\n  \"numberTip\": \"{label} должно быть числом\",\n  \"interval\": \"Интервал\",\n  \"existsTip\": \"Текущий {label} уже существует\",\n  \"deleteTip\": \"Вы уверены, что хотите удалить текущий {label}?\",\n  \"deleteMultipTip\": \"Вы уверены, что хотите удалить выбранные {label}?\",\n  \"nullTip\": \"{label} пока отсутствуют\",\n  \"script\": \"Скрипт\",\n  \"color\": \"Цвет\",\n  \"rename\": \"Переименовать\",\n  \"unnamed\": \"Без имени\",\n  \"pleaseEnterScriptName\": \"Пожалуйста, введите название скрипта\",\n  \"overrideInvalidTip\": \"В скриптовом режиме не действует\",\n  \"mixedPort\": \"Смешанный порт\",\n  \"socksPort\": \"Socks-порт\",\n  \"redirPort\": \"Redir-порт\",\n  \"tproxyPort\": \"Tproxy-порт\",\n  \"portTip\": \"{label} должен быть числом от 1024 до 49151\",\n  \"portConflictTip\": \"Введите другой порт\",\n  \"import\": \"Импорт\",\n  \"importFile\": \"Импорт из файла\",\n  \"importUrl\": \"Импорт по URL\",\n  \"autoSetSystemDns\": \"Автоматическая настройка системного DNS\",\n  \"details\": \"Детали {}\",\n  \"creationTime\": \"Время создания\",\n  \"process\": \"процесс\",\n  \"host\": \"Хост\",\n  \"destination\": \"Назначение\",\n  \"destinationGeoIP\": \"Геолокация назначения\",\n  \"destinationIPASN\": \"ASN назначения\",\n  \"specialProxy\": \"Специальный прокси\",\n  \"specialRules\": \"Специальные правила\",\n  \"remoteDestination\": \"Удалённое назначение\",\n  \"networkType\": \"Тип сети\",\n  \"proxyChains\": \"Цепочки прокси\",\n  \"log\": \"Журнал\",\n  \"connection\": \"Соединение\",\n  \"request\": \"Запрос\",\n  \"connected\": \"Подключено\",\n  \"disconnected\": \"Отключено\",\n  \"connecting\": \"Подключение...\",\n  \"restartCoreTip\": \"Вы уверены, что хотите перезапустить ядро?\",\n  \"forceRestartCoreTip\": \"Вы уверены, что хотите принудительно перезапустить ядро?\",\n  \"dnsHijacking\": \"DNS-перехват\",\n  \"coreStatus\": \"Основной статус\",\n  \"dataCollectionTip\": \"Уведомление о сборе данных\",\n  \"dataCollectionContent\": \"Это приложение использует Firebase Crashlytics для сбора информации о сбоях nhằm улучшения стабильности приложения.\\nСобираемые данные включают информацию об устройстве и подробности о сбоях, но не содержат персональных конфиденциальных данных.\\nВы можете отключить эту функцию в настройках.\",\n  \"crashlytics\": \"Анализ сбоев\",\n  \"crashlyticsTip\": \"При включении автоматически загружает журналы сбоев без конфиденциальной информации, когда приложение выходит из строя\",\n  \"appendSystemDns\": \"Добавить системный DNS\",\n  \"appendSystemDnsTip\": \"Принудительно добавить системный DNS к конфигурации\",\n  \"editRule\": \"Редактировать правило\",\n  \"overrideMode\": \"Режим переопределения\",\n  \"standardModeDesc\": \"Стандартный режим, переопределение базовой конфигурации, предоставление возможности простого добавления правил\",\n  \"scriptModeDesc\": \"Режим скрипта, использование внешних расширяющих скриптов, предоставление возможности переопределения конфигурации одним кликом\",\n  \"addedRules\": \"Добавленные правила\",\n  \"controlGlobalAddedRules\": \"Управление глобальными добавленными правилами\",\n  \"overrideScript\": \"Скрипт переопределения\",\n  \"goToConfigureScript\": \"Перейти к настройке скрипта\",\n  \"editGlobalRules\": \"Редактировать глобальные правила\",\n  \"externalFetch\": \"Внешнее получение\",\n  \"confirmForceCrashCore\": \"Вы уверены, что хотите принудительно аварийно завершить работу ядра?\",\n  \"confirmClearAllData\": \"Вы уверены, что хотите очистить все данные?\",\n  \"loading\": \"Загрузка...\",\n  \"loadTest\": \"Тест загрузки\",\n  \"yearsAgo\": \"{count, plural, one{{count} год назад} few{{count} года назад} many{{count} лет назад} other{{count} года назад}}\",\n  \"monthsAgo\": \"{count, plural, one{{count} месяц назад} few{{count} месяца назад} many{{count} месяцев назад} other{{count} месяца назад}}\",\n  \"daysAgo\": \"{count, plural, one{{count} день назад} few{{count} дня назад} many{{count} дней назад} other{{count} дня назад}}\",\n  \"hoursAgo\": \"{count, plural, one{{count} час назад} few{{count} часа назад} many{{count} часов назад} other{{count} часа назад}}\",\n  \"minutesAgo\": \"{count, plural, one{{count} минута назад} few{{count} минуты назад} many{{count} минут назад} other{{count} минуты назад}}\",\n  \"justNow\": \"Только что\",\n  \"noLongerRemind\": \"Больше не напоминать\",\n  \"accessControlSettings\": \"Настройки контроля доступа\",\n  \"turnOn\": \"Включить\",\n  \"turnOff\": \"Выключить\",\n  \"coreConfigChangeDetected\": \"Обнаружено изменение конфигурации ядра\",\n  \"reload\": \"Перезагрузить\",\n  \"vpnConfigChangeDetected\": \"Обнаружено изменение конфигурации VPN\",\n  \"restart\": \"Перезапустить\",\n  \"speedStatistics\": \"Статистика скорости\",\n  \"resetPageChangesTip\": \"На текущей странице есть изменения. Вы уверены, что хотите сбросить?\",\n  \"overwriteTypeCustom\": \"Пользовательский\",\n  \"overwriteTypeCustomDesc\": \"Пользовательский режим, полная настройка групп прокси и правил\",\n  \"unknownNetworkError\": \"Неизвестная сетевая ошибка\",\n  \"networkRequestException\": \"Исключение сетевого запроса, пожалуйста, попробуйте позже.\",\n  \"restoreException\": \"Ошибка восстановления\",\n  \"networkException\": \"Ошибка сети, проверьте соединение и попробуйте еще раз\",\n  \"invalidBackupFile\": \"Неверный файл резервной копии\",\n  \"pruneCache\": \"Очистить кэш\",\n  \"backupAndRestore\": \"Резервное копирование и восстановление\",\n  \"backupAndRestoreDesc\": \"Синхронизация данных через WebDAV или файлы\",\n  \"restore\": \"Восстановить\",\n  \"restoreSuccess\": \"Восстановление успешно\",\n  \"restoreFromWebDAVDesc\": \"Восстановить данные через WebDAV\",\n  \"restoreFromFileDesc\": \"Восстановить данные из файла\",\n  \"restoreOnlyConfig\": \"Восстановить только файлы конфигурации\",\n  \"restoreAllData\": \"Восстановить все данные\",\n  \"addProfile\": \"Добавить профиль\",\n  \"delayTest\": \"Тест задержки\"\n}"
  },
  {
    "path": "arb/intl_zh_CN.arb",
    "content": "{\n  \"rule\": \"规则\",\n  \"global\": \"全局\",\n  \"direct\": \"直连\",\n  \"dashboard\": \"仪表盘\",\n  \"proxies\": \"代理\",\n  \"profile\": \"配置\",\n  \"profiles\": \"配置\",\n  \"tools\": \"工具\",\n  \"logs\": \"日志\",\n  \"logsDesc\": \"日志捕获记录\",\n  \"resources\": \"资源\",\n  \"resourcesDesc\": \"外部资源相关信息\",\n  \"trafficUsage\": \"流量统计\",\n  \"coreInfo\": \"内核信息\",\n  \"networkSpeed\": \"网络速度\",\n  \"outboundMode\": \"出站模式\",\n  \"networkDetection\": \"网络检测\",\n  \"upload\": \"上传\",\n  \"download\": \"下载\",\n  \"noProxy\": \"暂无代理\",\n  \"noProxyDesc\": \"请创建配置文件或者添加有效配置文件\",\n  \"nullProfileDesc\": \"没有配置文件,请先添加配置文件\",\n  \"settings\": \"设置\",\n  \"language\": \"语言\",\n  \"defaultText\": \"默认\",\n  \"more\": \"更多\",\n  \"other\": \"其他\",\n  \"about\": \"关于\",\n  \"en\": \"英语\",\n  \"ja\": \"日语\",\n  \"ru\": \"俄语\",\n  \"zh_CN\": \"中文简体\",\n  \"theme\": \"主题\",\n  \"themeDesc\": \"设置深色模式，调整色彩\",\n  \"override\": \"覆写\",\n  \"overrideDesc\": \"覆写代理相关配置\",\n  \"allowLan\": \"局域网代理\",\n  \"allowLanDesc\": \"允许通过局域网访问代理\",\n  \"tun\": \"虚拟网卡\",\n  \"tunDesc\": \"仅在管理员模式生效\",\n  \"minimizeOnExit\": \"退出时最小化\",\n  \"minimizeOnExitDesc\": \"修改系统默认退出事件\",\n  \"autoLaunch\": \"自启动\",\n  \"autoLaunchDesc\": \"跟随系统自启动\",\n  \"silentLaunch\": \"静默启动\",\n  \"silentLaunchDesc\": \"后台启动\",\n  \"autoRun\": \"自动运行\",\n  \"autoRunDesc\": \"应用打开时自动运行\",\n  \"logcat\": \"日志捕获\",\n  \"logcatDesc\": \"禁用将会隐藏日志入口\",\n  \"autoCheckUpdate\": \"自动检查更新\",\n  \"autoCheckUpdateDesc\": \"应用启动时自动检查更新\",\n  \"accessControl\": \"访问控制\",\n  \"accessControlDesc\": \"配置应用访问代理\",\n  \"application\": \"应用程序\",\n  \"applicationDesc\": \"修改应用程序相关设置\",\n  \"edit\": \"编辑\",\n  \"confirm\": \"确定\",\n  \"update\": \"更新\",\n  \"add\": \"添加\",\n  \"save\": \"保存\",\n  \"delete\": \"删除\",\n  \"years\": \"年\",\n  \"months\": \"月\",\n  \"hours\": \"小时\",\n  \"days\": \"天\",\n  \"minutes\": \"分钟\",\n  \"seconds\": \"秒\",\n  \"ago\": \"前\",\n  \"just\": \"刚刚\",\n  \"qrcode\": \"二维码\",\n  \"qrcodeDesc\": \"扫描二维码获取配置文件\",\n  \"url\": \"URL\",\n  \"urlDesc\": \"通过URL获取配置文件\",\n  \"file\": \"文件\",\n  \"fileDesc\": \"直接上传配置文件\",\n  \"name\": \"名称\",\n  \"profileNameNullValidationDesc\": \"请输入配置名称\",\n  \"profileUrlNullValidationDesc\": \"请输入配置URL\",\n  \"profileUrlInvalidValidationDesc\": \"请输入有效配置URL\",\n  \"autoUpdate\": \"自动更新\",\n  \"autoUpdateInterval\": \"自动更新间隔（分钟）\",\n  \"profileAutoUpdateIntervalNullValidationDesc\": \"请输入自动更新间隔时间\",\n  \"profileAutoUpdateIntervalInvalidValidationDesc\": \"请输入有效间隔时间格式\",\n  \"themeMode\": \"主题模式\",\n  \"themeColor\": \"主题色彩\",\n  \"preview\": \"预览\",\n  \"auto\": \"自动\",\n  \"light\": \"浅色\",\n  \"dark\": \"深色\",\n  \"importFromURL\": \"从URL导入\",\n  \"submit\": \"提交\",\n  \"doYouWantToPass\": \"是否要通过\",\n  \"create\": \"创建\",\n  \"defaultSort\": \"按默认排序\",\n  \"delaySort\": \"按延迟排序\",\n  \"nameSort\": \"按名称排序\",\n  \"pleaseUploadFile\": \"请上传文件\",\n  \"pleaseUploadValidQrcode\": \"请上传有效的二维码\",\n  \"blacklistMode\": \"黑名单模式\",\n  \"whitelistMode\": \"白名单模式\",\n  \"filterSystemApp\": \"过滤系统应用\",\n  \"cancelFilterSystemApp\": \"取消过滤系统应用\",\n  \"selectAll\": \"全选\",\n  \"cancelSelectAll\": \"取消全选\",\n  \"appAccessControl\": \"应用访问控制\",\n  \"accessControlAllowDesc\": \"只允许选中应用进入VPN\",\n  \"accessControlNotAllowDesc\": \"选中应用将会被排除在VPN之外\",\n  \"selected\": \"已选择\",\n  \"unableToUpdateCurrentProfileDesc\": \"无法更新当前配置文件\",\n  \"noMoreInfoDesc\": \"暂无更多信息\",\n  \"profileParseErrorDesc\": \"配置文件解析错误\",\n  \"proxyPort\": \"代理端口\",\n  \"proxyPortDesc\": \"设置Clash监听端口\",\n  \"port\": \"端口\",\n  \"logLevel\": \"日志等级\",\n  \"show\": \"显示\",\n  \"exit\": \"退出\",\n  \"systemProxy\": \"系统代理\",\n  \"project\": \"项目\",\n  \"core\": \"内核\",\n  \"tabAnimation\": \"选项卡动画\",\n  \"desc\": \"基于ClashMeta的多平台代理客户端，简单易用，开源无广告。\",\n  \"startVpn\": \"正在启动VPN...\",\n  \"stopVpn\": \"正在停止VPN...\",\n  \"discovery\": \"发现新版本\",\n  \"compatible\": \"兼容模式\",\n  \"compatibleDesc\": \"开启将失去部分应用能力，获得全量的Clash的支持\",\n  \"notSelectedTip\": \"当前代理组无法选中\",\n  \"tip\": \"提示\",\n  \"account\": \"账号\",\n  \"backup\": \"备份\",\n  \"backupSuccess\": \"备份成功\",\n  \"noInfo\": \"暂无信息\",\n  \"pleaseBindWebDAV\": \"请绑定WebDAV\",\n  \"bind\": \"绑定\",\n  \"connectivity\": \"连通性：\",\n  \"webDAVConfiguration\": \"WebDAV配置\",\n  \"address\": \"地址\",\n  \"addressHelp\": \"WebDAV服务器地址\",\n  \"addressTip\": \"请输入有效的WebDAV地址\",\n  \"password\": \"密码\",\n  \"checkUpdate\": \"检查更新\",\n  \"discoverNewVersion\": \"发现新版本\",\n  \"checkUpdateError\": \"当前应用已经是最新版了\",\n  \"goDownload\": \"前往下载\",\n  \"unknown\": \"未知\",\n  \"geoData\": \"地理数据\",\n  \"externalResources\": \"外部资源\",\n  \"checking\": \"检测中...\",\n  \"country\": \"区域\",\n  \"checkError\": \"检测失败\",\n  \"search\": \"搜索\",\n  \"allowBypass\": \"允许应用绕过VPN\",\n  \"allowBypassDesc\": \"开启后部分应用可绕过VPN\",\n  \"externalController\": \"外部控制器\",\n  \"externalControllerDesc\": \"开启后将可以通过9090端口控制Clash内核\",\n  \"ipv6Desc\": \"开启后将可以接收IPv6流量\",\n  \"app\": \"应用\",\n  \"general\": \"常规\",\n  \"vpnSystemProxyDesc\": \"为VpnService附加HTTP代理\",\n  \"systemProxyDesc\": \"设置系统代理\",\n  \"unifiedDelay\": \"统一延迟\",\n  \"unifiedDelayDesc\": \"去除握手等额外延迟\",\n  \"tcpConcurrent\": \"TCP并发\",\n  \"tcpConcurrentDesc\": \"开启后允许TCP并发\",\n  \"geodataLoader\": \"Geo低内存模式\",\n  \"geodataLoaderDesc\": \"开启将使用Geo低内存加载器\",\n  \"requests\": \"请求\",\n  \"requestsDesc\": \"查看最近请求记录\",\n  \"findProcessMode\": \"查找进程\",\n  \"init\": \"初始化\",\n  \"infiniteTime\": \"长期有效\",\n  \"expirationTime\": \"到期时间\",\n  \"connections\": \"连接\",\n  \"connectionsDesc\": \"查看当前连接数据\",\n  \"intranetIP\": \"内网 IP\",\n  \"view\": \"查看\",\n  \"cut\": \"剪切\",\n  \"copy\": \"复制\",\n  \"paste\": \"粘贴\",\n  \"testUrl\": \"测速链接\",\n  \"sync\": \"同步\",\n  \"exclude\": \"从最近任务中隐藏\",\n  \"excludeDesc\": \"应用在后台时,从最近任务中隐藏应用\",\n  \"oneColumn\": \"一列\",\n  \"twoColumns\": \"两列\",\n  \"threeColumns\": \"三列\",\n  \"fourColumns\": \"四列\",\n  \"expand\": \"标准\",\n  \"shrink\": \"紧凑\",\n  \"min\": \"最小\",\n  \"tab\": \"标签页\",\n  \"list\": \"列表\",\n  \"delay\": \"延迟\",\n  \"style\": \"风格\",\n  \"size\": \"尺寸\",\n  \"sort\": \"排序\",\n  \"columns\": \"列数\",\n  \"proxiesSetting\": \"代理设置\",\n  \"proxyGroup\": \"代理组\",\n  \"go\": \"前往\",\n  \"externalLink\": \"外部链接\",\n  \"otherContributors\": \"其他贡献者\",\n  \"autoCloseConnections\": \"自动关闭连接\",\n  \"autoCloseConnectionsDesc\": \"切换节点后自动关闭连接\",\n  \"onlyStatisticsProxy\": \"仅统计代理\",\n  \"onlyStatisticsProxyDesc\": \"开启后，将只统计代理流量\",\n  \"pureBlackMode\": \"纯黑模式\",\n  \"keepAliveIntervalDesc\": \"TCP保持活动间隔\",\n  \"entries\": \"个条目\",\n  \"local\": \"本地\",\n  \"remote\": \"远程\",\n  \"remoteBackupDesc\": \"备份数据到WebDAV\",\n  \"localBackupDesc\": \"备份数据到本地\",\n  \"mode\": \"模式\",\n  \"time\": \"时间\",\n  \"source\": \"来源\",\n  \"allApps\": \"所有应用\",\n  \"onlyOtherApps\": \"仅第三方应用\",\n  \"action\": \"操作\",\n  \"intelligentSelected\": \"智能选择\",\n  \"clipboardImport\": \"剪贴板导入\",\n  \"clipboardExport\": \"导出剪贴板\",\n  \"layout\": \"布局\",\n  \"tight\": \"紧凑\",\n  \"standard\": \"标准\",\n  \"loose\": \"宽松\",\n  \"profilesSort\": \"配置排序\",\n  \"start\": \"启动\",\n  \"stop\": \"暂停\",\n  \"appDesc\": \"处理应用相关设置\",\n  \"vpnDesc\": \"修改VPN相关设置\",\n  \"dnsDesc\": \"更新DNS相关设置\",\n  \"key\": \"键\",\n  \"value\": \"值\",\n  \"hostsDesc\": \"追加Hosts\",\n  \"vpnTip\": \"重启VPN后改变生效\",\n  \"vpnEnableDesc\": \"通过VpnService自动路由系统所有流量\",\n  \"options\": \"选项\",\n  \"loopback\": \"回环解锁工具\",\n  \"loopbackDesc\": \"用于UWP回环解锁\",\n  \"providers\": \"提供者\",\n  \"proxyProviders\": \"代理提供者\",\n  \"ruleProviders\": \"规则提供者\",\n  \"overrideDns\": \"覆写DNS\",\n  \"overrideDnsDesc\": \"开启后将覆盖配置中的DNS选项\",\n  \"status\": \"状态\",\n  \"statusDesc\": \"关闭后将使用系统DNS\",\n  \"preferH3Desc\": \"优先使用DOH的http/3\",\n  \"respectRules\": \"遵守规则\",\n  \"respectRulesDesc\": \"DNS连接跟随rules,需配置proxy-server-nameserver\",\n  \"dnsMode\": \"DNS模式\",\n  \"fakeipRange\": \"Fakeip范围\",\n  \"fakeipFilter\": \"Fakeip过滤\",\n  \"defaultNameserver\": \"默认域名服务器\",\n  \"defaultNameserverDesc\": \"用于解析DNS服务器\",\n  \"nameserver\": \"域名服务器\",\n  \"nameserverDesc\": \"用于解析域名\",\n  \"useHosts\": \"使用Hosts\",\n  \"useSystemHosts\": \"使用系统Hosts\",\n  \"nameserverPolicy\": \"域名服务器策略\",\n  \"nameserverPolicyDesc\": \"指定对应域名服务器策略\",\n  \"proxyNameserver\": \"代理域名服务器\",\n  \"proxyNameserverDesc\": \"用于解析代理节点的域名\",\n  \"fallback\": \"Fallback\",\n  \"fallbackDesc\": \"一般情况下使用境外DNS\",\n  \"fallbackFilter\": \"Fallback过滤\",\n  \"geoipCode\": \"Geoip代码\",\n  \"ipcidr\": \"IP/掩码\",\n  \"domain\": \"域名\",\n  \"reset\": \"重置\",\n  \"action_view\": \"显示/隐藏\",\n  \"action_start\": \"启动/停止\",\n  \"action_mode\": \"切换模式\",\n  \"action_proxy\": \"系统代理\",\n  \"action_tun\": \"虚拟网卡\",\n  \"disclaimer\": \"免责声明\",\n  \"disclaimerDesc\": \"本软件仅供学习交流、科研等非商业性质的用途，严禁将本软件用于商业目的。如有任何商业行为，均与本软件无关。\",\n  \"agree\": \"同意\",\n  \"hotkeyManagement\": \"快捷键管理\",\n  \"hotkeyManagementDesc\": \"使用键盘控制应用程序\",\n  \"pressKeyboard\": \"请按下按键\",\n  \"inputCorrectHotkey\": \"请输入正确的快捷键\",\n  \"hotkeyConflict\": \"快捷键冲突\",\n  \"remove\": \"移除\",\n  \"noHotKey\": \"暂无快捷键\",\n  \"noNetwork\": \"无网络\",\n  \"ipv6InboundDesc\": \"允许IPv6入站\",\n  \"exportLogs\": \"导出日志\",\n  \"exportSuccess\": \"导出成功\",\n  \"iconStyle\": \"图标样式\",\n  \"onlyIcon\": \"仅图标\",\n  \"noIcon\": \"无图标\",\n  \"stackMode\": \"栈模式\",\n  \"network\": \"网络\",\n  \"networkDesc\": \"修改网络相关设置\",\n  \"bypassDomain\": \"排除域名\",\n  \"bypassDomainDesc\": \"仅在系统代理启用时生效\",\n  \"resetTip\": \"确定要重置吗?\",\n  \"regExp\": \"正则\",\n  \"icon\": \"图片\",\n  \"iconConfiguration\": \"图片配置\",\n  \"noData\": \"暂无数据\",\n  \"adminAutoLaunch\": \"管理员自启动\",\n  \"adminAutoLaunchDesc\": \"使用管理员模式开机自启动\",\n  \"fontFamily\": \"字体\",\n  \"systemFont\": \"系统字体\",\n  \"toggle\": \"切换\",\n  \"system\": \"系统\",\n  \"routeMode\": \"路由模式\",\n  \"routeMode_bypassPrivate\": \"绕过私有路由地址\",\n  \"routeMode_config\": \"使用配置\",\n  \"routeAddress\": \"路由地址\",\n  \"routeAddressDesc\": \"配置监听路由地址\",\n  \"pleaseInputAdminPassword\": \"请输入管理员密码\",\n  \"copyEnvVar\": \"复制环境变量\",\n  \"memoryInfo\": \"内存信息\",\n  \"cancel\": \"取消\",\n  \"fileIsUpdate\": \"文件有修改，是否保存修改\",\n  \"profileHasUpdate\": \"配置文件已经修改,是否关闭自动更新 \",\n  \"hasCacheChange\": \"是否缓存修改\",\n  \"copySuccess\": \"复制成功\",\n  \"copyLink\": \"复制链接\",\n  \"exportFile\": \"导出文件\",\n  \"cacheCorrupt\": \"缓存已损坏，是否清空？\",\n  \"detectionTip\": \"依赖第三方api，仅供参考\",\n  \"listen\": \"监听\",\n  \"undo\": \"撤销\",\n  \"redo\": \"重做\",\n  \"none\": \"无\",\n  \"basicConfig\": \"基本配置\",\n  \"basicConfigDesc\": \"全局修改基本配置\",\n  \"advancedConfig\": \"进阶配置\",\n  \"advancedConfigDesc\": \"提供多样化配置\",\n  \"selectedCountTitle\": \"已选择 {count} 项\",\n  \"addRule\": \"添加规则\",\n  \"ruleName\": \"规则名称\",\n  \"content\": \"内容\",\n  \"subRule\": \"子规则\",\n  \"ruleTarget\": \"规则目标\",\n  \"sourceIp\": \"源IP\",\n  \"noResolve\": \"不解析IP\",\n  \"getOriginRules\": \"获取原始规则\",\n  \"overrideOriginRules\": \"覆盖原始规则\",\n  \"addedOriginRules\": \"附加到原始规则\",\n  \"enableOverride\": \"启用覆写\",\n  \"saveChanges\": \"是否保存更改？\",\n  \"generalDesc\": \"修改通用设置\",\n  \"findProcessModeDesc\": \"开启后会有一定性能损耗\",\n  \"tabAnimationDesc\": \"仅在移动视图中有效\",\n  \"saveTip\": \"确定要保存吗？\",\n  \"colorSchemes\": \"配色方案\",\n  \"palette\": \"调色板\",\n  \"tonalSpotScheme\": \"调性点缀\",\n  \"fidelityScheme\": \"高保真\",\n  \"monochromeScheme\": \"单色\",\n  \"neutralScheme\": \"中性\",\n  \"vibrantScheme\": \"活力\",\n  \"expressiveScheme\": \"表现力\",\n  \"contentScheme\": \"内容主题\",\n  \"rainbowScheme\": \"彩虹\",\n  \"fruitSaladScheme\": \"果缤纷\",\n  \"developerMode\": \"开发者模式\",\n  \"developerModeEnableTip\": \"开发者模式已启用。\",\n  \"messageTest\": \"消息测试\",\n  \"messageTestTip\": \"这是一条消息。\",\n  \"crashTest\": \"崩溃测试\",\n  \"clearData\": \"清除数据\",\n  \"zoom\": \"缩放\",\n  \"textScale\": \"文本缩放\",\n  \"internet\": \"互联网\",\n  \"systemApp\": \"系统应用\",\n  \"noNetworkApp\": \"无网络应用\",\n  \"contactMe\": \"联系我\",\n  \"restoreStrategy\": \"恢复策略\",\n  \"restoreStrategy_override\": \"覆盖\",\n  \"restoreStrategy_compatible\": \"兼容\",\n  \"logsTest\": \"日志测试\",\n  \"emptyTip\": \"{label}不能为空\",\n  \"urlTip\": \"{label}必须为URL\",\n  \"numberTip\": \"{label}必须为数字\",\n  \"interval\": \"间隔\",\n  \"existsTip\": \"{label}当前已存在\",\n  \"deleteTip\": \"确定删除当前{label}吗？\",\n  \"deleteMultipTip\": \"确定删除选中的{label}吗？\",\n  \"nullTip\": \"暂无{label}\",\n  \"script\": \"脚本\",\n  \"color\": \"颜色\",\n  \"rename\": \"重命名\",\n  \"unnamed\": \"未命名\",\n  \"pleaseEnterScriptName\": \"请输入脚本名称\",\n  \"overrideInvalidTip\": \"在脚本模式下不生效\",\n  \"mixedPort\": \"混合端口\",\n  \"socksPort\": \"Socks端口\",\n  \"redirPort\": \"Redir端口\",\n  \"tproxyPort\": \"Tproxy端口\",\n  \"portTip\": \"{label} 必须在 1024 到 49151 之间\",\n  \"portConflictTip\": \"请输入不同的端口\",\n  \"import\": \"导入\",\n  \"importFile\": \"通过文件导入\",\n  \"importUrl\": \"通过URL导入\",\n  \"autoSetSystemDns\": \"自动设置系统DNS\",\n  \"details\": \"{label}详情\",\n  \"creationTime\": \"创建时间\",\n  \"process\": \"进程\",\n  \"host\": \"主机\",\n  \"destination\": \"目标地址\",\n  \"destinationGeoIP\": \"目标地理定位\",\n  \"destinationIPASN\": \"目标IP ASN\",\n  \"specialProxy\": \"特殊代理\",\n  \"specialRules\": \"特殊规则\",\n  \"remoteDestination\": \"远程目标\",\n  \"networkType\": \"网络类型\",\n  \"proxyChains\": \"代理链\",\n  \"log\": \"日志\",\n  \"connection\": \"连接\",\n  \"request\": \"请求\",\n  \"connected\": \"已连接\",\n  \"disconnected\": \"已断开\",\n  \"connecting\": \"连接中...\",\n  \"restartCoreTip\": \"您确定要重启核心吗？\",\n  \"forceRestartCoreTip\": \"您确定要强制重启核心吗？\",\n  \"dnsHijacking\": \"DNS劫持\",\n  \"coreStatus\": \"核心状态\",\n  \"dataCollectionTip\": \"数据收集说明\",\n  \"dataCollectionContent\": \"本应用使用 Firebase Crashlytics 收集崩溃信息以改进应用稳定性。\\n收集的数据包括设备信息和崩溃详情，不包含个人敏感数据。\\n您可以在设置中关闭此功能。\",\n  \"crashlytics\": \"崩溃分析\",\n  \"crashlyticsTip\": \"开启后，应用崩溃时自动上传不包含敏感信息的崩溃日志\",\n  \"appendSystemDns\": \"追加系统DNS\",\n  \"appendSystemDnsTip\": \"强制为配置附加系统DNS\",\n  \"editRule\": \"编辑规则\",\n  \"overrideMode\": \"覆写模式\",\n  \"standardModeDesc\": \"标准模式，覆写基本配置，提供简单追加规则能力\",\n  \"scriptModeDesc\": \"脚本模式，使用外部扩展脚本，提供一键覆写配置的能力\",\n  \"addedRules\": \"附加规则\",\n  \"controlGlobalAddedRules\": \"控制全局附加规则\",\n  \"overrideScript\": \"覆写脚本\",\n  \"goToConfigureScript\": \"前往配置脚本\",\n  \"editGlobalRules\": \"编辑全局规则\",\n  \"externalFetch\": \"外部获取\",\n  \"confirmForceCrashCore\": \"确定要强制崩溃核心？\",\n  \"confirmClearAllData\": \"确定要清除所有数据？\",\n  \"loading\": \"加载中...\",\n  \"loadTest\": \"加载测试\",\n  \"yearsAgo\": \"{count} 年前\",\n  \"monthsAgo\": \"{count} 个月前\",\n  \"daysAgo\": \"{count} 天前\",\n  \"hoursAgo\": \"{count} 小时前\",\n  \"minutesAgo\": \"{count} 分钟前\",\n  \"justNow\": \"刚刚\",\n  \"noLongerRemind\": \"不再提示\",\n  \"accessControlSettings\": \"访问控制设置\",\n  \"turnOn\": \"开启\",\n  \"turnOff\": \"关闭\",\n  \"coreConfigChangeDetected\": \"检测到核心配置更改\",\n  \"reload\": \"重载\",\n  \"vpnConfigChangeDetected\": \"检测到VPN相关配置改动\",\n  \"restart\": \"重启\",\n  \"speedStatistics\": \"网速统计\",\n  \"resetPageChangesTip\": \"当前页面存在更改，确定重置吗？\",\n  \"overwriteTypeCustom\": \"自定义\",\n  \"overwriteTypeCustomDesc\": \"自定义模式，支持完全自定义修改代理组以及规则\",\n  \"unknownNetworkError\": \"未知网络错误\",\n  \"networkRequestException\": \"网络请求异常，请稍后再试。\",\n  \"restoreException\": \"恢复异常\",\n  \"networkException\": \"网络异常，请检查连接后重试\",\n  \"invalidBackupFile\": \"无效备份文件\",\n  \"pruneCache\": \"修剪缓存\",\n  \"backupAndRestore\": \"备份与恢复\",\n  \"backupAndRestoreDesc\": \"通过WebDAV或者文件同步数据\",\n  \"restore\": \"恢复\",\n  \"restoreSuccess\": \"恢复成功\",\n  \"restoreFromWebDAVDesc\": \"通过WebDAV恢复数据\",\n  \"restoreFromFileDesc\": \"通过文件恢复数据\",\n  \"restoreOnlyConfig\": \"仅恢复配置文件\",\n  \"restoreAllData\": \"恢复所有数据\",\n  \"addProfile\": \"添加配置\",\n  \"delayTest\": \"延迟测试\"\n}\n"
  },
  {
    "path": "build.yaml",
    "content": "targets:\n  $default:\n    builders:\n      source_gen:combining_builder:\n        options:\n          build_extensions:\n            '^lib/models/{{}}.dart': 'lib/models/generated/{{}}.g.dart'\n            '^lib/providers/{{}}.dart': 'lib/providers/generated/{{}}.g.dart'\n            '^lib/database/{{}}.dart': 'lib/database/generated/{{}}.g.dart'\n      freezed:\n        options:\n          build_extensions:\n            '^lib/models/{{}}.dart': 'lib/models/generated/{{}}.freezed.dart'"
  },
  {
    "path": "core/action.go",
    "content": "package main\n\nimport (\n\t\"encoding/json\"\n\t\"unsafe\"\n)\n\ntype Action struct {\n\tId     string      `json:\"id\"`\n\tMethod Method      `json:\"method\"`\n\tData   interface{} `json:\"data\"`\n}\n\ntype ActionResult struct {\n\tId       string      `json:\"id\"`\n\tMethod   Method      `json:\"method\"`\n\tData     interface{} `json:\"data\"`\n\tCode     int         `json:\"code\"`\n\tcallback unsafe.Pointer\n}\n\nfunc (result ActionResult) Json() ([]byte, error) {\n\tdata, err := json.Marshal(result)\n\treturn data, err\n}\n\nfunc (result ActionResult) success(data interface{}) {\n\tresult.Code = 0\n\tresult.Data = data\n\tresult.send()\n}\n\nfunc (result ActionResult) error(data interface{}) {\n\tresult.Code = -1\n\tresult.Data = data\n\tresult.send()\n}\n\nfunc handleAction(action *Action, result ActionResult) {\n\tswitch action.Method {\n\tcase initClashMethod:\n\t\tparamsString := action.Data.(string)\n\t\tresult.success(handleInitClash(paramsString))\n\t\treturn\n\tcase getIsInitMethod:\n\t\tresult.success(handleGetIsInit())\n\t\treturn\n\tcase forceGcMethod:\n\t\thandleForceGC()\n\t\tresult.success(true)\n\t\treturn\n\tcase shutdownMethod:\n\t\tresult.success(handleShutdown())\n\t\treturn\n\tcase validateConfigMethod:\n\t\tpath := action.Data.(string)\n\t\tresult.success(handleValidateConfig(path))\n\t\treturn\n\tcase updateConfigMethod:\n\t\tdata := []byte(action.Data.(string))\n\t\tresult.success(handleUpdateConfig(data))\n\t\treturn\n\tcase setupConfigMethod:\n\t\tdata := []byte(action.Data.(string))\n\t\tresult.success(handleSetupConfig(data))\n\t\treturn\n\tcase getProxiesMethod:\n\t\tresult.success(handleGetProxies())\n\t\treturn\n\tcase changeProxyMethod:\n\t\tdata := action.Data.(string)\n\t\thandleChangeProxy(data, func(value string) {\n\t\t\tresult.success(value)\n\t\t})\n\t\treturn\n\tcase getTrafficMethod:\n\t\tdata := action.Data.(bool)\n\t\tresult.success(handleGetTraffic(data))\n\t\treturn\n\tcase getTotalTrafficMethod:\n\t\tdata := action.Data.(bool)\n\t\tresult.success(handleGetTotalTraffic(data))\n\t\treturn\n\tcase resetTrafficMethod:\n\t\thandleResetTraffic()\n\t\tresult.success(true)\n\t\treturn\n\tcase asyncTestDelayMethod:\n\t\tdata := action.Data.(string)\n\t\thandleAsyncTestDelay(data, func(value string) {\n\t\t\tresult.success(value)\n\t\t})\n\t\treturn\n\tcase getConnectionsMethod:\n\t\tresult.success(handleGetConnections())\n\t\treturn\n\tcase closeConnectionsMethod:\n\t\tresult.success(handleCloseConnections())\n\t\treturn\n\tcase resetConnectionsMethod:\n\t\tresult.success(handleResetConnections())\n\t\treturn\n\tcase getConfigMethod:\n\t\tpath := action.Data.(string)\n\t\tconfig, err := handleGetConfig(path)\n\t\tif err != nil {\n\t\t\tresult.error(err)\n\t\t\treturn\n\t\t}\n\t\tresult.success(config)\n\t\treturn\n\tcase closeConnectionMethod:\n\t\tid := action.Data.(string)\n\t\tresult.success(handleCloseConnection(id))\n\t\treturn\n\tcase getExternalProvidersMethod:\n\t\tresult.success(handleGetExternalProviders())\n\t\treturn\n\tcase getExternalProviderMethod:\n\t\texternalProviderName := action.Data.(string)\n\t\tresult.success(handleGetExternalProvider(externalProviderName))\n\tcase updateGeoDataMethod:\n\t\tparamsString := action.Data.(string)\n\t\tvar params = map[string]string{}\n\t\terr := json.Unmarshal([]byte(paramsString), &params)\n\t\tif err != nil {\n\t\t\tresult.success(err.Error())\n\t\t\treturn\n\t\t}\n\t\tgeoType := params[\"geo-type\"]\n\t\tgeoName := params[\"geo-name\"]\n\t\thandleUpdateGeoData(geoType, geoName, func(value string) {\n\t\t\tresult.success(value)\n\t\t})\n\t\treturn\n\tcase updateExternalProviderMethod:\n\t\tproviderName := action.Data.(string)\n\t\thandleUpdateExternalProvider(providerName, func(value string) {\n\t\t\tresult.success(value)\n\t\t})\n\t\treturn\n\tcase sideLoadExternalProviderMethod:\n\t\tparamsString := action.Data.(string)\n\t\tvar params = map[string]string{}\n\t\terr := json.Unmarshal([]byte(paramsString), &params)\n\t\tif err != nil {\n\t\t\tresult.success(err.Error())\n\t\t\treturn\n\t\t}\n\t\tproviderName := params[\"providerName\"]\n\t\tdata := params[\"data\"]\n\t\thandleSideLoadExternalProvider(providerName, []byte(data), func(value string) {\n\t\t\tresult.success(value)\n\t\t})\n\t\treturn\n\tcase startLogMethod:\n\t\thandleStartLog()\n\t\tresult.success(true)\n\t\treturn\n\tcase stopLogMethod:\n\t\thandleStopLog()\n\t\tresult.success(true)\n\t\treturn\n\tcase startListenerMethod:\n\t\tresult.success(handleStartListener())\n\t\treturn\n\tcase stopListenerMethod:\n\t\tresult.success(handleStopListener())\n\t\treturn\n\tcase getCountryCodeMethod:\n\t\tip := action.Data.(string)\n\t\thandleGetCountryCode(ip, func(value string) {\n\t\t\tresult.success(value)\n\t\t})\n\t\treturn\n\tcase getMemoryMethod:\n\t\thandleGetMemory(func(value string) {\n\t\t\tresult.success(value)\n\t\t})\n\t\treturn\n\tcase crashMethod:\n\t\tresult.success(true)\n\t\thandleCrash()\n\tcase deleteFile:\n\t\tpath := action.Data.(string)\n\t\thandleDelFile(path, result)\n\t\treturn\n\tdefault:\n\t\tnextHandle(action, result)\n\t}\n}\n"
  },
  {
    "path": "core/bride.c",
    "content": "#include \"bride.h\"\n\nvoid (*release_object_func)(void *obj);\n\nvoid (*free_string_func)(char *data);\n\nvoid (*protect_func)(void *tun_interface, int fd);\n\nchar* (*resolve_process_func)(void *tun_interface,int protocol, const char *source, const char *target, int uid);\n\nvoid (*result_func)(void *invoke_Interface, const char *data);\n\nvoid protect(void *tun_interface, int fd) {\n    protect_func(tun_interface, fd);\n}\n\nchar* resolve_process(void *tun_interface, int protocol, const char *source, const char *target, int uid) {\n    return resolve_process_func(tun_interface, protocol, source, target, uid);\n}\n\nvoid release_object(void *obj) {\n    release_object_func(obj);\n}\n\nvoid free_string(char *data) {\n    free_string_func(data);\n}\n\nvoid result(void *invoke_Interface, const char *data) {\n    return result_func(invoke_Interface, data);\n}"
  },
  {
    "path": "core/bride.go",
    "content": "//go:build android && cgo\n\npackage main\n\n//#include \"bride.h\"\nimport \"C\"\nimport \"unsafe\"\n\nfunc protect(callback unsafe.Pointer, fd int) {\n\tC.protect(callback, C.int(fd))\n}\n\nfunc resolveProcess(callback unsafe.Pointer, protocol int, source, target string, uid int) string {\n\ts := C.CString(source)\n\tdefer C.free(unsafe.Pointer(s))\n\tt := C.CString(target)\n\tdefer C.free(unsafe.Pointer(t))\n\tres := C.resolve_process(callback, C.int(protocol), s, t, C.int(uid))\n\treturn takeCString(res)\n}\n\nfunc invokeResult(callback unsafe.Pointer, data string) {\n\ts := C.CString(data)\n\tdefer C.free(unsafe.Pointer(s))\n\tC.result(callback, s)\n}\n\nfunc releaseObject(callback unsafe.Pointer) {\n\tC.release_object(callback)\n}\n\nfunc takeCString(s *C.char) string {\n\tdefer C.free_string(s)\n\treturn C.GoString(s)\n}\n"
  },
  {
    "path": "core/bride.h",
    "content": "#pragma once\n\n#include <stdlib.h>\n\nextern void (*release_object_func)(void *obj);\n\nextern void (*free_string_func)(char *data);\n\nextern void (*protect_func)(void *tun_interface, int fd);\n\nextern char* (*resolve_process_func)(void *tun_interface, int protocol, const char *source, const char *target, int uid);\n\nextern void (*result_func)(void *invoke_Interface, const char *data);\n\nextern void protect(void *tun_interface, int fd);\n\nextern char* resolve_process(void *tun_interface, int protocol, const char *source, const char *target, int uid);\n\nextern void release_object(void *obj);\n\nextern void free_string(char *data);\n\nextern void result(void *invoke_Interface,  const char *data);"
  },
  {
    "path": "core/common.go",
    "content": "package main\n\nimport (\n\tb \"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"github.com/metacubex/mihomo/adapter\"\n\t\"github.com/metacubex/mihomo/adapter/inbound\"\n\t\"github.com/metacubex/mihomo/adapter/outboundgroup\"\n\t\"github.com/metacubex/mihomo/adapter/provider\"\n\t\"github.com/metacubex/mihomo/common/batch\"\n\t\"github.com/metacubex/mihomo/component/dialer\"\n\t\"github.com/metacubex/mihomo/component/resolver\"\n\t\"github.com/metacubex/mihomo/config\"\n\t\"github.com/metacubex/mihomo/constant\"\n\t\"github.com/metacubex/mihomo/constant/features\"\n\tcp \"github.com/metacubex/mihomo/constant/provider\"\n\t\"github.com/metacubex/mihomo/hub\"\n\t\"github.com/metacubex/mihomo/hub/executor\"\n\t\"github.com/metacubex/mihomo/hub/route\"\n\t\"github.com/metacubex/mihomo/listener\"\n\t\"github.com/metacubex/mihomo/log\"\n\trp \"github.com/metacubex/mihomo/rules/provider\"\n\t\"github.com/metacubex/mihomo/tunnel\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"sync\"\n)\n\nvar (\n\tcurrentConfig *config.Config\n\tversion       = 0\n\tisRunning     = false\n\trunLock       sync.Mutex\n\tmBatch, _     = batch.New[bool](context.Background(), batch.WithConcurrencyNum[bool](50))\n)\n\nfunc getExternalProvidersRaw() map[string]cp.Provider {\n\teps := make(map[string]cp.Provider)\n\tfor n, p := range tunnel.Providers() {\n\t\tif p.VehicleType() != cp.Compatible {\n\t\t\teps[n] = p\n\t\t}\n\t}\n\tfor n, p := range tunnel.RuleProviders() {\n\t\tif p.VehicleType() != cp.Compatible {\n\t\t\teps[n] = p\n\t\t}\n\t}\n\treturn eps\n}\n\nfunc toExternalProvider(p cp.Provider) (*ExternalProvider, error) {\n\tswitch p.(type) {\n\tcase *provider.ProxySetProvider:\n\t\tpsp := p.(*provider.ProxySetProvider)\n\t\treturn &ExternalProvider{\n\t\t\tName:             psp.Name(),\n\t\t\tType:             psp.Type().String(),\n\t\t\tVehicleType:      psp.VehicleType().String(),\n\t\t\tCount:            psp.Count(),\n\t\t\tUpdateAt:         psp.UpdatedAt(),\n\t\t\tPath:             psp.Vehicle().Path(),\n\t\t\tSubscriptionInfo: psp.GetSubscriptionInfo(),\n\t\t}, nil\n\tcase *rp.RuleSetProvider:\n\t\trsp := p.(*rp.RuleSetProvider)\n\t\treturn &ExternalProvider{\n\t\t\tName:        rsp.Name(),\n\t\t\tType:        rsp.Type().String(),\n\t\t\tVehicleType: rsp.VehicleType().String(),\n\t\t\tCount:       rsp.Count(),\n\t\t\tUpdateAt:    rsp.UpdatedAt(),\n\t\t\tPath:        rsp.Vehicle().Path(),\n\t\t}, nil\n\tdefault:\n\t\treturn nil, errors.New(\"not external provider\")\n\t}\n}\n\nfunc sideUpdateExternalProvider(p cp.Provider, bytes []byte) error {\n\tswitch p.(type) {\n\tcase *provider.ProxySetProvider:\n\t\tpsp := p.(*provider.ProxySetProvider)\n\t\t_, _, err := psp.SideUpdate(bytes)\n\t\tif err == nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\tcase rp.RuleSetProvider:\n\t\trsp := p.(*rp.RuleSetProvider)\n\t\t_, _, err := rsp.SideUpdate(bytes)\n\t\tif err == nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\tdefault:\n\t\treturn errors.New(\"not external provider\")\n\t}\n}\n\nfunc updateListeners() {\n\tif !isRunning {\n\t\treturn\n\t}\n\tif currentConfig == nil {\n\t\treturn\n\t}\n\tlisteners := currentConfig.Listeners\n\tgeneral := currentConfig.General\n\tlistener.PatchInboundListeners(listeners, tunnel.Tunnel, true)\n\n\tallowLan := general.AllowLan\n\tlistener.SetAllowLan(allowLan)\n\tinbound.SetSkipAuthPrefixes(general.SkipAuthPrefixes)\n\tinbound.SetAllowedIPs(general.LanAllowedIPs)\n\tinbound.SetDisAllowedIPs(general.LanDisAllowedIPs)\n\n\tbindAddress := general.BindAddress\n\tlistener.SetBindAddress(bindAddress)\n\tlistener.ReCreateHTTP(general.Port, tunnel.Tunnel)\n\tlistener.ReCreateSocks(general.SocksPort, tunnel.Tunnel)\n\tlistener.ReCreateRedir(general.RedirPort, tunnel.Tunnel)\n\tlistener.ReCreateTProxy(general.TProxyPort, tunnel.Tunnel)\n\tlistener.ReCreateMixed(general.MixedPort, tunnel.Tunnel)\n\tlistener.ReCreateShadowSocks(general.ShadowSocksConfig, tunnel.Tunnel)\n\tlistener.ReCreateVmess(general.VmessConfig, tunnel.Tunnel)\n\tlistener.ReCreateTuic(general.TuicServer, tunnel.Tunnel)\n\tif !features.Android {\n\t\tlistener.ReCreateTun(general.Tun, tunnel.Tunnel)\n\t}\n}\n\nfunc stopListeners() {\n\tlistener.StopListener()\n}\n\nfunc patchSelectGroup(mapping map[string]string) {\n\tfor name, proxy := range tunnel.ProxiesWithProviders() {\n\t\toutbound, ok := proxy.(*adapter.Proxy)\n\t\tif !ok {\n\t\t\tcontinue\n\t\t}\n\n\t\tselector, ok := outbound.ProxyAdapter.(outboundgroup.SelectAble)\n\t\tif !ok {\n\t\t\tcontinue\n\t\t}\n\n\t\tselected, exist := mapping[name]\n\t\tif !exist {\n\t\t\tcontinue\n\t\t}\n\n\t\tselector.ForceSet(selected)\n\t}\n}\n\nfunc defaultSetupParams() *SetupParams {\n\treturn &SetupParams{\n\t\tTestURL:     \"https://www.gstatic.com/generate_204\",\n\t\tSelectedMap: map[string]string{},\n\t}\n}\n\nfunc readFile(path string) ([]byte, error) {\n\tif _, err := os.Stat(path); os.IsNotExist(err) {\n\t\treturn nil, err\n\t}\n\tdata, err := os.ReadFile(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn data, err\n}\n\nfunc updateConfig(params *UpdateParams) {\n\trunLock.Lock()\n\tdefer runLock.Unlock()\n\tgeneral := currentConfig.General\n\tif params.MixedPort != nil {\n\t\tgeneral.MixedPort = *params.MixedPort\n\t}\n\tif params.Sniffing != nil {\n\t\tgeneral.Sniffing = *params.Sniffing\n\t\ttunnel.SetSniffing(general.Sniffing)\n\t}\n\tif params.FindProcessMode != nil {\n\t\tgeneral.FindProcessMode = *params.FindProcessMode\n\t\ttunnel.SetFindProcessMode(general.FindProcessMode)\n\t}\n\tif params.TCPConcurrent != nil {\n\t\tgeneral.TCPConcurrent = *params.TCPConcurrent\n\t\tdialer.SetTcpConcurrent(general.TCPConcurrent)\n\t}\n\tif params.Interface != nil {\n\t\tgeneral.Interface = *params.Interface\n\t\tdialer.DefaultInterface.Store(general.Interface)\n\t}\n\tif params.UnifiedDelay != nil {\n\t\tgeneral.UnifiedDelay = *params.UnifiedDelay\n\t\tadapter.UnifiedDelay.Store(general.UnifiedDelay)\n\t}\n\tif params.Mode != nil {\n\t\tgeneral.Mode = *params.Mode\n\t\ttunnel.SetMode(general.Mode)\n\t}\n\tif params.LogLevel != nil {\n\t\tgeneral.LogLevel = *params.LogLevel\n\t\tlog.SetLevel(general.LogLevel)\n\t}\n\tif params.IPv6 != nil {\n\t\tgeneral.IPv6 = *params.IPv6\n\t\tresolver.DisableIPv6 = !general.IPv6\n\t}\n\tif params.ExternalController != nil {\n\t\tcurrentConfig.Controller.ExternalController = *params.ExternalController\n\t\troute.ReCreateServer(&route.Config{\n\t\t\tAddr: currentConfig.Controller.ExternalController,\n\t\t})\n\t}\n\n\tif params.Tun != nil {\n\t\tgeneral.Tun.Enable = params.Tun.Enable\n\t\tgeneral.Tun.AutoRoute = *params.Tun.AutoRoute\n\t\tgeneral.Tun.Device = *params.Tun.Device\n\t\tgeneral.Tun.RouteAddress = *params.Tun.RouteAddress\n\t\tgeneral.Tun.DNSHijack = *params.Tun.DNSHijack\n\t\tgeneral.Tun.Stack = *params.Tun.Stack\n\t}\n\n\tupdateListeners()\n}\n\nfunc applyConfig(params *SetupParams) error {\n\truntime.GC()\n\trunLock.Lock()\n\tdefer runLock.Unlock()\n\tvar err error\n\tconstant.DefaultTestURL = params.TestURL\n\tcurrentConfig, err = executor.ParseWithPath(filepath.Join(constant.Path.HomeDir(), \"config.yaml\"))\n\tif err != nil {\n\t\tcurrentConfig, _ = config.ParseRawConfig(config.DefaultRawConfig())\n\t}\n\thub.ApplyConfig(currentConfig)\n\tpatchSelectGroup(params.SelectedMap)\n\tupdateListeners()\n\treturn err\n}\n\nfunc UnmarshalJson(data []byte, v any) error {\n\tdecoder := json.NewDecoder(b.NewReader(data))\n\tdecoder.UseNumber()\n\terr := decoder.Decode(v)\n\treturn err\n}\n"
  },
  {
    "path": "core/constant.go",
    "content": "package main\n\nimport (\n\t\"encoding/json\"\n\t\"github.com/metacubex/mihomo/adapter/provider\"\n\tP \"github.com/metacubex/mihomo/component/process\"\n\t\"github.com/metacubex/mihomo/constant\"\n\t\"github.com/metacubex/mihomo/log\"\n\t\"github.com/metacubex/mihomo/tunnel\"\n\t\"net/netip\"\n\t\"time\"\n)\n\ntype InitParams struct {\n\tHomeDir string `json:\"home-dir\"`\n\tVersion int    `json:\"version\"`\n}\n\ntype SetupParams struct {\n\tSelectedMap map[string]string `json:\"selected-map\"`\n\tTestURL     string            `json:\"test-url\"`\n}\n\ntype UpdateParams struct {\n\tTun                *tunSchema         `json:\"tun\"`\n\tAllowLan           *bool              `json:\"allow-lan\"`\n\tMixedPort          *int               `json:\"mixed-port\"`\n\tFindProcessMode    *P.FindProcessMode `json:\"find-process-mode\"`\n\tMode               *tunnel.TunnelMode `json:\"mode\"`\n\tLogLevel           *log.LogLevel      `json:\"log-level\"`\n\tIPv6               *bool              `json:\"ipv6\"`\n\tSniffing           *bool              `json:\"sniffing\"`\n\tTCPConcurrent      *bool              `json:\"tcp-concurrent\"`\n\tExternalController *string            `json:\"external-controller\"`\n\tInterface          *string            `json:\"interface-name\"`\n\tUnifiedDelay       *bool              `json:\"unified-delay\"`\n}\n\ntype tunSchema struct {\n\tEnable       bool               `yaml:\"enable\" json:\"enable\"`\n\tDevice       *string            `yaml:\"device\" json:\"device\"`\n\tStack        *constant.TUNStack `yaml:\"stack\" json:\"stack\"`\n\tDNSHijack    *[]string          `yaml:\"dns-hijack\" json:\"dns-hijack\"`\n\tAutoRoute    *bool              `yaml:\"auto-route\" json:\"auto-route\"`\n\tRouteAddress *[]netip.Prefix    `yaml:\"route-address\" json:\"route-address,omitempty\"`\n}\n\ntype ChangeProxyParams struct {\n\tGroupName *string `json:\"group-name\"`\n\tProxyName *string `json:\"proxy-name\"`\n}\n\ntype TestDelayParams struct {\n\tProxyName string `json:\"proxy-name\"`\n\tTestUrl   string `json:\"test-url\"`\n\tTimeout   int64  `json:\"timeout\"`\n}\n\ntype ExternalProvider struct {\n\tName             string                     `json:\"name\"`\n\tType             string                     `json:\"type\"`\n\tVehicleType      string                     `json:\"vehicle-type\"`\n\tCount            int                        `json:\"count\"`\n\tPath             string                     `json:\"path\"`\n\tUpdateAt         time.Time                  `json:\"update-at\"`\n\tSubscriptionInfo *provider.SubscriptionInfo `json:\"subscription-info\"`\n}\n\ntype ProxiesData struct {\n\tProxies map[string]constant.Proxy `json:\"proxies\"`\n\tAll     []string                  `json:\"all\"`\n}\n\nconst (\n\tmessageMethod                  Method = \"message\"\n\tinitClashMethod                Method = \"initClash\"\n\tgetIsInitMethod                Method = \"getIsInit\"\n\tforceGcMethod                  Method = \"forceGc\"\n\tshutdownMethod                 Method = \"shutdown\"\n\tvalidateConfigMethod           Method = \"validateConfig\"\n\tupdateConfigMethod             Method = \"updateConfig\"\n\tgetProxiesMethod               Method = \"getProxies\"\n\tchangeProxyMethod              Method = \"changeProxy\"\n\tgetTrafficMethod               Method = \"getTraffic\"\n\tgetTotalTrafficMethod          Method = \"getTotalTraffic\"\n\tresetTrafficMethod             Method = \"resetTraffic\"\n\tasyncTestDelayMethod           Method = \"asyncTestDelay\"\n\tgetConnectionsMethod           Method = \"getConnections\"\n\tcloseConnectionsMethod         Method = \"closeConnections\"\n\tresetConnectionsMethod         Method = \"resetConnectionsMethod\"\n\tcloseConnectionMethod          Method = \"closeConnection\"\n\tgetExternalProvidersMethod     Method = \"getExternalProviders\"\n\tgetExternalProviderMethod      Method = \"getExternalProvider\"\n\tgetCountryCodeMethod           Method = \"getCountryCode\"\n\tgetMemoryMethod                Method = \"getMemory\"\n\tupdateGeoDataMethod            Method = \"updateGeoData\"\n\tupdateExternalProviderMethod   Method = \"updateExternalProvider\"\n\tsideLoadExternalProviderMethod Method = \"sideLoadExternalProvider\"\n\tstartLogMethod                 Method = \"startLog\"\n\tstopLogMethod                  Method = \"stopLog\"\n\tstartListenerMethod            Method = \"startListener\"\n\tstopListenerMethod             Method = \"stopListener\"\n\tupdateDnsMethod                Method = \"updateDns\"\n\tcrashMethod                    Method = \"crash\"\n\tsetupConfigMethod              Method = \"setupConfig\"\n\tgetConfigMethod                Method = \"getConfig\"\n\tdeleteFile                     Method = \"deleteFile\"\n)\n\ntype Method string\n\ntype MessageType string\n\ntype Delay struct {\n\tUrl   string `json:\"url\"`\n\tName  string `json:\"name\"`\n\tValue int32  `json:\"value\"`\n}\n\ntype Message struct {\n\tType MessageType `json:\"type\"`\n\tData interface{} `json:\"data\"`\n}\n\nconst (\n\tLogMessage     MessageType = \"log\"\n\tDelayMessage   MessageType = \"delay\"\n\tRequestMessage MessageType = \"request\"\n\tLoadedMessage  MessageType = \"loaded\"\n)\n\nfunc (message *Message) Json() (string, error) {\n\tdata, err := json.Marshal(message)\n\treturn string(data), err\n}\n"
  },
  {
    "path": "core/go.mod",
    "content": "module core\n\ngo 1.20\n\nreplace github.com/metacubex/mihomo => ./Clash.Meta\n\nrequire (\n\tgithub.com/metacubex/mihomo v0.0.0-00010101000000-000000000000\n\tgolang.org/x/sync v0.11.0\n)\n\nrequire (\n\tfilippo.io/edwards25519 v1.1.0 // indirect\n\tgithub.com/RyuaNerin/go-krypto v1.3.0 // indirect\n\tgithub.com/Yawning/aez v0.0.0-20211027044916-e49e68abd344 // indirect\n\tgithub.com/ajg/form v1.5.1 // indirect\n\tgithub.com/andybalholm/brotli v1.0.6 // indirect\n\tgithub.com/bahlo/generic-list-go v0.2.0 // indirect\n\tgithub.com/buger/jsonparser v1.1.1 // indirect\n\tgithub.com/coreos/go-iptables v0.8.0 // indirect\n\tgithub.com/dlclark/regexp2 v1.11.5 // indirect\n\tgithub.com/enfein/mieru/v3 v3.26.2 // indirect\n\tgithub.com/ericlagergren/aegis v0.0.0-20250325060835-cd0defd64358 // indirect\n\tgithub.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391 // indirect\n\tgithub.com/ericlagergren/siv v0.0.0-20220507050439-0b757b3aa5f1 // indirect\n\tgithub.com/ericlagergren/subtle v0.0.0-20220507045147-890d697da010 // indirect\n\tgithub.com/fsnotify/fsnotify v1.9.0 // indirect\n\tgithub.com/gaukas/godicttls v0.0.4 // indirect\n\tgithub.com/go-ole/go-ole v1.3.0 // indirect\n\tgithub.com/gobwas/httphead v0.1.0 // indirect\n\tgithub.com/gobwas/pool v0.2.1 // indirect\n\tgithub.com/gobwas/ws v1.4.0 // indirect\n\tgithub.com/gofrs/uuid/v5 v5.4.0 // indirect\n\tgithub.com/golang/snappy v1.0.0 // indirect\n\tgithub.com/google/btree v1.1.3 // indirect\n\tgithub.com/google/go-cmp v0.6.0 // indirect\n\tgithub.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 // indirect\n\tgithub.com/insomniacslk/dhcp v0.0.0-20250109001534-8abf58130905 // indirect\n\tgithub.com/josharian/native v1.1.0 // indirect\n\tgithub.com/klauspost/compress v1.17.9 // indirect\n\tgithub.com/klauspost/cpuid/v2 v2.2.6 // indirect\n\tgithub.com/klauspost/reedsolomon v1.12.3 // indirect\n\tgithub.com/mailru/easyjson v0.7.7 // indirect\n\tgithub.com/mdlayher/netlink v1.7.2 // indirect\n\tgithub.com/mdlayher/socket v0.4.1 // indirect\n\tgithub.com/metacubex/amneziawg-go v0.0.0-20251104174305-5a0e9f7e361d // indirect\n\tgithub.com/metacubex/ascon v0.1.0 // indirect\n\tgithub.com/metacubex/bart v0.26.0 // indirect\n\tgithub.com/metacubex/bbolt v0.0.0-20250725135710-010dbbbb7a5b // indirect\n\tgithub.com/metacubex/blake3 v0.1.0 // indirect\n\tgithub.com/metacubex/chacha v0.1.5 // indirect\n\tgithub.com/metacubex/chi v0.1.0 // indirect\n\tgithub.com/metacubex/cpu v0.1.0 // indirect\n\tgithub.com/metacubex/fswatch v0.1.1 // indirect\n\tgithub.com/metacubex/gopacket v1.1.20-0.20230608035415-7e2f98a3e759 // indirect\n\tgithub.com/metacubex/gvisor v0.0.0-20251227095601-261ec1326fe8 // indirect\n\tgithub.com/metacubex/hkdf v0.1.0 // indirect\n\tgithub.com/metacubex/hpke v0.1.0 // indirect\n\tgithub.com/metacubex/http v0.1.0 // indirect\n\tgithub.com/metacubex/kcp-go v0.0.0-20260105040817-550693377604 // indirect\n\tgithub.com/metacubex/mlkem v0.1.0 // indirect\n\tgithub.com/metacubex/nftables v0.0.0-20250503052935-30a69ab87793 // indirect\n\tgithub.com/metacubex/qpack v0.6.0 // indirect\n\tgithub.com/metacubex/quic-go v0.59.1-0.20260112033758-aa29579f2001 // indirect\n\tgithub.com/metacubex/randv2 v0.2.0 // indirect\n\tgithub.com/metacubex/restls-client-go v0.1.7 // indirect\n\tgithub.com/metacubex/sing v0.5.6 // indirect\n\tgithub.com/metacubex/sing-mux v0.3.4 // indirect\n\tgithub.com/metacubex/sing-quic v0.0.0-20260112044712-65d17608159e // indirect\n\tgithub.com/metacubex/sing-shadowsocks v0.2.12 // indirect\n\tgithub.com/metacubex/sing-shadowsocks2 v0.2.7 // indirect\n\tgithub.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2 // indirect\n\tgithub.com/metacubex/sing-tun v0.4.11 // indirect\n\tgithub.com/metacubex/sing-vmess v0.2.4 // indirect\n\tgithub.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f // indirect\n\tgithub.com/metacubex/smux v0.0.0-20260105030934-d0c8756d3141 // indirect\n\tgithub.com/metacubex/tfo-go v0.0.0-20251130171125-413e892ac443 // indirect\n\tgithub.com/metacubex/tls v0.1.1 // indirect\n\tgithub.com/metacubex/utls v1.8.4 // indirect\n\tgithub.com/metacubex/wireguard-go v0.0.0-20250820062549-a6cecdd7f57f // indirect\n\tgithub.com/metacubex/yamux v0.0.0-20250918083631-dd5f17c0be49 // indirect\n\tgithub.com/miekg/dns v1.1.63 // indirect\n\tgithub.com/mroth/weightedrand/v2 v2.1.0 // indirect\n\tgithub.com/oasisprotocol/deoxysii v0.0.0-20220228165953-2091330c22b7 // indirect\n\tgithub.com/openacid/low v0.1.21 // indirect\n\tgithub.com/oschwald/maxminddb-golang v1.12.0 // indirect\n\tgithub.com/pierrec/lz4/v4 v4.1.14 // indirect\n\tgithub.com/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a // indirect\n\tgithub.com/samber/lo v1.52.0 // indirect\n\tgithub.com/sina-ghaderi/poly1305 v0.0.0-20220724002748-c5926b03988b // indirect\n\tgithub.com/sina-ghaderi/rabaead v0.0.0-20220730151906-ab6e06b96e8c // indirect\n\tgithub.com/sina-ghaderi/rabbitio v0.0.0-20220730151941-9ce26f4f872e // indirect\n\tgithub.com/sirupsen/logrus v1.9.3 // indirect\n\tgithub.com/u-root/uio v0.0.0-20230220225925-ffce2a382923 // indirect\n\tgithub.com/vishvananda/netns v0.0.4 // indirect\n\tgithub.com/vmihailenco/msgpack/v5 v5.4.1 // indirect\n\tgithub.com/vmihailenco/tagparser/v2 v2.0.0 // indirect\n\tgithub.com/wk8/go-ordered-map/v2 v2.1.8 // indirect\n\tgitlab.com/go-extension/aes-ccm v0.0.0-20230221065045-e58665ef23c7 // indirect\n\tgitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec // indirect\n\tgo4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect\n\tgolang.org/x/crypto v0.33.0 // indirect\n\tgolang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // indirect\n\tgolang.org/x/mod v0.20.0 // indirect\n\tgolang.org/x/net v0.35.0 // indirect\n\tgolang.org/x/sys v0.30.0 // indirect\n\tgolang.org/x/text v0.22.0 // indirect\n\tgolang.org/x/time v0.10.0 // indirect\n\tgolang.org/x/tools v0.24.0 // indirect\n\tgoogle.golang.org/protobuf v1.34.2 // indirect\n\tgopkg.in/yaml.v3 v3.0.1 // indirect\n)\n"
  },
  {
    "path": "core/go.sum",
    "content": "filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=\nfilippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=\ngithub.com/RyuaNerin/go-krypto v1.3.0 h1:smavTzSMAx8iuVlGb4pEwl9MD2qicqMzuXR2QWp2/Pg=\ngithub.com/RyuaNerin/go-krypto v1.3.0/go.mod h1:9R9TU936laAIqAmjcHo/LsaXYOZlymudOAxjaBf62UM=\ngithub.com/RyuaNerin/testingutil v0.1.0 h1:IYT6JL57RV3U2ml3dLHZsVtPOP6yNK7WUVdzzlpNrss=\ngithub.com/Yawning/aez v0.0.0-20211027044916-e49e68abd344 h1:cDVUiFo+npB0ZASqnw4q90ylaVAbnYyx0JYqK4YcGok=\ngithub.com/Yawning/aez v0.0.0-20211027044916-e49e68abd344/go.mod h1:9pIqrY6SXNL8vjRQE5Hd/OL5GyK/9MrGUWs87z/eFfk=\ngithub.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU=\ngithub.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=\ngithub.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI=\ngithub.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=\ngithub.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk=\ngithub.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg=\ngithub.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=\ngithub.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=\ngithub.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=\ngithub.com/coreos/go-iptables v0.8.0 h1:MPc2P89IhuVpLI7ETL/2tx3XZ61VeICZjYqDEgNsPRc=\ngithub.com/coreos/go-iptables v0.8.0/go.mod h1:Qe8Bv2Xik5FyTXwgIbLAnv2sWSBmvWdFETJConOQ//Q=\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/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ=\ngithub.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=\ngithub.com/enfein/mieru/v3 v3.26.2 h1:U/2XJc+3vrJD9r815FoFdwToQFEcqSOzzzWIPPhjfEU=\ngithub.com/enfein/mieru/v3 v3.26.2/go.mod h1:zJBUCsi5rxyvHM8fjFf+GLaEl4OEjjBXr1s5F6Qd3hM=\ngithub.com/ericlagergren/aegis v0.0.0-20250325060835-cd0defd64358 h1:kXYqH/sL8dS/FdoFjr12ePjnLPorPo2FsnrHNuXSDyo=\ngithub.com/ericlagergren/aegis v0.0.0-20250325060835-cd0defd64358/go.mod h1:hkIFzoiIPZYxdFOOLyDho59b7SrDfo+w3h+yWdlg45I=\ngithub.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391 h1:8j2RH289RJplhA6WfdaPqzg1MjH2K8wX5e0uhAxrw2g=\ngithub.com/ericlagergren/polyval v0.0.0-20220411101811-e25bc10ba391/go.mod h1:K2R7GhgxrlJzHw2qiPWsCZXf/kXEJN9PLnQK73Ll0po=\ngithub.com/ericlagergren/saferand v0.0.0-20220206064634-960a4dd2bc5c h1:RUzBDdZ+e/HEe2Nh8lYsduiPAZygUfVXJn0Ncj5sHMg=\ngithub.com/ericlagergren/siv v0.0.0-20220507050439-0b757b3aa5f1 h1:tlDMEdcPRQKBEz5nGDMvswiajqh7k8ogWRlhRwKy5mY=\ngithub.com/ericlagergren/siv v0.0.0-20220507050439-0b757b3aa5f1/go.mod h1:4RfsapbGx2j/vU5xC/5/9qB3kn9Awp1YDiEnN43QrJ4=\ngithub.com/ericlagergren/subtle v0.0.0-20220507045147-890d697da010 h1:fuGucgPk5dN6wzfnxl3D0D3rVLw4v2SbBT9jb4VnxzA=\ngithub.com/ericlagergren/subtle v0.0.0-20220507045147-890d697da010/go.mod h1:JtBcj7sBuTTRupn7c2bFspMDIObMJsVK8TeUvpShPok=\ngithub.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=\ngithub.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=\ngithub.com/gaukas/godicttls v0.0.4 h1:NlRaXb3J6hAnTmWdsEKb9bcSBD6BvcIjdGdeb0zfXbk=\ngithub.com/gaukas/godicttls v0.0.4/go.mod h1:l6EenT4TLWgTdwslVb4sEMOCf7Bv0JAK67deKr9/NCI=\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/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU=\ngithub.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=\ngithub.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=\ngithub.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=\ngithub.com/gobwas/ws v1.4.0 h1:CTaoG1tojrh4ucGPcoJFiAQUAsEWekEWvLy7GsVNqGs=\ngithub.com/gobwas/ws v1.4.0/go.mod h1:G3gNqMNtPppf5XUz7O4shetPpcZ1VJ7zt18dlUeakrc=\ngithub.com/gofrs/uuid/v5 v5.4.0 h1:EfbpCTjqMuGyq5ZJwxqzn3Cbr2d0rUZU7v5ycAk/e/0=\ngithub.com/gofrs/uuid/v5 v5.4.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=\ngithub.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs=\ngithub.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\ngithub.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=\ngithub.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=\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/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k=\ngithub.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=\ngithub.com/google/tink/go v1.6.1 h1:t7JHqO8Ath2w2ig5vjwQYJzhGEZymedQc90lQXUBa4I=\ngithub.com/insomniacslk/dhcp v0.0.0-20250109001534-8abf58130905 h1:q3OEI9RaN/wwcx+qgGo6ZaoJkCiDYe/gjDLfq7lQQF4=\ngithub.com/insomniacslk/dhcp v0.0.0-20250109001534-8abf58130905/go.mod h1:VvGYjkZoJyKqlmT1yzakUs4mfKMNB0XdODP0+rdml6k=\ngithub.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=\ngithub.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=\ngithub.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA=\ngithub.com/josharian/native v1.1.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=\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.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc=\ngithub.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=\ngithub.com/klauspost/reedsolomon v1.12.3 h1:tzUznbfc3OFwJaTebv/QdhnFf2Xvb7gZ24XaHLBPmdc=\ngithub.com/klauspost/reedsolomon v1.12.3/go.mod h1:3K5rXwABAvzGeR01r6pWZieUALXO/Tq7bFKGIb4m4WI=\ngithub.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=\ngithub.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=\ngithub.com/mdlayher/netlink v1.7.2 h1:/UtM3ofJap7Vl4QWCPDGXY8d3GIY2UGSDbK+QWmY8/g=\ngithub.com/mdlayher/netlink v1.7.2/go.mod h1:xraEF7uJbxLhc5fpHL4cPe221LI2bdttWlU+ZGLfQSw=\ngithub.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U=\ngithub.com/mdlayher/socket v0.4.1/go.mod h1:cAqeGjoufqdxWkD7DkpyS+wcefOtmu5OQ8KuoJGIReA=\ngithub.com/metacubex/amneziawg-go v0.0.0-20251104174305-5a0e9f7e361d h1:vAJ0ZT4aO803F1uw2roIA9yH7Sxzox34tVVyye1bz6c=\ngithub.com/metacubex/amneziawg-go v0.0.0-20251104174305-5a0e9f7e361d/go.mod h1:MsM/5czONyXMJ3PRr5DbQ4O/BxzAnJWOIcJdLzW6qHY=\ngithub.com/metacubex/ascon v0.1.0 h1:6ZWxmXYszT1XXtwkf6nxfFhc/OTtQ9R3Vyj1jN32lGM=\ngithub.com/metacubex/ascon v0.1.0/go.mod h1:eV5oim4cVPPdEL8/EYaTZ0iIKARH9pnhAK/fcT5Kacc=\ngithub.com/metacubex/bart v0.26.0 h1:d/bBTvVatfVWGfQbiDpYKI1bXUJgjaabB2KpK1Tnk6w=\ngithub.com/metacubex/bart v0.26.0/go.mod h1:DCcyfP4MC+Zy7sLK7XeGuMw+P5K9mIRsYOBgiE8icsI=\ngithub.com/metacubex/bbolt v0.0.0-20250725135710-010dbbbb7a5b h1:j7dadXD8I2KTmMt8jg1JcaP1ANL3JEObJPdANKcSYPY=\ngithub.com/metacubex/bbolt v0.0.0-20250725135710-010dbbbb7a5b/go.mod h1:+WmP0VJZDkDszvpa83HzfUp6QzARl/IKkMorH4+nODw=\ngithub.com/metacubex/blake3 v0.1.0 h1:KGnjh/56REO7U+cgZA8dnBhxdP7jByrG7hTP+bu6cqY=\ngithub.com/metacubex/blake3 v0.1.0/go.mod h1:CCkLdzFrqf7xmxCdhQFvJsRRV2mwOLDoSPg6vUTB9Uk=\ngithub.com/metacubex/chacha v0.1.5 h1:fKWMb/5c7ZrY8Uoqi79PPFxl+qwR7X/q0OrsAubyX2M=\ngithub.com/metacubex/chacha v0.1.5/go.mod h1:Djn9bPZxLTXbJFSeyo0/qzEzQI+gUSSzttuzZM75GH8=\ngithub.com/metacubex/chi v0.1.0 h1:rjNDyDj50nRpicG43CNkIw4ssiCbmDL8d7wJXKlUCsg=\ngithub.com/metacubex/chi v0.1.0/go.mod h1:zM5u5oMQt8b2DjvDHvzadKrP6B2ztmasL1YHRMbVV+g=\ngithub.com/metacubex/cpu v0.1.0 h1:8PeTdV9j6UKbN1K5Jvtbi/Jock7dknvzyYuLb8Conmk=\ngithub.com/metacubex/cpu v0.1.0/go.mod h1:09VEt4dSRLR+bOA8l4w4NDuzGZ8n5dkMv7e8axgEeTU=\ngithub.com/metacubex/fswatch v0.1.1 h1:jqU7C/v+g0qc2RUFgmAOPoVvfl2BXXUXEumn6oQuxhU=\ngithub.com/metacubex/fswatch v0.1.1/go.mod h1:czrTT7Zlbz7vWft8RQu9Qqh+JoX+Nnb+UabuyN1YsgI=\ngithub.com/metacubex/gopacket v1.1.20-0.20230608035415-7e2f98a3e759 h1:cjd4biTvOzK9ubNCCkQ+ldc4YSH/rILn53l/xGBFHHI=\ngithub.com/metacubex/gopacket v1.1.20-0.20230608035415-7e2f98a3e759/go.mod h1:UHOv2xu+RIgLwpXca7TLrXleEd4oR3sPatW6IF8wU88=\ngithub.com/metacubex/gvisor v0.0.0-20251227095601-261ec1326fe8 h1:hUL81H0Ic/XIDkvtn9M1pmfDdfid7JzYQToY4Ps1TvQ=\ngithub.com/metacubex/gvisor v0.0.0-20251227095601-261ec1326fe8/go.mod h1:8LpS0IJW1VmWzUm3ylb0e2SK5QDm5lO/2qwWLZgRpBU=\ngithub.com/metacubex/hkdf v0.1.0 h1:fPA6VzXK8cU1foc/TOmGCDmSa7pZbxlnqhl3RNsthaA=\ngithub.com/metacubex/hkdf v0.1.0/go.mod h1:3seEfds3smgTAXqUGn+tgEJH3uXdsUjOiduG/2EtvZ4=\ngithub.com/metacubex/hpke v0.1.0 h1:gu2jUNhraehWi0P/z5HX2md3d7L1FhPQE6/Q0E9r9xQ=\ngithub.com/metacubex/hpke v0.1.0/go.mod h1:vfDm6gfgrwlXUxKDkWbcE44hXtmc1uxLDm2BcR11b3U=\ngithub.com/metacubex/http v0.1.0 h1:Jcy0I9zKjYijSUaksZU34XEe2xNdoFkgUTB7z7K5q0o=\ngithub.com/metacubex/http v0.1.0/go.mod h1:Nxx0zZAo2AhRfanyL+fmmK6ACMtVsfpwIl1aFAik2Eg=\ngithub.com/metacubex/kcp-go v0.0.0-20260105040817-550693377604 h1:hJwCVlE3ojViC35MGHB+FBr8TuIf3BUFn2EQ1VIamsI=\ngithub.com/metacubex/kcp-go v0.0.0-20260105040817-550693377604/go.mod h1:lpmN3m269b3V5jFCWtffqBLS4U3QQoIid9ugtO+OhVc=\ngithub.com/metacubex/mlkem v0.1.0 h1:wFClitonSFcmipzzQvax75beLQU+D7JuC+VK1RzSL8I=\ngithub.com/metacubex/mlkem v0.1.0/go.mod h1:amhaXZVeYNShuy9BILcR7P0gbeo/QLZsnqCdL8U2PDQ=\ngithub.com/metacubex/nftables v0.0.0-20250503052935-30a69ab87793 h1:1Qpuy+sU3DmyX9HwI+CrBT/oLNJngvBorR2RbajJcqo=\ngithub.com/metacubex/nftables v0.0.0-20250503052935-30a69ab87793/go.mod h1:RjRNb4G52yAgfR+Oe/kp9G4PJJ97Fnj89eY1BFO3YyA=\ngithub.com/metacubex/qpack v0.6.0 h1:YqClGIMOpiRYLjV1qOs483Od08MdPgRnHjt90FuaAKw=\ngithub.com/metacubex/qpack v0.6.0/go.mod h1:lKGSi7Xk94IMvHGOmxS9eIei3bvIqpOAImEBsaOwTkA=\ngithub.com/metacubex/quic-go v0.59.1-0.20260112033758-aa29579f2001 h1:RlT3bFCIDM/NR9GWaDbFCrweOwpHRfgaT9c0zuRlPhY=\ngithub.com/metacubex/quic-go v0.59.1-0.20260112033758-aa29579f2001/go.mod h1:oNzMrmylS897M3zSMuapIdwSwfq6F2qW01Z3NhVRJhk=\ngithub.com/metacubex/randv2 v0.2.0 h1:uP38uBvV2SxYfLj53kuvAjbND4RUDfFJjwr4UigMiLs=\ngithub.com/metacubex/randv2 v0.2.0/go.mod h1:kFi2SzrQ5WuneuoLLCMkABtiBu6VRrMrWFqSPyj2cxY=\ngithub.com/metacubex/restls-client-go v0.1.7 h1:eCwiXCTQb5WJu9IlgYvDBA1OgrINv58dEe7hcN5H15k=\ngithub.com/metacubex/restls-client-go v0.1.7/go.mod h1:BN/U52vPw7j8VTSh2vleD/MnmVKCov84mS5VcjVHH4g=\ngithub.com/metacubex/sing v0.5.6 h1:mEPDCadsCj3DB8gn+t/EtposlYuALEkExa/LUguw6/c=\ngithub.com/metacubex/sing v0.5.6/go.mod h1:ypf0mjwlZm0sKdQSY+yQvmsbWa0hNPtkeqyRMGgoN+w=\ngithub.com/metacubex/sing-mux v0.3.4 h1:tf4r27CIkzaxq9kBlAXQkgMXq2HPp5Mta60Kb4RCZF0=\ngithub.com/metacubex/sing-mux v0.3.4/go.mod h1:SEJfAuykNj/ozbPqngEYqyggwSr81+L7Nu09NRD5mh4=\ngithub.com/metacubex/sing-quic v0.0.0-20260112044712-65d17608159e h1:MLxp42z9Jd6LtY2suyawnl24oNzIsFxWc15bNeDIGxA=\ngithub.com/metacubex/sing-quic v0.0.0-20260112044712-65d17608159e/go.mod h1:+lgKTd52xAarGtqugALISShyw4KxnoEpYe2u0zJh26w=\ngithub.com/metacubex/sing-shadowsocks v0.2.12 h1:Wqzo8bYXrK5aWqxu/TjlTnYZzAKtKsaFQBdr6IHFaBE=\ngithub.com/metacubex/sing-shadowsocks v0.2.12/go.mod h1:2e5EIaw0rxKrm1YTRmiMnDulwbGxH9hAFlrwQLQMQkU=\ngithub.com/metacubex/sing-shadowsocks2 v0.2.7 h1:hSuuc0YpsfiqYqt1o+fP4m34BQz4e6wVj3PPBVhor3A=\ngithub.com/metacubex/sing-shadowsocks2 v0.2.7/go.mod h1:vOEbfKC60txi0ca+yUlqEwOGc3Obl6cnSgx9Gf45KjE=\ngithub.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2 h1:gXU+MYPm7Wme3/OAY2FFzVq9d9GxPHOqu5AQfg/ddhI=\ngithub.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2/go.mod h1:mbfboaXauKJNIHJYxQRa+NJs4JU9NZfkA+I33dS2+9E=\ngithub.com/metacubex/sing-tun v0.4.11 h1:NG5zpvYPbBXf+9GSUmDaGCDwl3hZXV677tbRAw0QtCM=\ngithub.com/metacubex/sing-tun v0.4.11/go.mod h1:L/TjQY5JEGy8nvsuYmy/XgMFMCPiF0+AWSFCYfS6r9w=\ngithub.com/metacubex/sing-vmess v0.2.4 h1:Tx6AGgCiEf400E/xyDuYyafsel6sGbR8oF7RkAaus6I=\ngithub.com/metacubex/sing-vmess v0.2.4/go.mod h1:21R5R1u90uUvBQF0owoooEu96/SAYYD56nDrwm6nFaM=\ngithub.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f h1:Sr/DYKYofKHKc4GF3qkRGNuj6XA6c0eqPgEDN+VAsYU=\ngithub.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f/go.mod h1:jpAkVLPnCpGSfNyVmj6Cq4YbuZsFepm/Dc+9BAOcR80=\ngithub.com/metacubex/smux v0.0.0-20260105030934-d0c8756d3141 h1:DK2l6m2Fc85H2BhiAPgbJygiWhesPlfGmF+9Vw6ARdk=\ngithub.com/metacubex/smux v0.0.0-20260105030934-d0c8756d3141/go.mod h1:/yI4OiGOSn0SURhZdJF3CbtPg3nwK700bG8TZLMBvAg=\ngithub.com/metacubex/tfo-go v0.0.0-20251130171125-413e892ac443 h1:H6TnfM12tOoTizYE/qBHH3nEuibIelmHI+BVSxVJr8o=\ngithub.com/metacubex/tfo-go v0.0.0-20251130171125-413e892ac443/go.mod h1:l9oLnLoEXyGZ5RVLsh7QCC5XsouTUyKk4F2nLm2DHLw=\ngithub.com/metacubex/tls v0.1.1 h1:BEcZrsPTTfNf4sKZ02EbZodv4UIj7fgHWa1Eqo12Bc0=\ngithub.com/metacubex/tls v0.1.1/go.mod h1:0XeVdL0cBw+8i5Hqy3lVeP9IyD/LFTq02ExvHM6rzEM=\ngithub.com/metacubex/utls v1.8.4 h1:HmL9nUApDdWSkgUyodfwF6hSjtiwCGGdyhaSpEejKpg=\ngithub.com/metacubex/utls v1.8.4/go.mod h1:kncGGVhFaoGn5M3pFe3SXhZCzsbCJayNOH4UEqTKTko=\ngithub.com/metacubex/wireguard-go v0.0.0-20250820062549-a6cecdd7f57f h1:FGBPRb1zUabhPhDrlKEjQ9lgIwQ6cHL4x8M9lrERhbk=\ngithub.com/metacubex/wireguard-go v0.0.0-20250820062549-a6cecdd7f57f/go.mod h1:oPGcV994OGJedmmxrcK9+ni7jUEMGhR+uVQAdaduIP4=\ngithub.com/metacubex/yamux v0.0.0-20250918083631-dd5f17c0be49 h1:lhlqpYHopuTLx9xQt22kSA9HtnyTDmk5XjjQVCGHe2E=\ngithub.com/metacubex/yamux v0.0.0-20250918083631-dd5f17c0be49/go.mod h1:MBeEa9IVBphH7vc3LNtW6ZujVXFizotPo3OEiHQ+TNU=\ngithub.com/miekg/dns v1.1.63 h1:8M5aAw6OMZfFXTT7K5V0Eu5YiiL8l7nUAkyN6C9YwaY=\ngithub.com/miekg/dns v1.1.63/go.mod h1:6NGHfjhpmr5lt3XPLuyfDJi5AXbNIPM9PY6H6sF1Nfs=\ngithub.com/mroth/weightedrand/v2 v2.1.0 h1:o1ascnB1CIVzsqlfArQQjeMy1U0NcIbBO5rfd5E/OeU=\ngithub.com/mroth/weightedrand/v2 v2.1.0/go.mod h1:f2faGsfOGOwc1p94wzHKKZyTpcJUW7OJ/9U4yfiNAOU=\ngithub.com/oasisprotocol/deoxysii v0.0.0-20220228165953-2091330c22b7 h1:1102pQc2SEPp5+xrS26wEaeb26sZy6k9/ZXlZN+eXE4=\ngithub.com/oasisprotocol/deoxysii v0.0.0-20220228165953-2091330c22b7/go.mod h1:UqoUn6cHESlliMhOnKLWr+CBH+e3bazUPvFj1XZwAjs=\ngithub.com/openacid/errors v0.8.1/go.mod h1:GUQEJJOJE3W9skHm8E8Y4phdl2LLEN8iD7c5gcGgdx0=\ngithub.com/openacid/low v0.1.21 h1:Tr2GNu4N/+rGRYdOsEHOE89cxUIaDViZbVmKz29uKGo=\ngithub.com/openacid/low v0.1.21/go.mod h1:q+MsKI6Pz2xsCkzV4BLj7NR5M4EX0sGz5AqotpZDVh0=\ngithub.com/openacid/must v0.1.3/go.mod h1:luPiXCuJlEo3UUFQngVQokV0MPGryeYvtCbQPs3U1+I=\ngithub.com/openacid/testkeys v0.1.6/go.mod h1:MfA7cACzBpbiwekivj8StqX0WIRmqlMsci1c37CA3Do=\ngithub.com/oschwald/maxminddb-golang v1.12.0 h1:9FnTOD0YOhP7DGxGsq4glzpGy5+w7pq50AS6wALUMYs=\ngithub.com/oschwald/maxminddb-golang v1.12.0/go.mod h1:q0Nob5lTCqyQ8WT6FYgS1L7PXKVVbgiymefNwIjPzgY=\ngithub.com/pierrec/lz4/v4 v4.1.14 h1:+fL8AQEZtz/ijeNnpduH0bROTu0O3NZAlPjQxGn8LwE=\ngithub.com/pierrec/lz4/v4 v4.1.14/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=\ngithub.com/pkg/errors v0.9.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/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a h1:ObwtHN2VpqE0ZNjr6sGeT00J8uU7JF4cNUdb44/Duis=\ngithub.com/sagernet/netlink v0.0.0-20240612041022-b9a21c07ac6a/go.mod h1:xLnfdiJbSp8rNqYEdIW/6eDO4mVoogml14Bh2hSiFpM=\ngithub.com/samber/lo v1.52.0 h1:Rvi+3BFHES3A8meP33VPAxiBZX/Aws5RxrschYGjomw=\ngithub.com/samber/lo v1.52.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0=\ngithub.com/sina-ghaderi/poly1305 v0.0.0-20220724002748-c5926b03988b h1:rXHg9GrUEtWZhEkrykicdND3VPjlVbYiLdX9J7gimS8=\ngithub.com/sina-ghaderi/poly1305 v0.0.0-20220724002748-c5926b03988b/go.mod h1:X7qrxNQViEaAN9LNZOPl9PfvQtp3V3c7LTo0dvGi0fM=\ngithub.com/sina-ghaderi/rabaead v0.0.0-20220730151906-ab6e06b96e8c h1:DjKMC30y6yjG3IxDaeAj3PCoRr+IsO+bzyT+Se2m2Hk=\ngithub.com/sina-ghaderi/rabaead v0.0.0-20220730151906-ab6e06b96e8c/go.mod h1:NV/a66PhhWYVmUMaotlXJ8fIEFB98u+c8l/CQIEFLrU=\ngithub.com/sina-ghaderi/rabbitio v0.0.0-20220730151941-9ce26f4f872e h1:ur8uMsPIFG3i4Gi093BQITvwH9znsz2VUZmnmwHvpIo=\ngithub.com/sina-ghaderi/rabbitio v0.0.0-20220730151941-9ce26f4f872e/go.mod h1:+e5fBW3bpPyo+3uLo513gIUblc03egGjMM0+5GKbzK8=\ngithub.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=\ngithub.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=\ngithub.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\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.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=\ngithub.com/u-root/uio v0.0.0-20230220225925-ffce2a382923 h1:tHNk7XK9GkmKUR6Gh8gVBKXc2MVSZ4G/NnWLtzw4gNA=\ngithub.com/u-root/uio v0.0.0-20230220225925-ffce2a382923/go.mod h1:eLL9Nub3yfAho7qB0MzZizFhTU2QkLeoVsWdHtDW264=\ngithub.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=\ngithub.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=\ngithub.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/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/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8=\ngithub.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok=\ngithub.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g=\ngithub.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=\ngithub.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc=\ngithub.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw=\ngithub.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae h1:J0GxkO96kL4WF+AIT3M4mfUVinOCPgf2uUWYFUzN0sM=\ngitlab.com/go-extension/aes-ccm v0.0.0-20230221065045-e58665ef23c7 h1:UNrDfkQqiEYzdMlNsVvBYOAJWZjdktqFE9tQh5BT2+4=\ngitlab.com/go-extension/aes-ccm v0.0.0-20230221065045-e58665ef23c7/go.mod h1:E+rxHvJG9H6PUdzq9NRG6csuLN3XUx98BfGOVWNYnXs=\ngitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec h1:FpfFs4EhNehiVfzQttTuxanPIT43FtkkCFypIod8LHo=\ngitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec/go.mod h1:BZ1RAoRPbCxum9Grlv5aeksu2H8BiKehBYooU2LFiOQ=\ngo.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=\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/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus=\ngolang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M=\ngolang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e h1:I88y4caeGeuDQxgdoFPUq097j7kNfw6uvuiNxUBfcBk=\ngolang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ=\ngolang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=\ngolang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=\ngolang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=\ngolang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8=\ngolang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=\ngolang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=\ngolang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=\ngolang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20220622161953-175b2fd9d664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/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.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=\ngolang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=\ngolang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=\ngolang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4=\ngolang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=\ngolang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=\ngolang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=\ngolang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\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 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/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=\n"
  },
  {
    "path": "core/hub.go",
    "content": "package main\n\nimport (\n\t\"cmp\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"github.com/metacubex/mihomo/adapter\"\n\t\"github.com/metacubex/mihomo/adapter/outboundgroup\"\n\t\"github.com/metacubex/mihomo/common/observable\"\n\t\"github.com/metacubex/mihomo/common/utils\"\n\t\"github.com/metacubex/mihomo/component/mmdb\"\n\t\"github.com/metacubex/mihomo/component/resolver\"\n\t\"github.com/metacubex/mihomo/component/updater\"\n\t\"github.com/metacubex/mihomo/config\"\n\t\"github.com/metacubex/mihomo/constant\"\n\t\"github.com/metacubex/mihomo/constant/features\"\n\tcp \"github.com/metacubex/mihomo/constant/provider\"\n\t\"github.com/metacubex/mihomo/hub/executor\"\n\t\"github.com/metacubex/mihomo/listener\"\n\t\"github.com/metacubex/mihomo/log\"\n\t\"github.com/metacubex/mihomo/tunnel\"\n\t\"github.com/metacubex/mihomo/tunnel/statistic\"\n\t\"golang.org/x/exp/slices\"\n\t\"net\"\n\t\"os\"\n\t\"runtime\"\n\t\"runtime/debug\"\n\t\"strconv\"\n\t\"time\"\n)\n\nvar (\n\tisInit            = false\n\texternalProviders = map[string]cp.Provider{}\n\tlogSubscriber     observable.Subscription[log.Event]\n)\n\nfunc handleInitClash(paramsString string) bool {\n\trunLock.Lock()\n\tdefer runLock.Unlock()\n\tvar params = InitParams{}\n\terr := json.Unmarshal([]byte(paramsString), &params)\n\tif err != nil {\n\t\treturn false\n\t}\n\tversion = params.Version\n\tconstant.SetHomeDir(params.HomeDir)\n\tisInit = true\n\treturn isInit\n}\n\nfunc handleStartListener() bool {\n\trunLock.Lock()\n\tdefer runLock.Unlock()\n\tisRunning = true\n\tupdateListeners()\n\tresolver.ResetConnection()\n\treturn true\n}\n\nfunc handleStopListener() bool {\n\trunLock.Lock()\n\tdefer runLock.Unlock()\n\tisRunning = false\n\tlistener.StopListener()\n\tresolver.ResetConnection()\n\treturn true\n}\n\nfunc handleGetIsInit() bool {\n\treturn isInit\n}\n\nfunc handleForceGC() {\n\tlog.Infoln(\"[APP] request force GC\")\n\truntime.GC()\n\tif features.Android {\n\t\tdebug.FreeOSMemory()\n\t}\n}\n\nfunc handleShutdown() bool {\n\tstopListeners()\n\texecutor.Shutdown()\n\thandleForceGC()\n\tisInit = false\n\treturn true\n}\n\nfunc handleValidateConfig(path string) string {\n\tbuf, err := readFile(path)\n\t_, err = config.UnmarshalRawConfig(buf)\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\treturn \"\"\n}\n\nfunc handleGetProxies() ProxiesData {\n\trunLock.Lock()\n\tdefer runLock.Unlock()\n\n\tnameList := config.GetProxyNameList()\n\n\tproxies := make(map[string]constant.Proxy)\n\n\tfor name, proxy := range tunnel.Proxies() {\n\t\tproxies[name] = proxy\n\t}\n\tfor _, p := range tunnel.Providers() {\n\t\tfor _, proxy := range p.Proxies() {\n\t\t\tproxies[proxy.Name()] = proxy\n\t\t}\n\t}\n\n\thasGlobal := false\n\tallNames := make([]string, 0, len(nameList)+1)\n\n\tfor _, name := range nameList {\n\t\tif name == \"GLOBAL\" {\n\t\t\thasGlobal = true\n\t\t}\n\n\t\tp, ok := proxies[name]\n\t\tif !ok || p == nil {\n\t\t\tcontinue\n\t\t}\n\t\tswitch p.Type() {\n\t\tcase constant.Selector, constant.URLTest, constant.Fallback, constant.Relay, constant.LoadBalance:\n\t\t\tallNames = append(allNames, name)\n\t\tdefault:\n\t\t}\n\t}\n\n\tif !hasGlobal {\n\t\tif p, ok := proxies[\"GLOBAL\"]; ok && p != nil {\n\t\t\tallNames = append([]string{\"GLOBAL\"}, allNames...)\n\t\t}\n\t}\n\n\treturn ProxiesData{\n\t\tAll:     allNames,\n\t\tProxies: proxies,\n\t}\n}\n\nfunc handleChangeProxy(data string, fn func(string string)) {\n\trunLock.Lock()\n\tgo func() {\n\t\tdefer runLock.Unlock()\n\t\tvar params = &ChangeProxyParams{}\n\t\terr := json.Unmarshal([]byte(data), params)\n\t\tif err != nil {\n\t\t\tfn(err.Error())\n\t\t\treturn\n\t\t}\n\t\tgroupName := *params.GroupName\n\t\tproxyName := *params.ProxyName\n\t\tproxies := tunnel.ProxiesWithProviders()\n\t\tgroup, ok := proxies[groupName]\n\t\tif !ok {\n\t\t\tfn(\"Not found group\")\n\t\t\treturn\n\t\t}\n\t\tadapterProxy := group.(*adapter.Proxy)\n\t\tselector, ok := adapterProxy.ProxyAdapter.(outboundgroup.SelectAble)\n\t\tif !ok {\n\t\t\tfn(\"Group is not selectable\")\n\t\t\treturn\n\t\t}\n\t\tif proxyName == \"\" {\n\t\t\tselector.ForceSet(proxyName)\n\t\t} else {\n\t\t\terr = selector.Set(proxyName)\n\t\t}\n\t\tif err != nil {\n\t\t\tfn(err.Error())\n\t\t\treturn\n\t\t}\n\n\t\tfn(\"\")\n\t\treturn\n\t}()\n}\n\nfunc handleGetTraffic(onlyStatisticsProxy bool) string {\n\tup, down := statistic.DefaultManager.NowTraffic(onlyStatisticsProxy)\n\ttraffic := map[string]int64{\n\t\t\"up\":   up,\n\t\t\"down\": down,\n\t}\n\tdata, err := json.Marshal(traffic)\n\tif err != nil {\n\t\tlog.Errorln(\"Error: %s\", err)\n\t\treturn \"\"\n\t}\n\treturn string(data)\n}\n\nfunc handleGetTotalTraffic(onlyStatisticsProxy bool) string {\n\tup, down := statistic.DefaultManager.TotalTraffic(onlyStatisticsProxy)\n\ttraffic := map[string]int64{\n\t\t\"up\":   up,\n\t\t\"down\": down,\n\t}\n\tdata, err := json.Marshal(traffic)\n\tif err != nil {\n\t\tlog.Errorln(\"Error: %s\", err)\n\t\treturn \"\"\n\t}\n\treturn string(data)\n}\n\nfunc handleResetTraffic() {\n\tstatistic.DefaultManager.ResetStatistic()\n}\n\nfunc handleAsyncTestDelay(paramsString string, fn func(string)) {\n\tmBatch.Go(paramsString, func() (bool, error) {\n\t\tvar params = &TestDelayParams{}\n\t\terr := json.Unmarshal([]byte(paramsString), params)\n\t\tif err != nil {\n\t\t\tfn(\"\")\n\t\t\treturn false, nil\n\t\t}\n\n\t\texpectedStatus, err := utils.NewUnsignedRanges[uint16](\"\")\n\t\tif err != nil {\n\t\t\tfn(\"\")\n\t\t\treturn false, nil\n\t\t}\n\n\t\tctx, cancel := context.WithTimeout(context.Background(), time.Millisecond*time.Duration(params.Timeout))\n\t\tdefer cancel()\n\n\t\tproxies := tunnel.ProxiesWithProviders()\n\t\tproxy := proxies[params.ProxyName]\n\n\t\tdelayData := &Delay{\n\t\t\tName: params.ProxyName,\n\t\t}\n\n\t\tif proxy == nil {\n\t\t\tdelayData.Value = -1\n\t\t\tdata, _ := json.Marshal(delayData)\n\t\t\tfn(string(data))\n\t\t\treturn false, nil\n\t\t}\n\n\t\ttestUrl := constant.DefaultTestURL\n\n\t\tif params.TestUrl != \"\" {\n\t\t\ttestUrl = params.TestUrl\n\t\t}\n\t\tdelayData.Url = testUrl\n\n\t\tdelay, err := proxy.URLTest(ctx, testUrl, expectedStatus)\n\t\tif err != nil || delay == 0 {\n\t\t\tdelayData.Value = -1\n\t\t\tdata, _ := json.Marshal(delayData)\n\t\t\tfn(string(data))\n\t\t\treturn false, nil\n\t\t}\n\n\t\tdelayData.Value = int32(delay)\n\t\tdata, _ := json.Marshal(delayData)\n\t\tfn(string(data))\n\t\treturn false, nil\n\t})\n}\n\nfunc handleGetConnections() string {\n\trunLock.Lock()\n\tdefer runLock.Unlock()\n\tsnapshot := statistic.DefaultManager.Snapshot()\n\tdata, err := json.Marshal(snapshot)\n\tif err != nil {\n\t\tlog.Errorln(\"Error: %s\", err)\n\t\treturn \"\"\n\t}\n\treturn string(data)\n}\n\nfunc handleCloseConnections() bool {\n\trunLock.Lock()\n\tdefer runLock.Unlock()\n\tcloseConnections()\n\treturn true\n}\n\nfunc closeConnections() {\n\tstatistic.DefaultManager.Range(func(c statistic.Tracker) bool {\n\t\terr := c.Close()\n\t\tif err != nil {\n\t\t\treturn false\n\t\t}\n\t\treturn true\n\t})\n}\n\nfunc handleResetConnections() bool {\n\trunLock.Lock()\n\tdefer runLock.Unlock()\n\tresolver.ResetConnection()\n\treturn true\n}\n\nfunc handleCloseConnection(connectionId string) bool {\n\trunLock.Lock()\n\tdefer runLock.Unlock()\n\tc := statistic.DefaultManager.Get(connectionId)\n\tif c == nil {\n\t\treturn false\n\t}\n\t_ = c.Close()\n\treturn true\n}\n\nfunc handleGetExternalProviders() string {\n\trunLock.Lock()\n\tdefer runLock.Unlock()\n\texternalProviders = getExternalProvidersRaw()\n\teps := make([]ExternalProvider, 0)\n\tfor _, p := range externalProviders {\n\t\texternalProvider, err := toExternalProvider(p)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\t\teps = append(eps, *externalProvider)\n\t}\n\tslices.SortFunc(eps, func(a, b ExternalProvider) int {\n\t\treturn cmp.Compare(a.Name, b.Name)\n\t})\n\tdata, err := json.Marshal(eps)\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\treturn string(data)\n}\n\nfunc handleGetExternalProvider(externalProviderName string) string {\n\trunLock.Lock()\n\tdefer runLock.Unlock()\n\texternalProvider, exist := externalProviders[externalProviderName]\n\tif !exist {\n\t\treturn \"\"\n\t}\n\te, err := toExternalProvider(externalProvider)\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\tdata, err := json.Marshal(e)\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\treturn string(data)\n}\n\nfunc handleUpdateGeoData(geoType string, geoName string, fn func(value string)) {\n\tgo func() {\n\t\tpath := constant.Path.Resolve(geoName)\n\t\tswitch geoType {\n\t\tcase \"MMDB\":\n\t\t\terr := updater.UpdateMMDBWithPath(path)\n\t\t\tif err != nil {\n\t\t\t\tfn(err.Error())\n\t\t\t\treturn\n\t\t\t}\n\t\tcase \"ASN\":\n\t\t\terr := updater.UpdateASNWithPath(path)\n\t\t\tif err != nil {\n\t\t\t\tfn(err.Error())\n\t\t\t\treturn\n\t\t\t}\n\t\tcase \"GEOIP\":\n\t\t\terr := updater.UpdateGeoIpWithPath(path)\n\t\t\tif err != nil {\n\t\t\t\tfn(err.Error())\n\t\t\t\treturn\n\t\t\t}\n\t\tcase \"GEOSITE\":\n\t\t\terr := updater.UpdateGeoSiteWithPath(path)\n\t\t\tif err != nil {\n\t\t\t\tfn(err.Error())\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tfn(\"\")\n\t}()\n}\n\nfunc handleUpdateExternalProvider(providerName string, fn func(value string)) {\n\tgo func() {\n\t\texternalProvider, exist := externalProviders[providerName]\n\t\tif !exist {\n\t\t\tfn(\"external provider is not exist\")\n\t\t\treturn\n\t\t}\n\t\terr := externalProvider.Update()\n\t\tif err != nil {\n\t\t\tfn(err.Error())\n\t\t\treturn\n\t\t}\n\t\tfn(\"\")\n\t}()\n}\n\nfunc handleSideLoadExternalProvider(providerName string, data []byte, fn func(value string)) {\n\tgo func() {\n\t\trunLock.Lock()\n\t\tdefer runLock.Unlock()\n\t\texternalProvider, exist := externalProviders[providerName]\n\t\tif !exist {\n\t\t\tfn(\"external provider is not exist\")\n\t\t\treturn\n\t\t}\n\t\terr := sideUpdateExternalProvider(externalProvider, data)\n\t\tif err != nil {\n\t\t\tfn(err.Error())\n\t\t\treturn\n\t\t}\n\t\tfn(\"\")\n\t}()\n}\n\nfunc handleSuspend(suspended bool) bool {\n\tif suspended {\n\t\ttunnel.OnSuspend()\n\t} else {\n\t\ttunnel.OnRunning()\n\t}\n\treturn true\n}\n\nfunc handleStartLog() {\n\tif logSubscriber != nil {\n\t\tlog.UnSubscribe(logSubscriber)\n\t\tlogSubscriber = nil\n\t}\n\tlogSubscriber = log.Subscribe()\n\tgo func() {\n\t\tfor logData := range logSubscriber {\n\t\t\tif logData.LogLevel < log.Level() {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tmessage := &Message{\n\t\t\t\tType: LogMessage,\n\t\t\t\tData: logData,\n\t\t\t}\n\t\t\tsendMessage(*message)\n\t\t}\n\t}()\n}\n\nfunc handleStopLog() {\n\tif logSubscriber != nil {\n\t\tlog.UnSubscribe(logSubscriber)\n\t\tlogSubscriber = nil\n\t}\n}\n\nfunc handleGetCountryCode(ip string, fn func(value string)) {\n\tgo func() {\n\t\trunLock.Lock()\n\t\tdefer runLock.Unlock()\n\t\tcodes := mmdb.IPInstance().LookupCode(net.ParseIP(ip))\n\t\tif len(codes) == 0 {\n\t\t\tfn(\"\")\n\t\t\treturn\n\t\t}\n\t\tfn(codes[0])\n\t}()\n}\n\nfunc handleGetMemory(fn func(value string)) {\n\tgo func() {\n\t\tfn(strconv.FormatUint(statistic.DefaultManager.Memory(), 10))\n\t}()\n}\n\nfunc handleGetConfig(path string) (*config.RawConfig, error) {\n\tbytes, err := readFile(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tprof, err := config.UnmarshalRawConfig(bytes)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn prof, nil\n}\n\nfunc handleCrash() {\n\tpanic(\"handle invoke crash\")\n}\n\nfunc handleUpdateConfig(bytes []byte) string {\n\tvar params = &UpdateParams{}\n\terr := json.Unmarshal(bytes, params)\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\tupdateConfig(params)\n\treturn \"\"\n}\n\nfunc handleDelFile(path string, result ActionResult) {\n\tgo func() {\n\t\tfileInfo, err := os.Stat(path)\n\t\tif err != nil {\n\t\t\tif !os.IsNotExist(err) {\n\t\t\t\tresult.success(err.Error())\n\t\t\t}\n\t\t\tresult.success(\"\")\n\t\t\treturn\n\t\t}\n\t\tif fileInfo.IsDir() {\n\t\t\terr = os.RemoveAll(path)\n\t\t\tif err != nil {\n\t\t\t\tresult.success(err.Error())\n\t\t\t\treturn\n\t\t\t}\n\t\t} else {\n\t\t\terr = os.Remove(path)\n\t\t\tif err != nil {\n\t\t\t\tresult.success(err.Error())\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tresult.success(\"\")\n\t}()\n}\n\nfunc handleSetupConfig(bytes []byte) string {\n\tif !isInit {\n\t\treturn \"not initialized\"\n\t}\n\tvar params = defaultSetupParams()\n\terr := UnmarshalJson(bytes, params)\n\tif err != nil {\n\t\tlog.Errorln(\"unmarshalRawConfig error %v\", err)\n\t\t_ = applyConfig(defaultSetupParams())\n\t\treturn err.Error()\n\t}\n\terr = applyConfig(params)\n\tif err != nil {\n\t\treturn err.Error()\n\t}\n\treturn \"\"\n}\n\nfunc init() {\n\tadapter.UrlTestHook = func(url string, name string, delay uint16) {\n\t\tdelayData := &Delay{\n\t\t\tUrl:  url,\n\t\t\tName: name,\n\t\t}\n\t\tif delay == 0 {\n\t\t\tdelayData.Value = -1\n\t\t} else {\n\t\t\tdelayData.Value = int32(delay)\n\t\t}\n\t\tsendMessage(Message{\n\t\t\tType: DelayMessage,\n\t\t\tData: delayData,\n\t\t})\n\t}\n\tstatistic.DefaultRequestNotify = func(c statistic.Tracker) {\n\t\tsendMessage(Message{\n\t\t\tType: RequestMessage,\n\t\t\tData: c,\n\t\t})\n\t}\n\texecutor.DefaultProviderLoadedHook = func(providerName string) {\n\t\tsendMessage(Message{\n\t\t\tType: LoadedMessage,\n\t\t\tData: providerName,\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "core/lib.go",
    "content": "//go:build cgo\n\npackage main\n\n/*\n#include <stdlib.h>\n*/\nimport \"C\"\n\nimport (\n\t\"context\"\n\t\"core/platform\"\n\tt \"core/tun\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"github.com/metacubex/mihomo/component/dialer\"\n\t\"github.com/metacubex/mihomo/component/process\"\n\t\"github.com/metacubex/mihomo/constant\"\n\t\"github.com/metacubex/mihomo/dns\"\n\t\"github.com/metacubex/mihomo/listener/sing_tun\"\n\t\"github.com/metacubex/mihomo/log\"\n\t\"golang.org/x/sync/semaphore\"\n\t\"net\"\n\t\"strings\"\n\t\"sync\"\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar eventListener unsafe.Pointer\n\ntype TunHandler struct {\n\tlistener *sing_tun.Listener\n\tcallback unsafe.Pointer\n\n\tlimit *semaphore.Weighted\n}\n\nfunc (th *TunHandler) start(fd int, stack, address, dns string) {\n\trunLock.Lock()\n\tdefer runLock.Unlock()\n\t_ = th.limit.Acquire(context.TODO(), 4)\n\tdefer th.limit.Release(4)\n\tth.initHook()\n\ttunListener := t.Start(fd, stack, address, dns)\n\tif tunListener != nil {\n\t\tlog.Infoln(\"TUN address: %v\", tunListener.Address())\n\t\tth.listener = tunListener\n\t\treturn\n\t}\n\tth.clear()\n}\n\nfunc (th *TunHandler) close() {\n\t_ = th.limit.Acquire(context.TODO(), 4)\n\tdefer th.limit.Release(4)\n\tth.clear()\n}\n\nfunc (th *TunHandler) clear() {\n\tth.removeHook()\n\tif th.listener != nil {\n\t\t_ = th.listener.Close()\n\t}\n\tif th.callback != nil {\n\t\treleaseObject(th.callback)\n\t}\n\tth.callback = nil\n\tth.listener = nil\n}\n\nfunc (th *TunHandler) handleProtect(fd int) {\n\t_ = th.limit.Acquire(context.Background(), 1)\n\tdefer th.limit.Release(1)\n\n\tif th.listener == nil {\n\t\treturn\n\t}\n\n\tprotect(th.callback, fd)\n}\n\nfunc (th *TunHandler) handleResolveProcess(source, target net.Addr) string {\n\t_ = th.limit.Acquire(context.Background(), 1)\n\tdefer th.limit.Release(1)\n\n\tif th.listener == nil {\n\t\treturn \"\"\n\t}\n\tvar protocol int\n\tuid := -1\n\tswitch source.Network() {\n\tcase \"udp\", \"udp4\", \"udp6\":\n\t\tprotocol = syscall.IPPROTO_UDP\n\tcase \"tcp\", \"tcp4\", \"tcp6\":\n\t\tprotocol = syscall.IPPROTO_TCP\n\t}\n\tif version < 29 {\n\t\tuid = platform.QuerySocketUidFromProcFs(source, target)\n\t}\n\treturn resolveProcess(th.callback, protocol, source.String(), target.String(), uid)\n}\n\nfunc (th *TunHandler) initHook() {\n\tdialer.DefaultSocketHook = func(network, address string, conn syscall.RawConn) error {\n\t\tif platform.ShouldBlockConnection() {\n\t\t\treturn errBlocked\n\t\t}\n\t\treturn conn.Control(func(fd uintptr) {\n\t\t\ttunHandler.handleProtect(int(fd))\n\t\t})\n\t}\n\tprocess.DefaultPackageNameResolver = func(metadata *constant.Metadata) (string, error) {\n\t\tsrc, dst := metadata.RawSrcAddr, metadata.RawDstAddr\n\t\tif src == nil || dst == nil {\n\t\t\treturn \"\", process.ErrInvalidNetwork\n\t\t}\n\t\treturn tunHandler.handleResolveProcess(src, dst), nil\n\t}\n}\n\nfunc (th *TunHandler) removeHook() {\n\tdialer.DefaultSocketHook = nil\n\tprocess.DefaultPackageNameResolver = nil\n}\n\nvar (\n\ttunLock    sync.Mutex\n\terrBlocked = errors.New(\"blocked\")\n\ttunHandler *TunHandler\n)\n\nfunc handleStopTun() {\n\ttunLock.Lock()\n\tdefer tunLock.Unlock()\n\tif tunHandler != nil {\n\t\ttunHandler.close()\n\t}\n}\n\nfunc handleStartTun(callback unsafe.Pointer, fd int, stack, address, dns string) {\n\thandleStopTun()\n\ttunLock.Lock()\n\tdefer tunLock.Unlock()\n\tif fd != 0 {\n\t\ttunHandler = &TunHandler{\n\t\t\tcallback: callback,\n\t\t\tlimit:    semaphore.NewWeighted(4),\n\t\t}\n\t\ttunHandler.start(fd, stack, address, dns)\n\t}\n}\n\nfunc handleUpdateDns(value string) {\n\tgo func() {\n\t\tlog.Infoln(\"[DNS] updateDns %s\", value)\n\t\tdns.UpdateSystemDNS(strings.Split(value, \",\"))\n\t\tdns.FlushCacheWithDefaultResolver()\n\t}()\n}\n\nfunc (result ActionResult) send() {\n\tdata, err := result.Json()\n\tif err != nil {\n\t\treturn\n\t}\n\tinvokeResult(result.callback, string(data))\n\tif result.Method != messageMethod {\n\t\treleaseObject(result.callback)\n\t}\n}\n\nfunc nextHandle(action *Action, result ActionResult) bool {\n\tswitch action.Method {\n\tcase updateDnsMethod:\n\t\tdata := action.Data.(string)\n\t\thandleUpdateDns(data)\n\t\tresult.success(true)\n\t\treturn true\n\t}\n\treturn false\n}\n\n//export invokeAction\nfunc invokeAction(callback unsafe.Pointer, paramsChar *C.char) {\n\tparams := takeCString(paramsChar)\n\tvar action = &Action{}\n\terr := json.Unmarshal([]byte(params), action)\n\tif err != nil {\n\t\tinvokeResult(callback, err.Error())\n\t\treturn\n\t}\n\tresult := ActionResult{\n\t\tId:       action.Id,\n\t\tMethod:   action.Method,\n\t\tcallback: callback,\n\t}\n\tgo handleAction(action, result)\n}\n\n//export startTUN\nfunc startTUN(callback unsafe.Pointer, fd C.int, stackChar, addressChar, dnsChar *C.char) bool {\n\thandleStartTun(callback, int(fd), takeCString(stackChar), takeCString(addressChar), takeCString(dnsChar))\n\tif !isRunning {\n\t\thandleStartListener()\n\t} else {\n\t\thandleResetConnections()\n\t}\n\treturn true\n}\n\n//export quickSetup\nfunc quickSetup(callback unsafe.Pointer, initParamsChar *C.char, setupParamsChar *C.char) {\n\tgo func() {\n\t\tinitParamsString := takeCString(initParamsChar)\n\t\tsetupParamsString := takeCString(setupParamsChar)\n\t\tif !handleInitClash(initParamsString) {\n\t\t\tinvokeResult(callback, \"init failed\")\n\t\t\treturn\n\t\t}\n\t\tisRunning = true\n\t\tmessage := handleSetupConfig([]byte(setupParamsString))\n\t\tinvokeResult(callback, message)\n\t}()\n}\n\n//export setEventListener\nfunc setEventListener(listener unsafe.Pointer) {\n\tif eventListener != nil || listener == nil {\n\t\treleaseObject(eventListener)\n\t}\n\teventListener = listener\n}\n\n//export getTotalTraffic\nfunc getTotalTraffic(onlyStatisticsProxy bool) *C.char {\n\tdata := C.CString(handleGetTotalTraffic(onlyStatisticsProxy))\n\tdefer C.free(unsafe.Pointer(data))\n\treturn data\n}\n\n//export getTraffic\nfunc getTraffic(onlyStatisticsProxy bool) *C.char {\n\tdata := C.CString(handleGetTraffic(onlyStatisticsProxy))\n\tdefer C.free(unsafe.Pointer(data))\n\treturn data\n}\n\nfunc sendMessage(message Message) {\n\tif eventListener == nil {\n\t\treturn\n\t}\n\tresult := ActionResult{\n\t\tMethod:   messageMethod,\n\t\tcallback: eventListener,\n\t\tData:     message,\n\t}\n\tresult.send()\n}\n\n//export stopTun\nfunc stopTun() {\n\thandleStopTun()\n\tif isRunning {\n\t\thandleStopListener()\n\t}\n}\n\n//export suspend\nfunc suspend(suspended bool) {\n\thandleSuspend(suspended)\n}\n\n//export forceGC\nfunc forceGC() {\n\thandleForceGC()\n}\n\n//export updateDns\nfunc updateDns(s *C.char) {\n\thandleUpdateDns(takeCString(s))\n}\n"
  },
  {
    "path": "core/main.go",
    "content": "//go:build !cgo\n\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n)\n\nfunc main() {\n\targs := os.Args\n\tif len(args) <= 1 {\n\t\tfmt.Println(\"Arguments error\")\n\t\tos.Exit(1)\n\t}\n\tstartServer(args[1])\n}\n"
  },
  {
    "path": "core/main_cgo.go",
    "content": "//go:build cgo\n\npackage main\n\nimport \"C\"\n\nfunc main() {\n}\n"
  },
  {
    "path": "core/platform/limit.go",
    "content": "//go:build android && cgo\n\npackage platform\n\nimport \"syscall\"\n\nvar nullFd int\nvar maxFdCount int\n\nfunc init() {\n\tfd, err := syscall.Open(\"/dev/null\", syscall.O_WRONLY, 0644)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\n\tnullFd = fd\n\n\tvar limit syscall.Rlimit\n\n\tif err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &limit); err != nil {\n\t\tmaxFdCount = 1024\n\t} else {\n\t\tmaxFdCount = int(limit.Cur)\n\t}\n\n\tmaxFdCount = maxFdCount / 4 * 3\n}\n\nfunc ShouldBlockConnection() bool {\n\tfd, err := syscall.Dup(nullFd)\n\tif err != nil {\n\t\treturn true\n\t}\n\n\t_ = syscall.Close(fd)\n\n\tif fd > maxFdCount {\n\t\treturn true\n\t}\n\n\treturn false\n}\n"
  },
  {
    "path": "core/platform/procfs.go",
    "content": "//go:build linux\n\npackage platform\n\nimport (\n\t\"bufio\"\n\t\"encoding/binary\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"net\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\t\"unsafe\"\n)\n\nvar netIndexOfLocal = -1\nvar netIndexOfUid = -1\n\nvar nativeEndian binary.ByteOrder\n\nfunc QuerySocketUidFromProcFs(source, _ net.Addr) int {\n\tif netIndexOfLocal < 0 || netIndexOfUid < 0 {\n\t\treturn -1\n\t}\n\n\tnetwork := source.Network()\n\n\tif strings.HasSuffix(network, \"4\") || strings.HasSuffix(network, \"6\") {\n\t\tnetwork = network[:len(network)-1]\n\t}\n\n\tpath := \"/proc/net/\" + network\n\n\tvar sIP net.IP\n\tvar sPort int\n\n\tswitch s := source.(type) {\n\tcase *net.TCPAddr:\n\t\tsIP = s.IP\n\t\tsPort = s.Port\n\tcase *net.UDPAddr:\n\t\tsIP = s.IP\n\t\tsPort = s.Port\n\tdefault:\n\t\treturn -1\n\t}\n\n\tsIP = sIP.To16()\n\tif sIP == nil {\n\t\treturn -1\n\t}\n\n\tuid := doQuery(path+\"6\", sIP, sPort)\n\tif uid == -1 {\n\t\tsIP = sIP.To4()\n\t\tif sIP == nil {\n\t\t\treturn -1\n\t\t}\n\t\tuid = doQuery(path, sIP, sPort)\n\t}\n\n\treturn uid\n}\n\nfunc doQuery(path string, sIP net.IP, sPort int) int {\n\tfile, err := os.Open(path)\n\tif err != nil {\n\t\treturn -1\n\t}\n\n\tdefer func(file *os.File) {\n\t\t_ = file.Close()\n\t}(file)\n\n\treader := bufio.NewReader(file)\n\n\tvar bytes [2]byte\n\n\tbinary.BigEndian.PutUint16(bytes[:], uint16(sPort))\n\n\tlocal := fmt.Sprintf(\"%s:%s\", hex.EncodeToString(nativeEndianIP(sIP)), hex.EncodeToString(bytes[:]))\n\n\tfor {\n\t\trow, _, err := reader.ReadLine()\n\t\tif err != nil {\n\t\t\treturn -1\n\t\t}\n\n\t\tfields := strings.Fields(string(row))\n\n\t\tif len(fields) <= netIndexOfLocal || len(fields) <= netIndexOfUid {\n\t\t\tcontinue\n\t\t}\n\n\t\tif strings.EqualFold(local, fields[netIndexOfLocal]) {\n\t\t\tuid, err := strconv.Atoi(fields[netIndexOfUid])\n\t\t\tif err != nil {\n\t\t\t\treturn -1\n\t\t\t}\n\n\t\t\treturn uid\n\t\t}\n\t}\n}\n\nfunc nativeEndianIP(ip net.IP) []byte {\n\tresult := make([]byte, len(ip))\n\n\tfor i := 0; i < len(ip); i += 4 {\n\t\tvalue := binary.BigEndian.Uint32(ip[i:])\n\n\t\tnativeEndian.PutUint32(result[i:], value)\n\t}\n\n\treturn result\n}\n\nfunc init() {\n\tfile, err := os.Open(\"/proc/net/tcp\")\n\tif err != nil {\n\t\treturn\n\t}\n\n\tdefer func(file *os.File) {\n\t\t_ = file.Close()\n\t}(file)\n\n\treader := bufio.NewReader(file)\n\n\theader, _, err := reader.ReadLine()\n\tif err != nil {\n\t\treturn\n\t}\n\n\tcolumns := strings.Fields(string(header))\n\n\tvar txQueue, rxQueue, tr, tmWhen bool\n\n\tfor idx, col := range columns {\n\t\toffset := 0\n\n\t\tif txQueue && rxQueue {\n\t\t\toffset--\n\t\t}\n\n\t\tif tr && tmWhen {\n\t\t\toffset--\n\t\t}\n\n\t\tswitch col {\n\t\tcase \"tx_queue\":\n\t\t\ttxQueue = true\n\t\tcase \"rx_queue\":\n\t\t\trxQueue = true\n\t\tcase \"tr\":\n\t\t\ttr = true\n\t\tcase \"tm->when\":\n\t\t\ttmWhen = true\n\t\tcase \"local_address\":\n\t\t\tnetIndexOfLocal = idx + offset\n\t\tcase \"uid\":\n\t\t\tnetIndexOfUid = idx + offset\n\t\t}\n\t}\n}\n\nfunc init() {\n\tvar x uint32 = 0x01020304\n\tif *(*byte)(unsafe.Pointer(&x)) == 0x01 {\n\t\tnativeEndian = binary.BigEndian\n\t} else {\n\t\tnativeEndian = binary.LittleEndian\n\t}\n}\n"
  },
  {
    "path": "core/server.go",
    "content": "//go:build !cgo\n\npackage main\n\nimport (\n\t\"bufio\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net\"\n\t\"strconv\"\n)\n\nvar conn net.Conn\n\nfunc (result ActionResult) send() {\n\tdata, err := result.Json()\n\tif err != nil {\n\t\treturn\n\t}\n\tsend(data)\n}\n\nfunc sendMessage(message Message) {\n\tresult := ActionResult{\n\t\tMethod: messageMethod,\n\t\tData:   message,\n\t}\n\tresult.send()\n}\n\nfunc send(data []byte) {\n\tif conn == nil {\n\t\treturn\n\t}\n\t_, _ = conn.Write(append(data, []byte(\"\\n\")...))\n}\n\nfunc startServer(arg string) {\n\n\t_, err := strconv.Atoi(arg)\n\n\tif err != nil {\n\t\tconn, err = net.Dial(\"unix\", arg)\n\t} else {\n\t\tconn, err = net.Dial(\"tcp\", fmt.Sprintf(\"127.0.0.1:%s\", arg))\n\t}\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\n\tdefer func(conn net.Conn) {\n\t\t_ = conn.Close()\n\t}(conn)\n\n\treader := bufio.NewReader(conn)\n\n\tfor {\n\t\tdata, err := reader.ReadString('\\n')\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tvar action = &Action{}\n\n\t\terr = json.Unmarshal([]byte(data), action)\n\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\n\t\tresult := ActionResult{\n\t\t\tId:     action.Id,\n\t\t\tMethod: action.Method,\n\t\t}\n\n\t\tgo handleAction(action, result)\n\t}\n}\n\nfunc nextHandle(action *Action, result ActionResult) bool {\n\treturn false\n}\n"
  },
  {
    "path": "core/tun/tun.go",
    "content": "//go:build android && cgo\n\npackage tun\n\nimport \"C\"\nimport (\n\t\"github.com/metacubex/mihomo/constant\"\n\tLC \"github.com/metacubex/mihomo/listener/config\"\n\t\"github.com/metacubex/mihomo/listener/sing_tun\"\n\t\"github.com/metacubex/mihomo/log\"\n\t\"github.com/metacubex/mihomo/tunnel\"\n\t\"net\"\n\t\"net/netip\"\n\t\"strings\"\n)\n\nfunc Start(fd int, stack string, address, dns string) *sing_tun.Listener {\n\tvar prefix4 []netip.Prefix\n\tvar prefix6 []netip.Prefix\n\ttunStack, ok := constant.StackTypeMapping[strings.ToLower(stack)]\n\tif !ok {\n\t\ttunStack = constant.TunSystem\n\t}\n\tfor _, a := range strings.Split(address, \",\") {\n\t\ta = strings.TrimSpace(a)\n\t\tif len(a) == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tprefix, err := netip.ParsePrefix(a)\n\t\tif err != nil {\n\t\t\tlog.Errorln(\"TUN:\", err)\n\t\t\treturn nil\n\t\t}\n\t\tif prefix.Addr().Is4() {\n\t\t\tprefix4 = append(prefix4, prefix)\n\t\t} else {\n\t\t\tprefix6 = append(prefix6, prefix)\n\t\t}\n\t}\n\n\tvar dnsHijack []string\n\tfor _, d := range strings.Split(dns, \",\") {\n\t\td = strings.TrimSpace(d)\n\t\tif len(d) == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tdnsHijack = append(dnsHijack, net.JoinHostPort(d, \"53\"))\n\t}\n\n\toptions := LC.Tun{\n\t\tEnable:              true,\n\t\tDevice:              \"FlClash\",\n\t\tStack:               tunStack,\n\t\tDNSHijack:           dnsHijack,\n\t\tAutoRoute:           false,\n\t\tAutoDetectInterface: false,\n\t\tInet4Address:        prefix4,\n\t\tInet6Address:        prefix6,\n\t\tMTU:                 9000,\n\t\tFileDescriptor:      fd,\n\t}\n\n\tlistener, err := sing_tun.New(options, tunnel.Tunnel)\n\n\tif err != nil {\n\t\tlog.Errorln(\"TUN:\", err)\n\t\treturn nil\n\t}\n\n\treturn listener\n}\n"
  },
  {
    "path": "distribute_options.yaml",
    "content": "app_name: 'FlClash'\noutput: 'dist/'\n"
  },
  {
    "path": "lib/application.dart",
    "content": "import 'dart:async';\nimport 'dart:io';\n\nimport 'package:connectivity_plus/connectivity_plus.dart';\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/core/core.dart';\nimport 'package:fl_clash/l10n/l10n.dart';\nimport 'package:fl_clash/manager/hotkey_manager.dart';\nimport 'package:fl_clash/manager/manager.dart';\nimport 'package:fl_clash/plugins/app.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_localizations/flutter_localizations.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nimport 'controller.dart';\nimport 'pages/pages.dart';\n\nclass Application extends ConsumerStatefulWidget {\n  const Application({super.key});\n\n  @override\n  ConsumerState<Application> createState() => ApplicationState();\n}\n\nclass ApplicationState extends ConsumerState<Application> {\n  Timer? _autoUpdateProfilesTaskTimer;\n  bool _preHasVpn = false;\n\n  final _pageTransitionsTheme = const PageTransitionsTheme(\n    builders: <TargetPlatform, PageTransitionsBuilder>{\n      TargetPlatform.android: commonSharedXPageTransitions,\n      TargetPlatform.windows: commonSharedXPageTransitions,\n      TargetPlatform.linux: commonSharedXPageTransitions,\n      TargetPlatform.macOS: commonSharedXPageTransitions,\n    },\n  );\n\n  ColorScheme _getAppColorScheme({\n    required Brightness brightness,\n    int? primaryColor,\n  }) {\n    return ref.read(genColorSchemeProvider(brightness));\n  }\n\n  @override\n  void initState() {\n    super.initState();\n    WidgetsBinding.instance.addPostFrameCallback((timeStamp) async {\n      final currentContext = globalState.navigatorKey.currentContext;\n      if (currentContext != null) {\n        await appController.attach(currentContext, ref);\n      } else {\n        exit(0);\n      }\n      _autoUpdateProfilesTask();\n      appController.initLink();\n      app?.initShortcuts();\n    });\n  }\n\n  void _autoUpdateProfilesTask() {\n    _autoUpdateProfilesTaskTimer = Timer(const Duration(minutes: 20), () async {\n      await appController.autoUpdateProfiles();\n      _autoUpdateProfilesTask();\n    });\n  }\n\n  Widget _buildPlatformState({required Widget child}) {\n    if (system.isDesktop) {\n      return WindowManager(\n        child: TrayManager(\n          child: HotKeyManager(child: ProxyManager(child: child)),\n        ),\n      );\n    }\n    return AndroidManager(child: TileManager(child: child));\n  }\n\n  Widget _buildState({required Widget child}) {\n    return AppStateManager(\n      child: CoreManager(\n        child: ConnectivityManager(\n          onConnectivityChanged: (results) async {\n            commonPrint.log('connectivityChanged ${results.toString()}');\n            appController.updateLocalIp();\n            final hasVpn = results.contains(ConnectivityResult.vpn);\n            if (_preHasVpn == hasVpn) {\n              appController.addCheckIp();\n            }\n            _preHasVpn = hasVpn;\n          },\n          child: child,\n        ),\n      ),\n    );\n  }\n\n  Widget _buildPlatformApp({required Widget child}) {\n    if (system.isDesktop) {\n      return WindowHeaderContainer(child: child);\n    }\n    return VpnManager(child: child);\n  }\n\n  Widget _buildApp({required Widget child}) {\n    return StatusManager(child: ThemeManager(child: child));\n  }\n\n  @override\n  Widget build(context) {\n    return Consumer(\n      builder: (_, ref, child) {\n        final locale = ref.watch(\n          appSettingProvider.select((state) => state.locale),\n        );\n        final themeProps = ref.watch(themeSettingProvider);\n        return MaterialApp(\n          debugShowCheckedModeBanner: false,\n          navigatorKey: globalState.navigatorKey,\n          localizationsDelegates: const [\n            AppLocalizations.delegate,\n            GlobalMaterialLocalizations.delegate,\n            GlobalCupertinoLocalizations.delegate,\n            GlobalWidgetsLocalizations.delegate,\n          ],\n          builder: (_, child) {\n            return AppEnvManager(\n              child: _buildApp(\n                child: _buildPlatformState(\n                  child: _buildState(child: _buildPlatformApp(child: child!)),\n                ),\n              ),\n            );\n          },\n          scrollBehavior: BaseScrollBehavior(),\n          title: appName,\n          locale: utils.getLocaleForString(locale),\n          supportedLocales: AppLocalizations.delegate.supportedLocales,\n          themeMode: themeProps.themeMode,\n          theme: ThemeData(\n            useMaterial3: true,\n            pageTransitionsTheme: _pageTransitionsTheme,\n            colorScheme: _getAppColorScheme(\n              brightness: Brightness.light,\n              primaryColor: themeProps.primaryColor,\n            ),\n          ),\n          darkTheme: ThemeData(\n            useMaterial3: true,\n            pageTransitionsTheme: _pageTransitionsTheme,\n            colorScheme: _getAppColorScheme(\n              brightness: Brightness.dark,\n              primaryColor: themeProps.primaryColor,\n            ).toPureBlack(themeProps.pureBlack),\n          ),\n          home: child!,\n        );\n      },\n      child: const HomePage(),\n    );\n  }\n\n  @override\n  Future<void> dispose() async {\n    linkManager.destroy();\n    _autoUpdateProfilesTaskTimer?.cancel();\n    await coreController.destroy();\n    await appController.handleExit();\n    super.dispose();\n  }\n}\n"
  },
  {
    "path": "lib/common/app_localizations.dart",
    "content": "import 'package:fl_clash/l10n/l10n.dart';\n\nfinal appLocalizations = AppLocalizations.current;\n"
  },
  {
    "path": "lib/common/archive.dart",
    "content": "import 'dart:io';\n\nimport 'package:archive/archive_io.dart';\nimport 'package:path/path.dart';\n\nextension ArchiveExt on Archive {\n  void addDirectoryToArchive(String dirPath, String parentPath) {\n    final dir = Directory(dirPath);\n    if (!dir.existsSync()) {\n      return;\n    }\n    final entities = dir.listSync(recursive: false);\n    for (final entity in entities) {\n      final relativePath = relative(entity.path, from: parentPath);\n      if (entity is File) {\n        final data = entity.readAsBytesSync();\n        final archiveFile = ArchiveFile(relativePath, data.length, data);\n        addFile(archiveFile);\n      }\n    }\n  }\n\n  // void addTextFile<T>(String name, T raw) {\n  //   final data = json.encode(raw);\n  //   addFile(ArchiveFile.string(name, data));\n  // }\n}\n"
  },
  {
    "path": "lib/common/cache.dart",
    "content": "import 'dart:io';\n\nimport 'package:dio/dio.dart';\nimport 'package:fl_clash/common/common.dart';\nimport 'package:flutter_cache_manager/flutter_cache_manager.dart';\n\nclass LocalImageCacheManager extends CacheManager {\n  static const key = 'ImageCaches';\n\n  static final LocalImageCacheManager _instance = LocalImageCacheManager._();\n\n  factory LocalImageCacheManager() {\n    return _instance;\n  }\n\n  LocalImageCacheManager._()\n    : super(Config(key, fileService: _LocalImageCacheFileService()));\n}\n\nclass _LocalImageCacheFileService extends FileService {\n  _LocalImageCacheFileService();\n\n  @override\n  Future<FileServiceResponse> get(\n    String url, {\n    Map<String, String>? headers,\n  }) async {\n    final response = await request.dio.get<ResponseBody>(\n      url,\n      options: Options(headers: headers, responseType: ResponseType.stream),\n    );\n    return _LocalImageResponse(response);\n  }\n}\n\nclass _LocalImageResponse implements FileServiceResponse {\n  _LocalImageResponse(this._response);\n\n  final DateTime _receivedTime = DateTime.now();\n\n  final Response<ResponseBody> _response;\n\n  String? _header(String name) {\n    return _response.headers.value(name);\n  }\n\n  @override\n  int get statusCode => _response.statusCode ?? 0;\n\n  @override\n  Stream<List<int>> get content =>\n      _response.data!.stream.transform(uint8ListToListIntConverter);\n\n  @override\n  int? get contentLength => _response.data?.contentLength;\n\n  @override\n  DateTime get validTill {\n    var ageDuration = const Duration(days: 7);\n    final controlHeader = _header(HttpHeaders.cacheControlHeader);\n    if (controlHeader != null) {\n      final controlSettings = controlHeader.split(',');\n      for (final setting in controlSettings) {\n        final sanitizedSetting = setting.trim().toLowerCase();\n        if (sanitizedSetting == 'no-cache') {\n          ageDuration = Duration.zero;\n        }\n        if (sanitizedSetting.startsWith('max-age=')) {\n          final validSeconds =\n              int.tryParse(sanitizedSetting.split('=')[1]) ?? 0;\n          if (validSeconds > 0) {\n            ageDuration = Duration(seconds: validSeconds);\n          }\n        }\n      }\n    }\n\n    if (ageDuration > const Duration(days: 7)) {\n      return _receivedTime.add(ageDuration);\n    }\n    return _receivedTime.add(const Duration(days: 7));\n  }\n\n  @override\n  String? get eTag => _header(HttpHeaders.etagHeader);\n\n  @override\n  String get fileExtension {\n    var fileExtension = '';\n    final contentTypeHeader = _header(HttpHeaders.contentTypeHeader);\n    if (contentTypeHeader != null) {\n      final contentType = ContentType.parse(contentTypeHeader);\n      fileExtension = contentType.fileExtension;\n    }\n    return fileExtension;\n  }\n}\n\nextension ContentTypeConverter on ContentType {\n  String get fileExtension => mimeTypes[mimeType] ?? '.$subType';\n}\n\nconst mimeTypes = {\n  'application/vnd.android.package-archive': '.apk',\n  'application/epub+zip': '.epub',\n  'application/gzip': '.gz',\n  'application/java-archive': '.jar',\n  'application/json': '.json',\n  'application/ld+json': '.jsonld',\n  'application/msword': '.doc',\n  'application/octet-stream': '.bin',\n  'application/ogg': '.ogx',\n  'application/pdf': '.pdf',\n  'application/php': '.php',\n  'application/rtf': '.rtf',\n  'application/vnd.amazon.ebook': '.azw',\n  'application/vnd.apple.installer+xml': '.mpkg',\n  'application/vnd.mozilla.xul+xml': '.xul',\n  'application/vnd.ms-excel': '.xls',\n  'application/vnd.ms-fontobject': '.eot',\n  'application/vnd.ms-powerpoint': '.ppt',\n  'application/vnd.oasis.opendocument.presentation': '.odp',\n  'application/vnd.oasis.opendocument.spreadsheet': '.ods',\n  'application/vnd.oasis.opendocument.text': '.odt',\n  'application/vnd.openxmlformats-officedocument.presentationml.presentation':\n      '.pptx',\n  'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': '.xlsx',\n  'application/vnd.openxmlformats-officedocument.wordprocessingml.document':\n      '.docx',\n  'application/vnd.rar': '.rar',\n  'application/vnd.visio': '.vsd',\n  'application/x-7z-compressed': '.7z',\n  'application/x-abiword': '.abw',\n  'application/x-bzip': '.bz',\n  'application/x-bzip2': '.bz2',\n  'application/x-csh': '.csh',\n  'application/x-freearc': '.arc',\n  'application/x-sh': '.sh',\n  'application/x-shockwave-flash': '.swf',\n  'application/x-tar': '.tar',\n  'application/xhtml+xml': '.xhtml',\n  'application/xml': '.xml',\n  'application/zip': '.zip',\n  'audio/3gpp': '.3gp',\n  'audio/3gpp2': '.3g2',\n  'audio/aac': '.aac',\n  'audio/x-aac': '.aac',\n  'audio/midi': '.midi',\n  'audio/x-midi': '.midi',\n  'audio/x-m4a': '.m4a',\n  'audio/m4a': '.m4a',\n  'audio/mpeg': '.mp3',\n  'audio/ogg': '.oga',\n  'audio/opus': '.opus',\n  'audio/wav': '.wav',\n  'audio/x-wav': '.wav',\n  'audio/webm': '.weba',\n  'font/otf': '.otf',\n  'font/ttf': '.ttf',\n  'font/woff': '.woff',\n  'font/woff2': '.woff2',\n  'image/bmp': '.bmp',\n  'image/gif': '.gif',\n  'image/jpeg': '.jpg',\n  'image/png': '.png',\n  'image/svg+xml': '.svg',\n  'image/tiff': '.tiff',\n  'image/vnd.microsoft.icon': '.ico',\n  'image/webp': '.webp',\n  'text/calendar': '.ics',\n  'text/css': '.css',\n  'text/csv': '.csv',\n  'text/html': '.html',\n  'text/javascript': '.js',\n  'text/plain': '.txt',\n  'text/xml': '.xml',\n  'video/3gpp': '.3gp',\n  'video/3gpp2': '.3g2',\n  'video/mp2t': '.ts',\n  'video/mpeg': '.mpeg',\n  'video/ogg': '.ogv',\n  'video/webm': '.webm',\n  'video/x-msvideo': '.avi',\n  'video/quicktime': '.mov',\n};\n"
  },
  {
    "path": "lib/common/color.dart",
    "content": "import 'dart:math';\n\nimport 'package:flutter/material.dart';\n\nextension ColorExtension on Color {\n  Color get opacity80 {\n    return withAlpha(204);\n  }\n\n  Color get opacity60 {\n    return withAlpha(153);\n  }\n\n  Color get opacity50 {\n    return withAlpha(128);\n  }\n\n  Color get opacity38 {\n    return withAlpha(97);\n  }\n\n  Color get opacity30 {\n    return withAlpha(77);\n  }\n\n  Color get opacity12 {\n    return withAlpha(31);\n  }\n\n  Color get opacity15 {\n    return withAlpha(38);\n  }\n\n  Color get opacity10 {\n    return withAlpha(15);\n  }\n\n  Color get opacity3 {\n    return withAlpha(76);\n  }\n\n  Color get opacity0 {\n    return withAlpha(0);\n  }\n\n  int get value32bit {\n    return _floatToInt8(a) << 24 |\n        _floatToInt8(r) << 16 |\n        _floatToInt8(g) << 8 |\n        _floatToInt8(b) << 0;\n  }\n\n  int get alpha8bit => (0xff000000 & value32bit) >> 24;\n\n  int get red8bit => (0x00ff0000 & value32bit) >> 16;\n\n  int get green8bit => (0x0000ff00 & value32bit) >> 8;\n\n  int get blue8bit => (0x000000ff & value32bit) >> 0;\n\n  int _floatToInt8(double x) {\n    return (x * 255.0).round() & 0xff;\n  }\n\n  Color lighten([double amount = 10]) {\n    if (amount <= 0) return this;\n    if (amount > 100) return Colors.white;\n    final HSLColor hsl = this == const Color(0xFF000000)\n        ? HSLColor.fromColor(this).withSaturation(0)\n        : HSLColor.fromColor(this);\n    return hsl\n        .withLightness(min(1, max(0, hsl.lightness + amount / 100)))\n        .toColor();\n  }\n\n  String get hex {\n    final value = toARGB32();\n    final red = (value >> 16) & 0xFF;\n    final green = (value >> 8) & 0xFF;\n    final blue = value & 0xFF;\n    return '#${red.toRadixString(16).padLeft(2, '0')}'\n            '${green.toRadixString(16).padLeft(2, '0')}'\n            '${blue.toRadixString(16).padLeft(2, '0')}'\n        .toUpperCase();\n  }\n\n  Color darken([final int amount = 10]) {\n    if (amount <= 0) return this;\n    if (amount > 100) return Colors.black;\n    final HSLColor hsl = HSLColor.fromColor(this);\n    return hsl\n        .withLightness(min(1, max(0, hsl.lightness - amount / 100)))\n        .toColor();\n  }\n\n  Color blendDarken(\n    BuildContext context, {\n    double factor = 0.1,\n  }) {\n    final brightness = Theme.of(context).brightness;\n    return Color.lerp(\n      this,\n      brightness == Brightness.dark ? Colors.white : Colors.black,\n      factor,\n    )!;\n  }\n\n  Color blendLighten(\n    BuildContext context, {\n    double factor = 0.1,\n  }) {\n    final brightness = Theme.of(context).brightness;\n    return Color.lerp(\n      this,\n      brightness == Brightness.dark ? Colors.black : Colors.white,\n      factor,\n    )!;\n  }\n}\n\nextension ColorSchemeExtension on ColorScheme {\n  ColorScheme toPureBlack(bool isPrueBlack) => isPrueBlack\n      ? copyWith(\n          surface: Colors.black,\n          surfaceContainer: surfaceContainer.darken(\n            5,\n          ),\n        )\n      : this;\n}\n"
  },
  {
    "path": "lib/common/common.dart",
    "content": "export 'app_localizations.dart';\nexport 'cache.dart';\nexport 'color.dart';\nexport 'compute.dart';\nexport 'constant.dart';\nexport 'context.dart';\nexport 'converter.dart';\nexport 'datetime.dart';\nexport 'file.dart';\nexport 'fixed.dart';\nexport 'function.dart';\nexport 'future.dart';\nexport 'hive.dart';\nexport 'http.dart';\nexport 'icons.dart';\nexport 'indexing.dart';\nexport 'iterable.dart';\nexport 'keyboard.dart';\nexport 'launch.dart';\nexport 'link.dart';\nexport 'lock.dart';\nexport 'measure.dart';\nexport 'migration.dart';\nexport 'mixin.dart';\nexport 'navigation.dart';\nexport 'navigator.dart';\nexport 'network.dart';\nexport 'num.dart';\nexport 'package.dart';\nexport 'path.dart';\nexport 'picker.dart';\nexport 'preferences.dart';\nexport 'print.dart';\nexport 'protocol.dart';\nexport 'proxy.dart';\nexport 'render.dart';\nexport 'request.dart';\nexport 'scroll.dart';\nexport 'snowflake.dart';\nexport 'string.dart';\nexport 'system.dart';\nexport 'task.dart';\nexport 'text.dart';\nexport 'tray.dart';\nexport 'utils.dart';\nexport 'window.dart';\nexport 'yaml.dart';\n"
  },
  {
    "path": "lib/common/compute.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\n\nList<Group> computeSort({\n  required List<Group> groups,\n  required ProxiesSortType sortType,\n  required DelayMap delayMap,\n  required Map<String, String> selectedMap,\n  required String defaultTestUrl,\n}) {\n  List<Proxy> sortOfDelay({\n    required List<Group> groups,\n    required List<Proxy> proxies,\n    required DelayMap delayMap,\n    required Map<String, String> selectedMap,\n    required String testUrl,\n  }) {\n    return List.from(proxies)..sort((a, b) {\n      final aDelayState = computeProxyDelayState(\n        proxyName: a.name,\n        testUrl: testUrl,\n        groups: groups,\n        selectedMap: selectedMap,\n        delayMap: delayMap,\n      );\n      final bDelayState = computeProxyDelayState(\n        proxyName: b.name,\n        testUrl: testUrl,\n        groups: groups,\n        selectedMap: selectedMap,\n        delayMap: delayMap,\n      );\n      return aDelayState.compareTo(bDelayState);\n    });\n  }\n\n  List<Proxy> sortOfName(List<Proxy> proxies) {\n    return List.of(proxies)..sort((a, b) => a.name.compareTo(b.name));\n  }\n\n  return groups.map((group) {\n    final proxies = group.all;\n    final newProxies = switch (sortType) {\n      ProxiesSortType.none => proxies,\n      ProxiesSortType.delay => sortOfDelay(\n        groups: groups,\n        proxies: proxies,\n        delayMap: delayMap,\n        selectedMap: selectedMap,\n        testUrl: group.testUrl.takeFirstValid([defaultTestUrl]),\n      ),\n      ProxiesSortType.name => sortOfName(proxies),\n    };\n    return group.copyWith(all: newProxies);\n  }).toList();\n}\n\nSelectedProxyState getRealSelectedProxyState(\n  SelectedProxyState state, {\n  required List<Group> groups,\n  required Map<String, String> selectedMap,\n}) {\n  if (state.proxyName.isEmpty) return state;\n  final index = groups.indexWhere((element) => element.name == state.proxyName);\n  final newState = state.copyWith(group: true);\n  if (index == -1) return newState;\n  final group = groups[index];\n  final currentSelectedName = group.getCurrentSelectedName(\n    selectedMap[newState.proxyName] ?? '',\n  );\n  if (currentSelectedName.isEmpty) {\n    return newState;\n  }\n  return getRealSelectedProxyState(\n    newState.copyWith(proxyName: currentSelectedName, testUrl: group.testUrl),\n    groups: groups,\n    selectedMap: selectedMap,\n  );\n}\n\nSelectedProxyState computeRealSelectedProxyState(\n  String proxyName, {\n  required List<Group> groups,\n  required Map<String, String> selectedMap,\n}) {\n  return getRealSelectedProxyState(\n    SelectedProxyState(proxyName: proxyName),\n    groups: groups,\n    selectedMap: selectedMap,\n  );\n}\n\nDelayState computeProxyDelayState({\n  required String proxyName,\n  required String testUrl,\n  required List<Group> groups,\n  required Map<String, String> selectedMap,\n  required DelayMap delayMap,\n}) {\n  final state = computeRealSelectedProxyState(\n    proxyName,\n    groups: groups,\n    selectedMap: selectedMap,\n  );\n  final currentDelayMap =\n      delayMap[state.testUrl.takeFirstValid([testUrl])] ?? {};\n  final delay = currentDelayMap[state.proxyName];\n  return DelayState(delay: delay ?? 0, group: state.group);\n}\n"
  },
  {
    "path": "lib/common/constant.dart",
    "content": "// ignore_for_file: constant_identifier_names\n\nimport 'dart:math';\nimport 'dart:ui';\n\nimport 'package:collection/collection.dart';\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:flutter/material.dart';\n\nconst appName = 'FlClash';\nconst appHelperService = 'FlClashHelperService';\nconst coreName = 'clash.meta';\nconst browserUa =\n    'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36';\nconst packageName = 'com.follow.clash';\nfinal unixSocketPath = '/tmp/FlClashSocket_${Random().nextInt(10000)}.sock';\nconst helperPort = 47890;\nconst maxTextScale = 1.4;\nconst minTextScale = 0.8;\nfinal baseInfoEdgeInsets = EdgeInsets.symmetric(\n  vertical: 16.mAp,\n  horizontal: 16.mAp,\n);\nfinal listHeaderPadding = EdgeInsets.only(\n  left: 16.mAp,\n  right: 8.mAp,\n  top: 24.mAp,\n  bottom: 8.mAp,\n);\n\nconst watchExecution = true;\n\nfinal defaultTextScaleFactor =\n    WidgetsBinding.instance.platformDispatcher.textScaleFactor;\nconst httpTimeoutDuration = Duration(milliseconds: 5000);\nconst moreDuration = Duration(milliseconds: 100);\nconst animateDuration = Duration(milliseconds: 100);\nconst midDuration = Duration(milliseconds: 200);\nconst commonDuration = Duration(milliseconds: 300);\nconst defaultUpdateDuration = Duration(days: 1);\nconst MMDB = 'GEOIP.metadb';\nconst ASN = 'ASN.mmdb';\nconst GEOIP = 'GEOIP.dat';\nconst GEOSITE = 'GEOSITE.dat';\nfinal double kHeaderHeight = system.isDesktop\n    ? !system.isMacOS\n          ? 40\n          : 28\n    : 0;\nconst profilesDirectoryName = 'profiles';\nconst localhost = '127.0.0.1';\nconst clashConfigKey = 'clash_config';\nconst configKey = 'config';\nconst double dialogCommonWidth = 300;\nconst repository = 'chen08209/FlClash';\nconst defaultExternalController = '127.0.0.1:9090';\nconst maxMobileWidth = 600;\nconst maxLaptopWidth = 840;\nconst defaultTestUrl = 'https://www.gstatic.com/generate_204';\nfinal commonFilter = ImageFilter.blur(\n  sigmaX: 5,\n  sigmaY: 5,\n  tileMode: TileMode.mirror,\n);\n\nconst listEquality = ListEquality();\nconst navigationItemListEquality = ListEquality<NavigationItem>();\nconst trackerInfoListEquality = ListEquality<TrackerInfo>();\nconst stringListEquality = ListEquality<String>();\nconst intListEquality = ListEquality<int>();\nconst logListEquality = ListEquality<Log>();\nconst groupListEquality = ListEquality<Group>();\nconst ruleListEquality = ListEquality<Rule>();\nconst scriptListEquality = ListEquality<Script>();\nconst externalProviderListEquality = ListEquality<ExternalProvider>();\nconst packageListEquality = ListEquality<Package>();\nconst profileListEquality = ListEquality<Profile>();\nconst hotKeyActionListEquality = ListEquality<HotKeyAction>();\nconst stringAndStringMapEquality = MapEquality<String, String>();\nconst stringAndStringMapEntryListEquality =\n    ListEquality<MapEntry<String, String>>();\nconst stringAndStringMapEntryIterableEquality =\n    IterableEquality<MapEntry<String, String>>();\nconst stringAndObjectMapEntryIterableEquality =\n    IterableEquality<MapEntry<String, Object?>>();\nconst delayMapEquality = MapEquality<String, Map<String, int?>>();\nconst stringSetEquality = SetEquality<String>();\nconst keyboardModifierListEquality = SetEquality<KeyboardModifier>();\n\nconst viewModeColumnsMap = {\n  ViewMode.mobile: [2, 1],\n  ViewMode.laptop: [3, 2],\n  ViewMode.desktop: [4, 3],\n};\n\nconst proxiesListStoreKey = PageStorageKey<String>('proxies_list');\nconst toolsStoreKey = PageStorageKey<String>('tools');\nconst profilesStoreKey = PageStorageKey<String>('profiles');\n\nconst defaultPrimaryColor = 0XFFD8C0C3;\n\ndouble getWidgetHeight(num lines) {\n  final space = 14.mAp;\n  return max(lines * (80.ap + space) - space, 0);\n}\n\nconst maxLength = 1000;\n\nfinal mainIsolate = 'FlClashMainIsolate';\n\nfinal serviceIsolate = 'FlClashServiceIsolate';\n\nconst defaultPrimaryColors = [\n  0xFF795548,\n  0xFF03A9F4,\n  0xFFFFFF00,\n  0XFFBBC9CC,\n  0XFFABD397,\n  defaultPrimaryColor,\n  0XFF665390,\n];\n\nconst scriptTemplate = '''\nconst main = (config) => {\n  return config;\n}''';\n\nconst backupDatabaseName = 'database.sqlite';\nconst configJsonName = 'config.json';\n"
  },
  {
    "path": "lib/common/context.dart",
    "content": "import 'package:fl_clash/l10n/l10n.dart';\nimport 'package:fl_clash/manager/manager.dart';\nimport 'package:fl_clash/models/state.dart';\nimport 'package:fl_clash/widgets/scaffold.dart';\nimport 'package:flutter/material.dart';\n\nextension BuildContextExtension on BuildContext {\n  CommonScaffoldState? get commonScaffoldState {\n    return findAncestorStateOfType<CommonScaffoldState>();\n  }\n\n  void showNotifier(String text, {MessageActionState? actionState}) {\n    return findAncestorStateOfType<StatusManagerState>()?.message(\n      text,\n      actionState: actionState,\n    );\n  }\n\n  void showSnackBar(String message, {SnackBarAction? action}) {\n    final width = viewWidth;\n    EdgeInsets margin;\n    if (width < 600) {\n      margin = const EdgeInsets.only(bottom: 16, right: 16, left: 16);\n    } else {\n      margin = EdgeInsets.only(bottom: 16, left: 16, right: width - 316);\n    }\n    ScaffoldMessenger.of(this).showSnackBar(\n      SnackBar(\n        action: action,\n        content: Text(message),\n        behavior: SnackBarBehavior.floating,\n        duration: const Duration(milliseconds: 1500),\n        margin: margin,\n      ),\n    );\n  }\n\n  Size get appSize {\n    return MediaQuery.of(this).size;\n  }\n\n  double get viewWidth {\n    return appSize.width;\n  }\n\n  ColorScheme get colorScheme => Theme.of(this).colorScheme;\n\n  TextTheme get textTheme => Theme.of(this).textTheme;\n\n  AppLocalizations get appLocalizations => AppLocalizations.of(this);\n\n  T? findLastStateOfType<T extends State>() {\n    T? state;\n\n    visitor(Element element) {\n      if (!element.mounted) {\n        return;\n      }\n      if (element is StatefulElement) {\n        if (element.state is T) {\n          state = element.state as T;\n        }\n      }\n      element.visitChildren(visitor);\n    }\n\n    visitor(this as Element);\n    return state;\n  }\n}\n\nclass BackHandleInherited extends InheritedWidget {\n  final Function handleBack;\n\n  const BackHandleInherited({\n    super.key,\n    required this.handleBack,\n    required super.child,\n  });\n\n  static BackHandleInherited? of(BuildContext context) =>\n      context.dependOnInheritedWidgetOfExactType<BackHandleInherited>();\n\n  @override\n  bool updateShouldNotify(BackHandleInherited oldWidget) {\n    return handleBack != oldWidget.handleBack;\n  }\n}\n"
  },
  {
    "path": "lib/common/converter.dart",
    "content": "import 'dart:convert';\nimport 'dart:typed_data';\n\nclass Uint8ListToListIntConverter extends Converter<Uint8List, List<int>> {\n  @override\n  List<int> convert(Uint8List input) {\n    return input.toList();\n  }\n\n  @override\n  Sink<Uint8List> startChunkedConversion(Sink<List<int>> sink) {\n    return _Uint8ListToListIntConverterSink(sink);\n  }\n}\n\nclass _Uint8ListToListIntConverterSink implements Sink<Uint8List> {\n  const _Uint8ListToListIntConverterSink(this._target);\n\n  final Sink<List<int>> _target;\n\n  @override\n  void add(Uint8List data) {\n    _target.add(data.toList());\n  }\n\n  @override\n  void close() {\n    _target.close();\n  }\n}\n\nfinal uint8ListToListIntConverter = Uint8ListToListIntConverter();\n"
  },
  {
    "path": "lib/common/datetime.dart",
    "content": "import 'package:fl_clash/common/app_localizations.dart';\n\nextension DateTimeExtension on DateTime {\n  bool get isBeforeNow {\n    return isBefore(DateTime.now());\n  }\n\n  bool isBeforeSecure(DateTime? dateTime) {\n    if (dateTime == null) {\n      return false;\n    }\n    return true;\n  }\n\n  String get lastUpdateTimeDesc {\n    final currentDateTime = DateTime.now();\n    final difference = currentDateTime.difference(this);\n    final days = difference.inDays;\n    if (days >= 365) {\n      final years = (days / 365).floor();\n      return appLocalizations.yearsAgo(years);\n    }\n    if (days >= 30) {\n      final months = (days / 30).floor();\n      return appLocalizations.monthsAgo(months);\n    }\n    if (days >= 1) {\n      return appLocalizations.daysAgo(days);\n    }\n    final hours = difference.inHours;\n    if (hours >= 1) {\n      return appLocalizations.hoursAgo(hours);\n    }\n    final minutes = difference.inMinutes;\n    if (minutes >= 1) {\n      return appLocalizations.minutesAgo(minutes);\n    }\n    return appLocalizations.justNow;\n  }\n\n  String get show {\n    return toString().substring(0, 10);\n  }\n\n  String get showFull {\n    return toString().substring(0, 19);\n  }\n\n  String get showTime {\n    return toString().substring(10, 19);\n  }\n}\n"
  },
  {
    "path": "lib/common/dav_client.dart",
    "content": "import 'dart:async';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:webdav_client/webdav_client.dart';\n\nclass DAVClient {\n  late Client client;\n  Completer<bool> pingCompleter = Completer();\n  late String fileName;\n\n  DAVClient(DAVProps dav) {\n    client = newClient(dav.uri, user: dav.user, password: dav.password);\n    fileName = dav.fileName;\n    client.setHeaders({'accept-charset': 'utf-8', 'Content-Type': 'text/xml'});\n    client.setConnectTimeout(8000);\n    client.setSendTimeout(60000);\n    client.setReceiveTimeout(60000);\n    pingCompleter.complete(_ping());\n  }\n\n  Future<bool> _ping() async {\n    try {\n      await client.ping();\n      return true;\n    } catch (_) {\n      return false;\n    }\n  }\n\n  String get root => '/$appName';\n\n  String get backupFile => '$root/$fileName';\n\n  Future<bool> backup(String localFilePath) async {\n    await client.mkdir(root);\n    await client.writeFromFile(localFilePath, backupFile);\n    return true;\n  }\n\n  Future<bool> restore() async {\n    await client.mkdir(root);\n    final backupFilePath = await appPath.backupFilePath;\n    await client.read2File(backupFile, backupFilePath);\n    return true;\n  }\n}\n"
  },
  {
    "path": "lib/common/file.dart",
    "content": "import 'dart:io';\n\nextension FileExt on File {\n  Future<void> safeCopy(String newPath) async {\n    if (!await exists()) {\n      await create(recursive: true);\n      return;\n    }\n    final targetFile = File(newPath);\n    if (!await targetFile.exists()) {\n      await targetFile.create(recursive: true);\n    }\n    await copy(newPath);\n  }\n\n  Future<File> safeWriteAsString(String str) async {\n    if (!await exists()) {\n      await create(recursive: true);\n    }\n    return await writeAsString(str);\n  }\n\n  Future<File> safeWriteAsBytes(List<int> bytes) async {\n    if (!await exists()) {\n      await create(recursive: true);\n    }\n    return await writeAsBytes(bytes);\n  }\n}\n\nextension FileSystemEntityExt on FileSystemEntity {\n  Future<void> safeDelete({bool recursive = false}) async {\n    if (!await exists()) {\n      return;\n    }\n    await delete(recursive: recursive);\n  }\n}\n"
  },
  {
    "path": "lib/common/fixed.dart",
    "content": "import 'iterable.dart';\n\ntypedef ValueCallback<T> = T Function();\n\nclass FixedList<T> {\n  final int maxLength;\n  final List<T> _list;\n\n  FixedList(this.maxLength, {List<T>? list})\n      : _list = (list ?? [])..truncate(maxLength);\n\n  void add(T item) {\n    _list.add(item);\n    _list.truncate(maxLength);\n  }\n\n  void clear() {\n    _list.clear();\n  }\n\n  List<T> get list => List.unmodifiable(_list);\n\n  int get length => _list.length;\n\n  T operator [](int index) => _list[index];\n\n  FixedList<T> copyWith() {\n    return FixedList(\n      maxLength,\n      list: _list,\n    );\n  }\n}\n\nclass FixedMap<K, V> {\n  int maxLength;\n  late Map<K, V> _map;\n\n  FixedMap(this.maxLength, {Map<K, V>? map}) {\n    _map = map ?? {};\n  }\n\n  V updateCacheValue(K key, ValueCallback<V> callback) {\n    final realValue = _map.updateCacheValue(\n      key,\n      callback,\n    );\n    _adjustMap();\n    return realValue;\n  }\n\n  void clear() {\n    _map.clear();\n  }\n\n  void updateMaxLength(int size) {\n    maxLength = size;\n    _adjustMap();\n  }\n\n  void updateMap(Map<K, V> map) {\n    _map = map;\n    _adjustMap();\n  }\n\n  void _adjustMap() {\n    if (_map.length > maxLength) {\n      _map = Map.fromEntries(\n        map.entries.toList()..truncate(maxLength),\n      );\n    }\n  }\n\n  V? get(K key) => _map[key];\n\n  bool containsKey(K key) => _map.containsKey(key);\n\n  int get length => _map.length;\n\n  Map<K, V> get map => Map.unmodifiable(_map);\n}\n"
  },
  {
    "path": "lib/common/function.dart",
    "content": "import 'dart:async';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\n\nclass Debouncer {\n  final Map<FunctionTag, Timer?> _operations = {};\n\n  void call(\n    FunctionTag tag,\n    Function func, {\n    List<dynamic>? args,\n    Duration? duration,\n  }) {\n    final timer = _operations[tag];\n    if (timer != null) {\n      timer.cancel();\n    }\n    _operations[tag] = Timer(duration ?? const Duration(milliseconds: 600), () {\n      _operations[tag]?.cancel();\n      _operations.remove(tag);\n      Function.apply(func, args);\n    });\n  }\n\n  void cancel(dynamic tag) {\n    _operations[tag]?.cancel();\n    _operations[tag] = null;\n  }\n}\n\nclass Throttler {\n  final Map<FunctionTag, Timer?> _operations = {};\n\n  bool call(\n    FunctionTag tag,\n    Function func, {\n    List<dynamic>? args,\n    Duration duration = const Duration(milliseconds: 600),\n    bool fire = false,\n  }) {\n    final timer = _operations[tag];\n    if (timer != null) {\n      return true;\n    }\n    if (fire) {\n      Function.apply(func, args);\n      _operations[tag] = Timer(duration, () {\n        _operations[tag]?.cancel();\n        _operations.remove(tag);\n      });\n    } else {\n      _operations[tag] = Timer(duration, () {\n        Function.apply(func, args);\n        _operations[tag]?.cancel();\n        _operations.remove(tag);\n      });\n    }\n    return false;\n  }\n\n  void cancel(dynamic tag) {\n    _operations[tag]?.cancel();\n    _operations[tag] = null;\n  }\n}\n\nFuture<T> retry<T>({\n  required Future<T> Function() task,\n  int maxAttempts = 3,\n  required bool Function(T res) retryIf,\n  Duration delay = midDuration,\n}) async {\n  int attempts = 0;\n  while (attempts < maxAttempts) {\n    final res = await task();\n    if (!retryIf(res) || attempts >= maxAttempts) {\n      return res;\n    }\n    attempts++;\n  }\n  throw 'retry error';\n}\n\nfinal debouncer = Debouncer();\n\nfinal throttler = Throttler();\n"
  },
  {
    "path": "lib/common/future.dart",
    "content": "import 'dart:async';\nimport 'dart:ui';\n\nimport 'package:fl_clash/common/common.dart';\n\nextension FutureExt<T> on Future<T> {\n  Future<T> withTimeout({\n    Duration? timeout,\n    String? tag,\n    VoidCallback? onLast,\n    FutureOr<T> Function()? onTimeout,\n  }) {\n    final realTimeout = timeout ?? const Duration(minutes: 3);\n    Timer(realTimeout + commonDuration, () {\n      if (onLast != null) {\n        onLast();\n      }\n    });\n    return this.timeout(\n      realTimeout,\n      onTimeout: () async {\n        if (onTimeout != null) {\n          return onTimeout();\n        } else {\n          throw TimeoutException('${tag ?? runtimeType} timeout');\n        }\n      },\n    );\n  }\n}\n\nextension CompleterExt<T> on Completer<T> {\n  void safeCompleter(T value) {\n    if (isCompleted) {\n      return;\n    }\n    complete(value);\n  }\n}\n"
  },
  {
    "path": "lib/common/hive.dart",
    "content": ""
  },
  {
    "path": "lib/common/http.dart",
    "content": "import 'dart:io';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\n\nclass FlClashHttpOverrides extends HttpOverrides {\n  static String handleFindProxy(Uri url) {\n    if ([localhost].contains(url.host)) {\n      return 'DIRECT';\n    }\n    final port = appController.config.patchClashConfig.mixedPort;\n    final isStart = appController.isStart;\n    commonPrint.log('find $url proxy:$isStart');\n    if (!isStart) return 'DIRECT';\n    return 'PROXY localhost:$port';\n  }\n\n  @override\n  HttpClient createHttpClient(SecurityContext? context) {\n    final client = super.createHttpClient(context);\n    client.badCertificateCallback = (_, _, _) => true;\n    client.findProxy = handleFindProxy;\n    return client;\n  }\n}\n"
  },
  {
    "path": "lib/common/icons.dart",
    "content": "import 'package:flutter/material.dart';\n\nclass IconsExt {\n  static const IconData target = IconData(0xe900, fontFamily: 'Icons');\n}\n"
  },
  {
    "path": "lib/common/indexing.dart",
    "content": "import 'dart:math';\n\nclass Indexing {\n  static const String digits =\n      '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n\n  static const String integerZero = 'a0';\n  static const String smallestInteger = 'A00000000000000000000000000';\n\n  static Indexing? _instance;\n\n  Indexing._internal();\n\n  factory Indexing() {\n    _instance ??= Indexing._internal();\n    return _instance!;\n  }\n\n  int _getIntegerLength(String head) {\n    if (head.compareTo('a') >= 0 && head.compareTo('z') <= 0) {\n      return head.codeUnitAt(0) - 'a'.codeUnitAt(0) + 2;\n    } else if (head.compareTo('A') >= 0 && head.compareTo('Z') <= 0) {\n      return 'Z'.codeUnitAt(0) - head.codeUnitAt(0) + 2;\n    } else {\n      throw Exception('Invalid order key head: $head');\n    }\n  }\n\n  bool _validateInteger(String integer) {\n    if (integer.length != _getIntegerLength(integer[0])) {\n      throw Exception('Invalid integer part of order key: $integer');\n    }\n    return true;\n  }\n\n  String? _incrementInteger(String x) {\n    _validateInteger(x);\n    String head = x[0];\n    List<String> digs = x.substring(1).split('');\n\n    bool carry = true;\n\n    for (int i = digs.length - 1; carry && i >= 0; i--) {\n      int d = digits.indexOf(digs[i]) + 1;\n      if (d == digits.length) {\n        digs[i] = '0';\n      } else {\n        digs[i] = digits[d];\n        carry = false;\n      }\n    }\n\n    if (carry) {\n      if (head == 'Z') {\n        return 'a0';\n      }\n      if (head == 'z') {\n        return null;\n      }\n      String h = String.fromCharCode(head.codeUnitAt(0) + 1);\n      if (h.compareTo('a') > 0) {\n        digs.add('0');\n      } else {\n        digs.removeLast();\n      }\n      return h + digs.join('');\n    } else {\n      return head + digs.join('');\n    }\n  }\n\n  String? _decrementInteger(String x) {\n    _validateInteger(x);\n    String head = x[0];\n    List<String> digs = x.substring(1).split('');\n\n    bool borrow = true;\n\n    for (int i = digs.length - 1; borrow && i >= 0; i--) {\n      int d = digits.indexOf(digs[i]) - 1;\n      if (d == -1) {\n        digs[i] = digits[digits.length - 1];\n      } else {\n        digs[i] = digits[d];\n        borrow = false;\n      }\n    }\n\n    if (borrow) {\n      if (head == 'a') {\n        return 'Z${digits[digits.length - 1]}';\n      }\n      if (head == 'A') {\n        return null;\n      }\n      String h = String.fromCharCode(head.codeUnitAt(0) - 1);\n      if (h.compareTo('Z') < 0) {\n        digs.add(digits[digits.length - 1]);\n      } else {\n        digs.removeLast();\n      }\n      return h + digs.join('');\n    } else {\n      return head + digs.join('');\n    }\n  }\n\n  String _midpoint(String a, String? b) {\n    if (b != null && a.compareTo(b) >= 0) {\n      throw Exception(\n        'Second order key must be greater than the first: $a, $b',\n      );\n    }\n\n    if (a.isNotEmpty && a[a.length - 1] == '0' ||\n        (b != null && b.isNotEmpty && b[b.length - 1] == '0')) {\n      throw Exception('Trailing zeros are not allowed: $a, $b');\n    }\n\n    if (b != null) {\n      int n = 0;\n      while ((n < a.length ? a[n] : '0') == b[n]) {\n        n++;\n      }\n\n      if (n > 0) {\n        return b.substring(0, n) +\n            _midpoint(\n              a.substring(min(n, a.length)),\n              b.substring(min(n, b.length)),\n            );\n      }\n    }\n\n    int digitA = (a.isNotEmpty) ? digits.indexOf(a[0]) : 0;\n    int digitB = (b != null && b.isNotEmpty)\n        ? digits.indexOf(b[0])\n        : digits.length;\n\n    if (digitB - digitA > 1) {\n      int midDigit = (digitA + digitB + 1) ~/ 2;\n      return digits[midDigit];\n    } else {\n      if (b != null && b.length > 1) {\n        return b.substring(0, 1);\n      } else {\n        return digits[digitA] +\n            _midpoint(a.isNotEmpty ? a.substring(1) : '', null);\n      }\n    }\n  }\n\n  String _getIntegerPart(String key) {\n    int integerPartLength = _getIntegerLength(key[0]);\n    if (integerPartLength > key.length) {\n      throw Exception('Invalid order key: $key');\n    }\n    return key.substring(0, integerPartLength);\n  }\n\n  bool _validateOrderKey(String key) {\n    if (key == smallestInteger) {\n      throw Exception('Invalid order key: $key');\n    }\n\n    String i = _getIntegerPart(key);\n    String f = key.substring(i.length);\n    if (f.isNotEmpty && f[f.length - 1] == '0') {\n      throw Exception('Invalid order key: $key');\n    }\n    return true;\n  }\n\n  String? generateKeyBetween(String? a, String? b) {\n    if (a != null) {\n      _validateOrderKey(a);\n    }\n\n    if (b != null) {\n      _validateOrderKey(b);\n    }\n\n    if (a != null && b != null && a.compareTo(b) >= 0) {\n      throw Exception(\n        'Second order key must be greater than the first: $a, $b',\n      );\n    }\n\n    if (a == null && b == null) {\n      return integerZero;\n    }\n\n    if (a == null) {\n      b = b!;\n      String ib = _getIntegerPart(b);\n      String fb = b.substring(ib.length);\n      if (ib == smallestInteger) {\n        return ib + _midpoint('', fb);\n      }\n      return ib.compareTo(b) < 0 ? ib : _decrementInteger(ib);\n    }\n\n    if (b == null) {\n      String ia = _getIntegerPart(a);\n      String fa = a.substring(ia.length);\n      String? i = _incrementInteger(ia);\n      return i ?? ia + _midpoint(fa, null);\n    }\n\n    String ia = _getIntegerPart(a);\n    String fa = a.substring(ia.length);\n    String ib = _getIntegerPart(b);\n    String fb = b.substring(ib.length);\n\n    if (ia == ib) {\n      return ia + _midpoint(fa, fb);\n    }\n\n    String? i = _incrementInteger(ia);\n    return (i == null || i.compareTo(b) < 0) ? i : ia + _midpoint(fa, null);\n  }\n\n  List<String?> generateNKeysBetween(String? a, String? b, int n) {\n    if (n <= 0) {\n      return [];\n    }\n    if (n == 1) {\n      return [generateKeyBetween(a, b)];\n    }\n\n    if (b == null) {\n      String? c = generateKeyBetween(a, b);\n      List<String?> result = [c];\n      for (int i = 1; i < n; i++) {\n        c = generateKeyBetween(c, b);\n        result.add(c);\n      }\n      return result;\n    }\n\n    if (a == null) {\n      String? c = generateKeyBetween(a, b);\n      List<String?> result = [c];\n      for (int i = 1; i < n; i++) {\n        c = generateKeyBetween(a, c);\n        result.add(c);\n      }\n      return result.reversed.toList();\n    }\n\n    int mid = n ~/ 2;\n    String? c = generateKeyBetween(a, b);\n    return generateNKeysBetween(a, c, mid)\n        .followedBy([c])\n        .followedBy(generateNKeysBetween(c, b, n - mid - 1))\n        .toList();\n  }\n}\n\nfinal indexing = Indexing();\n"
  },
  {
    "path": "lib/common/iterable.dart",
    "content": "extension IterableExt<E> on Iterable<E> {\n  Iterable<E> separated(E separator) sync* {\n    final iterator = this.iterator;\n    if (!iterator.moveNext()) return;\n\n    yield iterator.current;\n\n    while (iterator.moveNext()) {\n      yield separator;\n      yield iterator.current;\n    }\n  }\n\n  Iterable<List<E>> chunks(int size) sync* {\n    if (length == 0) return;\n    var iterator = this.iterator;\n    while (iterator.moveNext()) {\n      var chunk = [iterator.current];\n      for (var i = 1; i < size && iterator.moveNext(); i++) {\n        chunk.add(iterator.current);\n      }\n      yield chunk;\n    }\n  }\n\n  Iterable<E> fill(int length, {required E Function(int count) filler}) sync* {\n    int count = 0;\n    for (var item in this) {\n      yield item;\n      count++;\n      if (count >= length) return;\n    }\n    while (count < length) {\n      yield filler(count);\n      count++;\n    }\n  }\n\n  Iterable<E> takeLast({int count = 50}) {\n    if (count <= 0) return Iterable.empty();\n    return count >= length ? this : toList().skip(length - count);\n  }\n}\n\nextension ListExt<T> on List<T> {\n  void truncate(int maxLength) {\n    if (maxLength == 0) {\n      return;\n    }\n    if (length > maxLength) {\n      removeRange(0, length - maxLength);\n    }\n  }\n\n  List<T> intersection(List<T> list) {\n    return where((item) => list.contains(item)).toList();\n  }\n\n  List<List<T>> batch(int maxConcurrent) {\n    final batches = (length / maxConcurrent).ceil();\n    final List<List<T>> res = [];\n    for (int i = 0; i < batches; i++) {\n      if (i != batches - 1) {\n        res.add(sublist(i * maxConcurrent, maxConcurrent * (i + 1)));\n      } else {\n        res.add(sublist(i * maxConcurrent, length));\n      }\n    }\n    return res;\n  }\n\n  List<T> safeSublist(int start, [int? end]) {\n    if (start <= 0) return this;\n    if (start > length) return [];\n    if (end != null) {\n      return sublist(start, end.clamp(start, length));\n    }\n    return sublist(start);\n  }\n\n  T? safeGet(int index, {T? defaultValue}) {\n    if (index < 0 || index >= length) {\n      return defaultValue;\n    }\n    return this[index];\n  }\n\n  T safeLast(T defaultValue) {\n    if (isNotEmpty) {\n      return last;\n    }\n    return defaultValue;\n  }\n\n  void addOrRemove(T value) {\n    if (contains(value)) {\n      remove(value);\n    } else {\n      add(value);\n    }\n  }\n}\n\nextension SetExt<T> on Set<T> {\n  void addOrRemove(T value) {\n    if (contains(value)) {\n      remove(value);\n    } else {\n      add(value);\n    }\n  }\n}\n\nextension DoubleListExt on List<double> {\n  int findInterval(num target) {\n    if (isEmpty) return -1;\n    if (target < first) return -1;\n    if (target >= last) return length - 1;\n\n    int left = 0;\n    int right = length - 1;\n\n    while (left <= right) {\n      int mid = left + (right - left) ~/ 2;\n\n      if (mid == length - 1 ||\n          (this[mid] <= target && target < this[mid + 1])) {\n        return mid;\n      } else if (target < this[mid]) {\n        right = mid - 1;\n      } else {\n        left = mid + 1;\n      }\n    }\n\n    return -1;\n  }\n}\n\nextension MapExt<K, V> on Map<K, V> {\n  V updateCacheValue(K key, V Function() callback) {\n    if (this[key] == null) {\n      this[key] = callback();\n    }\n    return this[key]!;\n  }\n\n  Map<K, V> copyWitUpdate(K key, V? value) {\n    final newMap = Map<K, V>.from(this);\n    if (value == null) {\n      newMap.remove(key);\n    } else {\n      newMap[key] = value;\n    }\n    return newMap;\n  }\n}\n"
  },
  {
    "path": "lib/common/keyboard.dart",
    "content": "import 'package:flutter/services.dart';\nimport 'package:uni_platform/uni_platform.dart';\n\nimport 'system.dart';\n\nfinal Map<PhysicalKeyboardKey, String> _knownKeyLabels =\n    <PhysicalKeyboardKey, String>{\n  PhysicalKeyboardKey.keyA: 'A',\n  PhysicalKeyboardKey.keyB: 'B',\n  PhysicalKeyboardKey.keyC: 'C',\n  PhysicalKeyboardKey.keyD: 'D',\n  PhysicalKeyboardKey.keyE: 'E',\n  PhysicalKeyboardKey.keyF: 'F',\n  PhysicalKeyboardKey.keyG: 'G',\n  PhysicalKeyboardKey.keyH: 'H',\n  PhysicalKeyboardKey.keyI: 'I',\n  PhysicalKeyboardKey.keyJ: 'J',\n  PhysicalKeyboardKey.keyK: 'K',\n  PhysicalKeyboardKey.keyL: 'L',\n  PhysicalKeyboardKey.keyM: 'M',\n  PhysicalKeyboardKey.keyN: 'N',\n  PhysicalKeyboardKey.keyO: 'O',\n  PhysicalKeyboardKey.keyP: 'P',\n  PhysicalKeyboardKey.keyQ: 'Q',\n  PhysicalKeyboardKey.keyR: 'R',\n  PhysicalKeyboardKey.keyS: 'S',\n  PhysicalKeyboardKey.keyT: 'T',\n  PhysicalKeyboardKey.keyU: 'U',\n  PhysicalKeyboardKey.keyV: 'V',\n  PhysicalKeyboardKey.keyW: 'W',\n  PhysicalKeyboardKey.keyX: 'X',\n  PhysicalKeyboardKey.keyY: 'Y',\n  PhysicalKeyboardKey.keyZ: 'Z',\n  PhysicalKeyboardKey.digit1: '1',\n  PhysicalKeyboardKey.digit2: '2',\n  PhysicalKeyboardKey.digit3: '3',\n  PhysicalKeyboardKey.digit4: '4',\n  PhysicalKeyboardKey.digit5: '5',\n  PhysicalKeyboardKey.digit6: '6',\n  PhysicalKeyboardKey.digit7: '7',\n  PhysicalKeyboardKey.digit8: '8',\n  PhysicalKeyboardKey.digit9: '9',\n  PhysicalKeyboardKey.digit0: '0',\n  PhysicalKeyboardKey.enter: 'ENTER',\n  PhysicalKeyboardKey.escape: 'ESCAPE',\n  PhysicalKeyboardKey.backspace: 'BACKSPACE',\n  PhysicalKeyboardKey.tab: 'TAB',\n  PhysicalKeyboardKey.space: 'SPACE',\n  PhysicalKeyboardKey.minus: '-',\n  PhysicalKeyboardKey.equal: '=',\n  PhysicalKeyboardKey.bracketLeft: '[',\n  PhysicalKeyboardKey.bracketRight: ']',\n  PhysicalKeyboardKey.backslash: '\\\\',\n  PhysicalKeyboardKey.semicolon: ';',\n  PhysicalKeyboardKey.quote: '\"',\n  PhysicalKeyboardKey.backquote: '`',\n  PhysicalKeyboardKey.comma: ',',\n  PhysicalKeyboardKey.period: '.',\n  PhysicalKeyboardKey.slash: '/',\n  PhysicalKeyboardKey.capsLock: 'CAPSLOCK',\n  PhysicalKeyboardKey.f1: 'F1',\n  PhysicalKeyboardKey.f2: 'F2',\n  PhysicalKeyboardKey.f3: 'F3',\n  PhysicalKeyboardKey.f4: 'F4',\n  PhysicalKeyboardKey.f5: 'F5',\n  PhysicalKeyboardKey.f6: 'F6',\n  PhysicalKeyboardKey.f7: 'F7',\n  PhysicalKeyboardKey.f8: 'F8',\n  PhysicalKeyboardKey.f9: 'F9',\n  PhysicalKeyboardKey.f10: 'F10',\n  PhysicalKeyboardKey.f11: 'F11',\n  PhysicalKeyboardKey.f12: 'F12',\n  PhysicalKeyboardKey.home: 'HOME',\n  PhysicalKeyboardKey.pageUp: 'PAGEUP',\n  PhysicalKeyboardKey.delete: 'DELETE',\n  PhysicalKeyboardKey.end: 'END',\n  PhysicalKeyboardKey.pageDown: 'PAGEDOWN',\n  PhysicalKeyboardKey.arrowRight: '→',\n  PhysicalKeyboardKey.arrowLeft: '←',\n  PhysicalKeyboardKey.arrowDown: '↓',\n  PhysicalKeyboardKey.arrowUp: '↑',\n  PhysicalKeyboardKey.controlLeft: 'CTRL',\n  PhysicalKeyboardKey.shiftLeft: 'SHIFT',\n  PhysicalKeyboardKey.altLeft: 'ALT',\n  PhysicalKeyboardKey.metaLeft: system.isMacOS ? '⌘' : 'WIN',\n  PhysicalKeyboardKey.controlRight: 'CTRL',\n  PhysicalKeyboardKey.shiftRight: 'SHIFT',\n  PhysicalKeyboardKey.altRight: 'ALT',\n  PhysicalKeyboardKey.metaRight: system.isMacOS ? '⌘' : 'WIN',\n  PhysicalKeyboardKey.fn: 'FN',\n};\n\nextension KeyboardKeyExt on KeyboardKey {\n  String get label {\n    PhysicalKeyboardKey? physicalKey;\n    if (this is LogicalKeyboardKey) {\n      physicalKey = (this as LogicalKeyboardKey).physicalKey;\n    } else if (this is PhysicalKeyboardKey) {\n      physicalKey = this as PhysicalKeyboardKey;\n    }\n    return _knownKeyLabels[physicalKey] ?? physicalKey?.debugName ?? 'Unknown';\n  }\n}\n"
  },
  {
    "path": "lib/common/launch.dart",
    "content": "import 'dart:async';\nimport 'dart:io';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:launch_at_startup/launch_at_startup.dart';\n\nimport 'constant.dart';\nimport 'system.dart';\n\nclass AutoLaunch {\n  static AutoLaunch? _instance;\n\n  AutoLaunch._internal() {\n    launchAtStartup.setup(\n      appName: appName,\n      appPath: Platform.resolvedExecutable,\n    );\n  }\n\n  factory AutoLaunch() {\n    _instance ??= AutoLaunch._internal();\n    return _instance!;\n  }\n\n  Future<bool> get isEnable async {\n    return await launchAtStartup.isEnabled();\n  }\n\n  Future<bool> enable() async {\n    return await launchAtStartup.enable();\n  }\n\n  Future<bool> disable() async {\n    return await launchAtStartup.disable();\n  }\n\n  Future<void> updateStatus(bool isAutoLaunch) async {\n    if (kDebugMode) {\n      return;\n    }\n    if (await isEnable == isAutoLaunch) return;\n    if (isAutoLaunch == true) {\n      enable();\n    } else {\n      disable();\n    }\n  }\n}\n\nfinal autoLaunch = system.isDesktop ? AutoLaunch() : null;\n"
  },
  {
    "path": "lib/common/link.dart",
    "content": "import 'dart:async';\n\nimport 'package:app_links/app_links.dart';\n\nimport 'print.dart';\n\ntypedef InstallConfigCallBack = void Function(String url);\n\nclass LinkManager {\n  static LinkManager? _instance;\n  late AppLinks _appLinks;\n  StreamSubscription? subscription;\n\n  LinkManager._internal() {\n    _appLinks = AppLinks();\n  }\n\n  Future<void> initAppLinksListen(\n      Function(String url) installConfigCallBack) async {\n    commonPrint.log('initAppLinksListen');\n    destroy();\n    subscription = _appLinks.uriLinkStream.listen(\n      (uri) {\n        commonPrint.log('onAppLink: $uri');\n        if (uri.host == 'install-config') {\n          final parameters = uri.queryParameters;\n          final url = parameters['url'];\n          if (url != null) {\n            installConfigCallBack(url);\n          }\n        }\n      },\n    );\n  }\n\n  void destroy() {\n    if (subscription != null) {\n      subscription?.cancel();\n      subscription = null;\n    }\n  }\n\n  factory LinkManager() {\n    _instance ??= LinkManager._internal();\n    return _instance!;\n  }\n}\n\nfinal linkManager = LinkManager();\n"
  },
  {
    "path": "lib/common/lock.dart",
    "content": "import 'dart:io';\n\nimport 'package:fl_clash/common/common.dart';\n\nclass SingleInstanceLock {\n  static SingleInstanceLock? _instance;\n  RandomAccessFile? _accessFile;\n\n  SingleInstanceLock._internal();\n\n  factory SingleInstanceLock() {\n    _instance ??= SingleInstanceLock._internal();\n    return _instance!;\n  }\n\n  Future<bool> acquire() async {\n    try {\n      final lockFilePath = await appPath.lockFilePath;\n      final lockFile = File(lockFilePath);\n      await lockFile.create();\n      _accessFile = await lockFile.open(mode: FileMode.write);\n      await _accessFile?.lock();\n      return true;\n    } catch (_) {\n      return false;\n    }\n  }\n}\n\nfinal singleInstanceLock = SingleInstanceLock();\n"
  },
  {
    "path": "lib/common/measure.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'package:flutter/material.dart';\n\nclass Measure {\n  final TextScaler _textScaler;\n  final BuildContext context;\n  final Map<String, dynamic> _measureMap;\n\n  Measure.of(this.context, double textScaleFactor)\n    : _measureMap = {},\n      _textScaler = TextScaler.linear(textScaleFactor);\n\n  Size computeTextSize(Text text, {double maxWidth = double.infinity}) {\n    final textPainter = TextPainter(\n      text: TextSpan(text: text.data, style: text.style),\n      maxLines: text.maxLines,\n      textScaler: _textScaler,\n      textDirection: text.textDirection ?? TextDirection.ltr,\n    )..layout(maxWidth: maxWidth);\n    return textPainter.size;\n  }\n\n  double get bodyMediumHeight {\n    return _measureMap.updateCacheValue(\n      'bodyMediumHeight',\n      () => computeTextSize(\n        Text('X', style: context.textTheme.bodyMedium),\n      ).height,\n    );\n  }\n\n  double get bodyLargeHeight {\n    return _measureMap.updateCacheValue(\n      'bodyLargeHeight',\n      () =>\n          computeTextSize(Text('X', style: context.textTheme.bodyLarge)).height,\n    );\n  }\n\n  double get bodySmallHeight {\n    return _measureMap.updateCacheValue(\n      'bodySmallHeight',\n      () =>\n          computeTextSize(Text('X', style: context.textTheme.bodySmall)).height,\n    );\n  }\n\n  double get labelSmallHeight {\n    return _measureMap.updateCacheValue(\n      'labelSmallHeight',\n      () => computeTextSize(\n        Text('X', style: context.textTheme.labelSmall),\n      ).height,\n    );\n  }\n\n  double get titleSmallHeight {\n    return _measureMap.updateCacheValue(\n      'titleSmallHeight',\n      () => computeTextSize(\n        Text('X', style: context.textTheme.titleSmall),\n      ).height,\n    );\n  }\n\n  double get labelMediumHeight {\n    return _measureMap.updateCacheValue(\n      'labelMediumHeight',\n      () => computeTextSize(\n        Text('X', style: context.textTheme.labelMedium),\n      ).height,\n    );\n  }\n\n  double get titleLargeHeight {\n    return _measureMap.updateCacheValue(\n      'titleLargeHeight',\n      () => computeTextSize(\n        Text('X', style: context.textTheme.titleLarge),\n      ).height,\n    );\n  }\n\n  double get titleMediumHeight {\n    return _measureMap.updateCacheValue(\n      'titleMediumHeight',\n      () => computeTextSize(\n        Text('X', style: context.textTheme.titleMedium),\n      ).height,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/common/migration.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/models/models.dart';\n\nclass Migration {\n  static Migration? _instance;\n  late int _oldVersion;\n\n  Migration._internal();\n\n  final currentVersion = 1;\n\n  factory Migration() {\n    _instance ??= Migration._internal();\n    return _instance!;\n  }\n\n  Future<Config> migrationIfNeeded(\n    Map<String, Object?>? configMap, {\n    required Future<Config> Function(MigrationData data) sync,\n  }) async {\n    _oldVersion = await preferences.getVersion();\n    if (_oldVersion == currentVersion) {\n      try {\n        return Config.realFromJson(configMap);\n      } catch (_) {\n        final isV0 = configMap?['proxiesStyle'] != null;\n        if (isV0) {\n          _oldVersion = 0;\n        } else {\n          throw 'Local data is damaged. A reset is required to fix this issue.';\n        }\n      }\n    }\n    MigrationData data = MigrationData(configMap: configMap);\n    if (_oldVersion == 0 && configMap != null) {\n      final clashConfigMap = await preferences.getClashConfigMap();\n      if (clashConfigMap != null) {\n        configMap['patchClashConfig'] = clashConfigMap;\n        await preferences.clearClashConfig();\n      }\n      data = await _oldToNow(configMap);\n    }\n    final res = await sync(data);\n    await preferences.setVersion(currentVersion);\n    return res;\n  }\n\n  Future<MigrationData> _oldToNow(Map<String, Object?> configMap) async {\n    return await oldToNowTask(configMap);\n  }\n}\n\nfinal migration = Migration();\n"
  },
  {
    "path": "lib/common/mixin.dart",
    "content": "import 'package:riverpod/riverpod.dart';\nimport 'package:riverpod_annotation/riverpod_annotation.dart';\n\nmixin AutoDisposeNotifierMixin<T> on AnyNotifier<T, T> {\n  T get value => state;\n\n  set value(T value) {\n    state = value;\n  }\n\n  bool equals(T previous, T next) {\n    return false;\n  }\n\n  @override\n  bool updateShouldNotify(previous, next) {\n    final res = !equals(previous, next)\n        ? super.updateShouldNotify(previous, next)\n        : true;\n    if (res) {\n      onUpdate(next);\n    }\n    return res;\n  }\n\n  void onUpdate(T value) {}\n\n  void update(T? Function(T) builder) {\n    final res = builder(value);\n    if (res == null) {\n      return;\n    }\n    value = res;\n  }\n}\n\nmixin AsyncNotifierMixin<T> on AnyNotifier<AsyncValue<T>, T> {\n  T get value;\n\n  set value(T value) {\n    state = AsyncData(value);\n  }\n}\n"
  },
  {
    "path": "lib/common/navigation.dart",
    "content": "import 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/views/views.dart';\nimport 'package:flutter/material.dart';\n\nclass Navigation {\n  static Navigation? _instance;\n\n  List<NavigationItem> getItems({\n    bool openLogs = false,\n    bool hasProxies = false,\n  }) {\n    return [\n      NavigationItem(\n        keep: false,\n        icon: Icon(Icons.space_dashboard),\n        label: PageLabel.dashboard,\n        builder: (_) =>\n            const DashboardView(key: GlobalObjectKey(PageLabel.dashboard)),\n      ),\n      NavigationItem(\n        icon: const Icon(Icons.article),\n        label: PageLabel.proxies,\n        builder: (_) =>\n            const ProxiesView(key: GlobalObjectKey(PageLabel.proxies)),\n        modes: hasProxies\n            ? [NavigationItemMode.mobile, NavigationItemMode.desktop]\n            : [],\n      ),\n      NavigationItem(\n        icon: Icon(Icons.folder),\n        label: PageLabel.profiles,\n        builder: (_) =>\n            const ProfilesView(key: GlobalObjectKey(PageLabel.profiles)),\n      ),\n      NavigationItem(\n        icon: Icon(Icons.view_timeline),\n        label: PageLabel.requests,\n        builder: (_) =>\n            const RequestsView(key: GlobalObjectKey(PageLabel.requests)),\n        description: 'requestsDesc',\n        modes: [NavigationItemMode.desktop, NavigationItemMode.more],\n      ),\n      NavigationItem(\n        icon: Icon(Icons.ballot),\n        label: PageLabel.connections,\n        builder: (_) =>\n            const ConnectionsView(key: GlobalObjectKey(PageLabel.connections)),\n        description: 'connectionsDesc',\n        modes: [NavigationItemMode.desktop, NavigationItemMode.more],\n      ),\n      NavigationItem(\n        icon: Icon(Icons.storage),\n        label: PageLabel.resources,\n        description: 'resourcesDesc',\n        builder: (_) =>\n            const ResourcesView(key: GlobalObjectKey(PageLabel.resources)),\n        modes: [NavigationItemMode.more],\n      ),\n      NavigationItem(\n        icon: const Icon(Icons.adb),\n        label: PageLabel.logs,\n        builder: (_) => const LogsView(key: GlobalObjectKey(PageLabel.logs)),\n        description: 'logsDesc',\n        modes: openLogs\n            ? [NavigationItemMode.desktop, NavigationItemMode.more]\n            : [],\n      ),\n      NavigationItem(\n        icon: Icon(Icons.construction),\n        label: PageLabel.tools,\n        builder: (_) => const ToolsView(key: GlobalObjectKey(PageLabel.tools)),\n        modes: [NavigationItemMode.desktop, NavigationItemMode.mobile],\n      ),\n    ];\n  }\n\n  Navigation._internal();\n\n  factory Navigation() {\n    _instance ??= Navigation._internal();\n    return _instance!;\n  }\n}\n\nfinal navigation = Navigation();\n"
  },
  {
    "path": "lib/common/navigator.dart",
    "content": "import 'package:animations/animations.dart';\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:flutter/material.dart';\n\nclass BaseNavigator {\n  static Future<T?> push<T>(BuildContext context, Widget child) async {\n    if (!appController.isMobile) {\n      return await Navigator.of(\n        context,\n      ).push<T>(CommonDesktopRoute(builder: (context) => child));\n    }\n    return await Navigator.of(\n      context,\n    ).push<T>(CommonRoute(builder: (context) => child));\n  }\n\n  // static Future<T?> modal<T>(BuildContext context, Widget child) async {\n  //   if (globalState.appState.viewMode != ViewMode.mobile) {\n  //     return await globalState.showCommonDialog<T>(\n  //       child: CommonModal(\n  //         child: child,\n  //       ),\n  //     );\n  //   }\n  //   return await Navigator.of(context).push<T>(\n  //     CommonRoute(\n  //       builder: (context) => child,\n  //     ),\n  //   );\n  // }\n}\n\nconst commonSharedXPageTransitions = SharedAxisPageTransitionsBuilder(\n  transitionType: SharedAxisTransitionType.horizontal,\n  fillColor: Colors.transparent,\n);\n\nclass CommonDesktopRoute<T> extends PageRoute<T> {\n  final Widget Function(BuildContext context) builder;\n\n  CommonDesktopRoute({required this.builder});\n\n  @override\n  Color? get barrierColor => null;\n\n  @override\n  String? get barrierLabel => null;\n\n  @override\n  Widget buildPage(\n    BuildContext context,\n    Animation<double> animation,\n    Animation<double> secondaryAnimation,\n  ) {\n    final Widget result = builder(context);\n    return Semantics(\n      scopesRoute: true,\n      explicitChildNodes: true,\n      child: FadeTransition(opacity: animation, child: result),\n    );\n  }\n\n  @override\n  bool get maintainState => true;\n\n  @override\n  Duration get transitionDuration => Duration(milliseconds: 200);\n\n  @override\n  Duration get reverseTransitionDuration => Duration(milliseconds: 200);\n}\n\nclass CommonRoute<T> extends PageRoute<T> {\n  final Widget Function(BuildContext context) builder;\n\n  CommonRoute({required this.builder});\n\n  @override\n  Color? get barrierColor => null;\n\n  @override\n  String? get barrierLabel => null;\n\n  @override\n  bool get maintainState => true;\n\n  @override\n  Widget buildPage(\n    BuildContext context,\n    Animation<double> animation,\n    Animation<double> secondaryAnimation,\n  ) {\n    final Widget result = builder(context);\n    return Semantics(\n      scopesRoute: true,\n      explicitChildNodes: true,\n      child: SharedAxisTransition(\n        animation: animation,\n        secondaryAnimation: secondaryAnimation,\n        transitionType: SharedAxisTransitionType.horizontal,\n        fillColor: context.colorScheme.surface,\n        child: result,\n      ),\n    );\n  }\n\n  @override\n  Duration get transitionDuration => Duration(milliseconds: 300);\n\n  @override\n  Duration get reverseTransitionDuration => Duration(milliseconds: 300);\n}\n\nfinal Animatable<Offset> _kRightMiddleTween = Tween<Offset>(\n  begin: const Offset(1.0, 0.0),\n  end: Offset.zero,\n);\nfinal Animatable<Offset> _kMiddleLeftTween = Tween<Offset>(\n  begin: Offset.zero,\n  end: const Offset(-1.0 / 3.0, 0.0),\n);\n\nclass CommonPageTransitionsBuilder extends PageTransitionsBuilder {\n  const CommonPageTransitionsBuilder();\n\n  @override\n  Widget buildTransitions<T>(\n    PageRoute<T> route,\n    BuildContext context,\n    Animation<double> animation,\n    Animation<double> secondaryAnimation,\n    Widget child,\n  ) {\n    return CommonPageTransition(\n      context: context,\n      primaryRouteAnimation: animation,\n      secondaryRouteAnimation: secondaryAnimation,\n      linearTransition: false,\n      child: child,\n    );\n  }\n}\n\nclass CommonPageTransition extends StatefulWidget {\n  const CommonPageTransition({\n    super.key,\n    required this.context,\n    required this.primaryRouteAnimation,\n    required this.secondaryRouteAnimation,\n    required this.child,\n    required this.linearTransition,\n  });\n\n  final Widget child;\n\n  final Animation<double> primaryRouteAnimation;\n\n  final Animation<double> secondaryRouteAnimation;\n\n  final BuildContext context;\n\n  final bool linearTransition;\n\n  static Widget? delegatedTransition(\n    BuildContext context,\n    Animation<double> animation,\n    Animation<double> secondaryAnimation,\n    bool allowSnapshotting,\n    Widget? child,\n  ) {\n    final CurvedAnimation animation = CurvedAnimation(\n      parent: secondaryAnimation,\n      curve: Curves.linearToEaseOut,\n      reverseCurve: Curves.easeInToLinear,\n    );\n    final Animation<Offset> delegatedPositionAnimation = animation.drive(\n      _kMiddleLeftTween,\n    );\n    animation.dispose();\n\n    assert(debugCheckHasDirectionality(context));\n    final TextDirection textDirection = Directionality.of(context);\n    return SlideTransition(\n      position: delegatedPositionAnimation,\n      textDirection: textDirection,\n      transformHitTests: false,\n      child: child,\n    );\n  }\n\n  @override\n  State<CommonPageTransition> createState() => _CommonPageTransitionState();\n}\n\nclass _CommonPageTransitionState extends State<CommonPageTransition> {\n  late Animation<Offset> _primaryPositionAnimation;\n  late Animation<Offset> _secondaryPositionAnimation;\n  late Animation<Decoration> _primaryShadowAnimation;\n  CurvedAnimation? _primaryPositionCurve;\n  CurvedAnimation? _secondaryPositionCurve;\n  CurvedAnimation? _primaryShadowCurve;\n\n  @override\n  void initState() {\n    super.initState();\n    _setupAnimation();\n  }\n\n  @override\n  void didUpdateWidget(covariant CommonPageTransition oldWidget) {\n    super.didUpdateWidget(oldWidget);\n    if (oldWidget.primaryRouteAnimation != widget.primaryRouteAnimation ||\n        oldWidget.secondaryRouteAnimation != widget.secondaryRouteAnimation ||\n        oldWidget.linearTransition != widget.linearTransition) {\n      _disposeCurve();\n      _setupAnimation();\n    }\n  }\n\n  @override\n  void dispose() {\n    _disposeCurve();\n    super.dispose();\n  }\n\n  void _disposeCurve() {\n    _primaryPositionCurve?.dispose();\n    _secondaryPositionCurve?.dispose();\n    _primaryShadowCurve?.dispose();\n    _primaryPositionCurve = null;\n    _secondaryPositionCurve = null;\n    _primaryShadowCurve = null;\n  }\n\n  void _setupAnimation() {\n    if (!widget.linearTransition) {\n      _primaryPositionCurve = CurvedAnimation(\n        parent: widget.primaryRouteAnimation,\n        curve: Curves.fastEaseInToSlowEaseOut,\n        reverseCurve: Curves.fastEaseInToSlowEaseOut.flipped,\n      );\n      _secondaryPositionCurve = CurvedAnimation(\n        parent: widget.secondaryRouteAnimation,\n        curve: Curves.linearToEaseOut,\n        reverseCurve: Curves.easeInToLinear,\n      );\n      _primaryShadowCurve = CurvedAnimation(\n        parent: widget.primaryRouteAnimation,\n        curve: Curves.linearToEaseOut,\n      );\n    }\n    _primaryPositionAnimation =\n        (_primaryPositionCurve ?? widget.primaryRouteAnimation).drive(\n          _kRightMiddleTween,\n        );\n    _secondaryPositionAnimation =\n        (_secondaryPositionCurve ?? widget.secondaryRouteAnimation).drive(\n          _kMiddleLeftTween,\n        );\n    _primaryShadowAnimation =\n        (_primaryShadowCurve ?? widget.primaryRouteAnimation).drive(\n          DecorationTween(\n            begin: const _CommonEdgeShadowDecoration(),\n            end: _CommonEdgeShadowDecoration(<Color>[\n              Color(0x04000000),\n              Colors.transparent,\n            ]),\n          ),\n        );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    assert(debugCheckHasDirectionality(context));\n    final TextDirection textDirection = Directionality.of(context);\n    return SlideTransition(\n      position: _secondaryPositionAnimation,\n      textDirection: textDirection,\n      transformHitTests: false,\n      child: SlideTransition(\n        position: _primaryPositionAnimation,\n        textDirection: textDirection,\n        child: DecoratedBoxTransition(\n          decoration: _primaryShadowAnimation,\n          child: widget.child,\n        ),\n      ),\n    );\n  }\n}\n\nclass _CommonEdgeShadowDecoration extends Decoration {\n  final List<Color>? _colors;\n\n  const _CommonEdgeShadowDecoration([this._colors]);\n\n  @override\n  BoxPainter createBoxPainter([VoidCallback? onChanged]) {\n    return _CommonEdgeShadowPainter(this, onChanged);\n  }\n}\n\nclass _CommonEdgeShadowPainter extends BoxPainter {\n  _CommonEdgeShadowPainter(this._decoration, super.onChanged)\n    : assert(_decoration._colors == null || _decoration._colors.length > 1);\n\n  final _CommonEdgeShadowDecoration _decoration;\n\n  @override\n  void paint(Canvas canvas, Offset offset, ImageConfiguration configuration) {\n    final List<Color>? colors = _decoration._colors;\n    if (colors == null) {\n      return;\n    }\n\n    final double shadowWidth = 0.05 * configuration.size!.width;\n    final double shadowHeight = configuration.size!.height;\n    final double bandWidth = shadowWidth / (colors.length - 1);\n\n    final TextDirection? textDirection = configuration.textDirection;\n    assert(textDirection != null);\n    final (double shadowDirection, double start) = switch (textDirection!) {\n      TextDirection.rtl => (1, offset.dx + configuration.size!.width),\n      TextDirection.ltr => (-1, offset.dx),\n    };\n\n    int bandColorIndex = 0;\n    for (int dx = 0; dx < shadowWidth; dx += 1) {\n      if (dx ~/ bandWidth != bandColorIndex) {\n        bandColorIndex += 1;\n      }\n      final Paint paint = Paint()\n        ..color = Color.lerp(\n          colors[bandColorIndex],\n          colors[bandColorIndex + 1],\n          (dx % bandWidth) / bandWidth,\n        )!;\n      final double x = start + shadowDirection * dx;\n      canvas.drawRect(\n        Rect.fromLTWH(x - 1.0, offset.dy, 1.0, shadowHeight),\n        paint,\n      );\n    }\n  }\n}\n"
  },
  {
    "path": "lib/common/network.dart",
    "content": "import 'dart:io';\n\nextension NetworkInterfaceExt on NetworkInterface {\n  bool get isWifi {\n    final nameLowCase = name.toLowerCase();\n    if (nameLowCase.contains('wlan') ||\n        nameLowCase.contains('wi-fi') ||\n        nameLowCase == 'en0' ||\n        nameLowCase == 'eth0') {\n      return true;\n    }\n\n    return false;\n  }\n\n  bool get includesIPv4 {\n    return addresses.any((addr) => addr.isIPv4);\n  }\n}\n\nextension InternetAddressExt on InternetAddress {\n  bool get isIPv4 {\n    return type == InternetAddressType.IPv4;\n  }\n}\n"
  },
  {
    "path": "lib/common/num.dart",
    "content": "import 'dart:math';\n\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/common.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nextension NumExt on num {\n  String fixed({int decimals = 2}) {\n    String formatted = toStringAsFixed(decimals);\n    if (formatted.contains('.')) {\n      formatted = formatted.replaceAll(RegExp(r'0*$'), '');\n      if (formatted.endsWith('.')) {\n        formatted = formatted.substring(0, formatted.length - 1);\n      }\n    }\n    return formatted;\n  }\n\n  double get ap {\n    return this * (1 + (globalState.theme.textScaleFactor - 1) * 0.5);\n  }\n\n  double get mAp {\n    return this * min((1 + (globalState.theme.textScaleFactor - 1) * 0.5), 1);\n  }\n\n  TrafficShow get traffic {\n    final units = TrafficUnit.values;\n    var size = toDouble();\n    var unitIndex = 0;\n    while (size >= 1024 && unitIndex < units.length - 1) {\n      size /= 1024;\n      unitIndex++;\n    }\n    return TrafficShow(\n      value: size.fixed(decimals: 1),\n      unit: units[unitIndex].name,\n    );\n  }\n\n  TrafficShow get shortTraffic {\n    final units = TrafficUnit.values;\n    var size = toDouble();\n    var unitIndex = 0;\n    while (size >= 1024 && unitIndex < units.length - 1) {\n      size /= 1024;\n      unitIndex++;\n    }\n    return TrafficShow(\n      value: size.toStringAsFixed(0),\n      unit: ' ${units[unitIndex].name}',\n    );\n  }\n}\n\nextension DoubleExt on double {\n  bool moreOrEqual(double value) {\n    return this > value || (value - this).abs() < precisionErrorTolerance + 1;\n  }\n}\n\nextension OffsetExt on Offset {\n  double getCrossAxisOffset(Axis direction) {\n    return direction == Axis.vertical ? dx : dy;\n  }\n\n  double getMainAxisOffset(Axis direction) {\n    return direction == Axis.vertical ? dy : dx;\n  }\n\n  bool less(Offset offset) {\n    if (dy < offset.dy) {\n      return true;\n    }\n    if (dy == offset.dy && dx < offset.dx) {\n      return true;\n    }\n    return false;\n  }\n}\n\nextension RectExt on Rect {\n  bool doRectIntersect(Rect rect) {\n    return left < rect.right &&\n        right > rect.left &&\n        top < rect.bottom &&\n        bottom > rect.top;\n  }\n}\n"
  },
  {
    "path": "lib/common/package.dart",
    "content": "import 'dart:io';\n\nimport 'package:package_info_plus/package_info_plus.dart';\n\nimport 'common.dart';\n\nextension PackageInfoExtension on PackageInfo {\n  String get ua => [\n        '$appName/v$version',\n        'clash-verge',\n        'Platform/${Platform.operatingSystem}',\n      ].join(' ');\n}\n"
  },
  {
    "path": "lib/common/path.dart",
    "content": "import 'dart:async';\nimport 'dart:io';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:path/path.dart';\nimport 'package:path_provider/path_provider.dart';\n\nclass AppPath {\n  static AppPath? _instance;\n  Completer<Directory> dataDir = Completer();\n  Completer<Directory> downloadDir = Completer();\n  Completer<Directory> tempDir = Completer();\n  Completer<Directory> cacheDir = Completer();\n  late String appDirPath;\n\n  AppPath._internal() {\n    appDirPath = join(dirname(Platform.resolvedExecutable));\n    getApplicationSupportDirectory().then((value) {\n      dataDir.complete(value);\n    });\n    getTemporaryDirectory().then((value) {\n      tempDir.complete(value);\n    });\n    getDownloadsDirectory().then((value) {\n      downloadDir.complete(value);\n    });\n    getApplicationCacheDirectory().then((value) {\n      cacheDir.complete(value);\n    });\n  }\n\n  factory AppPath() {\n    _instance ??= AppPath._internal();\n    return _instance!;\n  }\n\n  String get executableExtension {\n    return system.isWindows ? '.exe' : '';\n  }\n\n  String get executableDirPath {\n    final currentExecutablePath = Platform.resolvedExecutable;\n    return dirname(currentExecutablePath);\n  }\n\n  String get corePath {\n    return join(executableDirPath, 'FlClashCore$executableExtension');\n  }\n\n  String get helperPath {\n    return join(executableDirPath, '$appHelperService$executableExtension');\n  }\n\n  Future<String> get downloadDirPath async {\n    final directory = await downloadDir.future;\n    return directory.path;\n  }\n\n  Future<String> get homeDirPath async {\n    final directory = await dataDir.future;\n    return directory.path;\n  }\n\n  Future<String> get databasePath async {\n    final mHomeDirPath = await homeDirPath;\n    return join(mHomeDirPath, 'database.sqlite');\n  }\n\n  Future<String> get backupFilePath async {\n    final mHomeDirPath = await homeDirPath;\n    return join(mHomeDirPath, 'backup.zip');\n  }\n\n  Future<String> get restoreDirPath async {\n    final mHomeDirPath = await homeDirPath;\n    return join(mHomeDirPath, 'restore');\n  }\n\n  Future<String> get tempFilePath async {\n    final mTempDir = await tempDir.future;\n    return join(mTempDir.path, 'temp${utils.id}');\n  }\n\n  Future<String> get lockFilePath async {\n    final homeDirPath = await appPath.homeDirPath;\n    return join(homeDirPath, 'FlClash.lock');\n  }\n\n  Future<String> get configFilePath async {\n    final mHomeDirPath = await homeDirPath;\n    return join(mHomeDirPath, 'config.yaml');\n  }\n\n  Future<String> get sharedFilePath async {\n    final mHomeDirPath = await homeDirPath;\n    return join(mHomeDirPath, 'shared.json');\n  }\n\n  Future<String> get sharedPreferencesPath async {\n    final directory = await dataDir.future;\n    return join(directory.path, 'shared_preferences.json');\n  }\n\n  Future<String> get profilesPath async {\n    final directory = await dataDir.future;\n    return join(directory.path, profilesDirectoryName);\n  }\n\n  Future<String> getProfilePath(String fileName) async {\n    return join(await profilesPath, '$fileName.yaml');\n  }\n\n  Future<String> get scriptsDirPath async {\n    final path = await homeDirPath;\n    return join(path, 'scripts');\n  }\n\n  Future<String> getScriptPath(String fileName) async {\n    final path = await scriptsDirPath;\n    return join(path, '$fileName.js');\n  }\n\n  Future<String> getIconsCacheDir() async {\n    final directory = await cacheDir.future;\n    return join(directory.path, 'icons');\n  }\n\n  Future<String> getProvidersRootPath() async {\n    final directory = await profilesPath;\n    return join(directory, 'providers');\n  }\n\n  Future<String> getProvidersDirPath(String id) async {\n    final directory = await profilesPath;\n    return join(directory, 'providers', id);\n  }\n\n  Future<String> getProvidersFilePath(\n    String id,\n    String type,\n    String url,\n  ) async {\n    final directory = await profilesPath;\n    return join(directory, 'providers', id, type, url.toMd5());\n  }\n\n  Future<String> get tempPath async {\n    final directory = await tempDir.future;\n    return directory.path;\n  }\n}\n\nfinal appPath = AppPath();\n"
  },
  {
    "path": "lib/common/picker.dart",
    "content": "import 'dart:io';\nimport 'dart:typed_data';\n\nimport 'package:file_picker/file_picker.dart';\nimport 'package:fl_clash/common/common.dart';\nimport 'package:image_picker/image_picker.dart';\nimport 'package:mobile_scanner/mobile_scanner.dart';\n\nclass Picker {\n  Future<PlatformFile?> pickerFile({bool withData = true}) async {\n    final filePickerResult = await FilePicker.platform.pickFiles(\n      withData: withData,\n      allowMultiple: false,\n      initialDirectory: await appPath.downloadDirPath,\n    );\n    return filePickerResult?.files.first;\n  }\n\n  Future<String?> saveFile(String fileName, Uint8List bytes) async {\n    final path = await FilePicker.platform.saveFile(\n      fileName: fileName,\n      initialDirectory: await appPath.downloadDirPath,\n      bytes: bytes,\n    );\n    if (!system.isAndroid && path != null) {\n      final file = File(path);\n      await file.safeWriteAsBytes(bytes);\n    }\n    return path;\n  }\n\n  Future<String?> saveFileWithPath(String fileName, String localPath) async {\n    final localFile = File(localPath);\n    if (!await localFile.exists()) {\n      await localFile.create(recursive: true);\n    }\n    final bytes = Platform.isAndroid ? await localFile.readAsBytes() : null;\n    final path = await FilePicker.platform.saveFile(\n      fileName: fileName,\n      initialDirectory: await appPath.downloadDirPath,\n      bytes: bytes,\n    );\n    if (path != null && bytes == null) {\n      await localFile.copy(path);\n    }\n    await localFile.safeDelete();\n    return path;\n  }\n\n  Future<String?> pickerConfigQRCode() async {\n    final xFile = await ImagePicker().pickImage(source: ImageSource.gallery);\n    if (xFile == null) {\n      return null;\n    }\n    final controller = MobileScannerController();\n    final capture = await controller.analyzeImage(\n      xFile.path,\n      formats: [BarcodeFormat.qrCode],\n    );\n    final result = capture?.barcodes.first.rawValue;\n    if (result == null || !result.isUrl) {\n      throw appLocalizations.pleaseUploadValidQrcode;\n    }\n    return result;\n  }\n}\n\nfinal picker = Picker();\n"
  },
  {
    "path": "lib/common/preferences.dart",
    "content": "import 'dart:async';\nimport 'dart:convert';\n\nimport 'package:fl_clash/models/models.dart';\nimport 'package:shared_preferences/shared_preferences.dart';\n\nimport 'constant.dart';\n\nclass Preferences {\n  static Preferences? _instance;\n  Completer<SharedPreferences?> sharedPreferencesCompleter = Completer();\n\n  Future<bool> get isInit async =>\n      await sharedPreferencesCompleter.future != null;\n\n  Preferences._internal() {\n    SharedPreferences.getInstance()\n        .then((value) => sharedPreferencesCompleter.complete(value))\n        .onError((_, _) => sharedPreferencesCompleter.complete(null));\n  }\n\n  factory Preferences() {\n    _instance ??= Preferences._internal();\n    return _instance!;\n  }\n\n  Future<int> getVersion() async {\n    final preferences = await sharedPreferencesCompleter.future;\n    return preferences?.getInt('version') ?? 0;\n  }\n\n  Future<void> setVersion(int version) async {\n    final preferences = await sharedPreferencesCompleter.future;\n    await preferences?.setInt('version', version);\n  }\n\n  Future<void> saveShareState(SharedState shareState) async {\n    final preferences = await sharedPreferencesCompleter.future;\n    await preferences?.setString('sharedState', json.encode(shareState));\n  }\n\n  Future<Map<String, Object?>?> getConfigMap() async {\n    try {\n      final preferences = await sharedPreferencesCompleter.future;\n      final configString = preferences?.getString(configKey);\n      if (configString == null) return null;\n      final Map<String, Object?>? configMap = json.decode(configString);\n      return configMap;\n    } catch (_) {\n      return null;\n    }\n  }\n\n  Future<Map<String, Object?>?> getClashConfigMap() async {\n    try {\n      final preferences = await sharedPreferencesCompleter.future;\n      final clashConfigString = preferences?.getString(clashConfigKey);\n      if (clashConfigString == null) return null;\n      return json.decode(clashConfigString);\n    } catch (_) {\n      return null;\n    }\n  }\n\n  Future<void> clearClashConfig() async {\n    try {\n      final preferences = await sharedPreferencesCompleter.future;\n      await preferences?.remove(clashConfigKey);\n      return;\n    } catch (_) {\n      return;\n    }\n  }\n\n  Future<Config?> getConfig() async {\n    final configMap = await getConfigMap();\n    if (configMap == null) {\n      return null;\n    }\n    return Config.fromJson(configMap);\n  }\n\n  Future<bool> saveConfig(Config config) async {\n    final preferences = await sharedPreferencesCompleter.future;\n    return preferences?.setString(configKey, json.encode(config)) ?? false;\n  }\n\n  Future<void> clearPreferences() async {\n    final sharedPreferencesIns = await sharedPreferencesCompleter.future;\n    await sharedPreferencesIns?.clear();\n  }\n}\n\nfinal preferences = Preferences();\n"
  },
  {
    "path": "lib/common/print.dart",
    "content": "import 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:flutter/material.dart';\n\nclass CommonPrint {\n  static CommonPrint? _instance;\n\n  CommonPrint._internal();\n\n  factory CommonPrint() {\n    _instance ??= CommonPrint._internal();\n    return _instance!;\n  }\n\n  void log(String? text, {LogLevel logLevel = LogLevel.info}) {\n    final payload = '[APP] $text';\n    debugPrint(payload);\n    if (!appController.isAttach) {\n      return;\n    }\n    appController.addLog(Log.app(payload).copyWith(logLevel: logLevel));\n  }\n}\n\nfinal commonPrint = CommonPrint();\n"
  },
  {
    "path": "lib/common/protocol.dart",
    "content": "import 'dart:io';\n\nimport 'package:win32_registry/win32_registry.dart';\n\nclass Protocol {\n  static Protocol? _instance;\n\n  Protocol._internal();\n\n  factory Protocol() {\n    _instance ??= Protocol._internal();\n    return _instance!;\n  }\n\n  void register(String scheme) {\n    String protocolRegKey = 'Software\\\\Classes\\\\$scheme';\n    RegistryValue protocolRegValue = RegistryValue.string(\n      'URL Protocol',\n      '',\n    );\n    String protocolCmdRegKey = 'shell\\\\open\\\\command';\n    RegistryValue protocolCmdRegValue = RegistryValue.string(\n      '',\n      '\"${Platform.resolvedExecutable}\" \"%1\"',\n    );\n    final regKey = Registry.currentUser.createKey(protocolRegKey);\n    regKey.createValue(protocolRegValue);\n    regKey.createKey(protocolCmdRegKey).createValue(protocolCmdRegValue);\n  }\n}\n\nfinal protocol = Protocol();\n"
  },
  {
    "path": "lib/common/proxy.dart",
    "content": "import 'package:fl_clash/common/system.dart';\nimport 'package:proxy/proxy.dart';\n\nfinal proxy = system.isDesktop ? Proxy() : null;\n"
  },
  {
    "path": "lib/common/render.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:flutter/scheduler.dart';\n\nclass Render {\n  static Render? _instance;\n  bool _isPaused = false;\n  final _dispatcher = SchedulerBinding.instance.platformDispatcher;\n  FrameCallback? _beginFrame;\n  VoidCallback? _drawFrame;\n\n  Render._internal();\n\n  factory Render() {\n    _instance ??= Render._internal();\n    return _instance!;\n  }\n\n  void active() {\n    resume();\n    pause();\n  }\n\n  void pause() {\n    throttler.call(\n      FunctionTag.renderPause,\n      _pause,\n      duration: Duration(seconds: 5),\n    );\n  }\n\n  void resume() {\n    throttler.cancel(FunctionTag.renderPause);\n    _resume();\n  }\n\n  void _pause() async {\n    if (_isPaused) return;\n    _isPaused = true;\n    _beginFrame = _dispatcher.onBeginFrame;\n    _drawFrame = _dispatcher.onDrawFrame;\n    _dispatcher.onBeginFrame = null;\n    _dispatcher.onDrawFrame = null;\n    commonPrint.log('pause');\n  }\n\n  void _resume() {\n    if (!_isPaused) return;\n    _isPaused = false;\n    _dispatcher.onBeginFrame = _beginFrame;\n    _dispatcher.onDrawFrame = _drawFrame;\n    _dispatcher.scheduleFrame();\n    commonPrint.log('resume');\n  }\n}\n\nfinal Render? render = system.isDesktop ? Render() : null;\n"
  },
  {
    "path": "lib/common/request.dart",
    "content": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:io';\nimport 'dart:typed_data';\n\nimport 'package:dio/dio.dart';\nimport 'package:dio/io.dart';\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:flutter/cupertino.dart';\n\nclass Request {\n  late final Dio dio;\n  late final Dio _clashDio;\n  String? userAgent;\n\n  Request() {\n    dio = Dio(BaseOptions(headers: {'User-Agent': browserUa}));\n    _clashDio = Dio();\n    _clashDio.httpClientAdapter = IOHttpClientAdapter(\n      createHttpClient: () {\n        final client = HttpClient();\n        client.findProxy = (Uri uri) {\n          client.userAgent = appController.ua;\n          return FlClashHttpOverrides.handleFindProxy(uri);\n        };\n        return client;\n      },\n    );\n  }\n\n  Future<Response<Uint8List>> getFileResponseForUrl(String url) async {\n    try {\n      return await _clashDio.get<Uint8List>(\n        url,\n        options: Options(responseType: ResponseType.bytes),\n      );\n    } catch (e) {\n      commonPrint.log('getFileResponseForUrl error ${e.toString()}');\n      if (e is DioException) {\n        if (e.type == DioExceptionType.unknown) {\n          throw appLocalizations.unknownNetworkError;\n        } else if (e.type == DioExceptionType.badResponse) {\n          throw appLocalizations.networkException;\n        }\n        rethrow;\n      }\n      throw appLocalizations.unknownNetworkError;\n    }\n  }\n\n  Future<Response<String>> getTextResponseForUrl(String url) async {\n    final response = await _clashDio.get<String>(\n      url,\n      options: Options(responseType: ResponseType.plain),\n    );\n    return response;\n  }\n\n  Future<MemoryImage?> getImage(String url) async {\n    if (url.isEmpty) return null;\n    final response = await dio.get<Uint8List>(\n      url,\n      options: Options(responseType: ResponseType.bytes),\n    );\n    final data = response.data;\n    if (data == null) return null;\n    return MemoryImage(data);\n  }\n\n  Future<Map<String, dynamic>?> checkForUpdate() async {\n    try {\n      final response = await dio.get(\n        'https://api.github.com/repos/$repository/releases/latest',\n        options: Options(responseType: ResponseType.json),\n      );\n      if (response.statusCode != 200) return null;\n      final data = response.data as Map<String, dynamic>;\n      final remoteVersion = data['tag_name'];\n      final version = globalState.packageInfo.version;\n      final hasUpdate =\n          utils.compareVersions(remoteVersion.replaceAll('v', ''), version) > 0;\n      if (!hasUpdate) return null;\n      return data;\n    } catch (e) {\n      commonPrint.log('checkForUpdate failed', logLevel: LogLevel.warning);\n      return null;\n    }\n  }\n\n  final Map<String, IpInfo Function(Map<String, dynamic>)> _ipInfoSources = {\n    'https://ipwho.is': IpInfo.fromIpWhoIsJson,\n    'https://api.myip.com': IpInfo.fromMyIpJson,\n    'https://ipapi.co/json': IpInfo.fromIpApiCoJson,\n    'https://ident.me/json': IpInfo.fromIdentMeJson,\n    'http://ip-api.com/json': IpInfo.fromIpAPIJson,\n    'https://api.ip.sb/geoip': IpInfo.fromIpSbJson,\n    'https://ipinfo.io/json': IpInfo.fromIpInfoIoJson,\n  };\n\n  Future<Result<IpInfo?>> checkIp({CancelToken? cancelToken}) async {\n    var failureCount = 0;\n    final token = cancelToken ?? CancelToken();\n    final futures = _ipInfoSources.entries.map((source) async {\n      final Completer<Result<IpInfo?>> completer = Completer();\n      handleFailRes() {\n        if (!completer.isCompleted && failureCount == _ipInfoSources.length) {\n          completer.complete(Result.success(null));\n        }\n      }\n\n      final future = dio\n          .get<Map<String, dynamic>>(\n            source.key,\n            cancelToken: token,\n            options: Options(responseType: ResponseType.json),\n          )\n          .timeout(const Duration(seconds: 10));\n      future\n          .then((res) {\n            if (res.statusCode == HttpStatus.ok && res.data != null) {\n              completer.complete(Result.success(source.value(res.data!)));\n              return;\n            }\n            failureCount++;\n            handleFailRes();\n          })\n          .catchError((e) {\n            failureCount++;\n            if (e is DioException && e.type == DioExceptionType.cancel) {\n              completer.complete(Result.error('cancelled'));\n            }\n            handleFailRes();\n          });\n      return completer.future;\n    });\n    final res = await Future.any(futures);\n    token.cancel();\n    return res;\n  }\n\n  Future<bool> pingHelper() async {\n    try {\n      final response = await dio\n          .get(\n            'http://$localhost:$helperPort/ping',\n            options: Options(responseType: ResponseType.plain),\n          )\n          .timeout(const Duration(milliseconds: 2000));\n      if (response.statusCode != HttpStatus.ok) {\n        return false;\n      }\n      return (response.data as String) == globalState.coreSHA256;\n    } catch (_) {\n      return false;\n    }\n  }\n\n  Future<bool> startCoreByHelper(String arg) async {\n    try {\n      final response = await dio\n          .post(\n            'http://$localhost:$helperPort/start',\n            data: json.encode({'path': appPath.corePath, 'arg': arg}),\n            options: Options(responseType: ResponseType.plain),\n          )\n          .timeout(const Duration(milliseconds: 2000));\n      if (response.statusCode != HttpStatus.ok) {\n        return false;\n      }\n      final data = response.data as String;\n      return data.isEmpty;\n    } catch (_) {\n      return false;\n    }\n  }\n\n  Future<bool> stopCoreByHelper() async {\n    try {\n      final response = await dio\n          .post(\n            'http://$localhost:$helperPort/stop',\n            options: Options(responseType: ResponseType.plain),\n          )\n          .timeout(const Duration(milliseconds: 2000));\n      if (response.statusCode != HttpStatus.ok) {\n        return false;\n      }\n      final data = response.data as String;\n      return data.isEmpty;\n    } catch (_) {\n      return false;\n    }\n  }\n}\n\nfinal request = Request();\n"
  },
  {
    "path": "lib/common/scroll.dart",
    "content": "import 'dart:math';\nimport 'dart:ui';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/widgets/scroll.dart';\nimport 'package:flutter/material.dart';\n\nclass BaseScrollBehavior extends MaterialScrollBehavior {\n  @override\n  Set<PointerDeviceKind> get dragDevices => {\n    PointerDeviceKind.touch,\n    PointerDeviceKind.stylus,\n    PointerDeviceKind.invertedStylus,\n    PointerDeviceKind.trackpad,\n    if (system.isDesktop) PointerDeviceKind.mouse,\n    PointerDeviceKind.unknown,\n  };\n\n  @override\n  Widget buildScrollbar(\n    BuildContext context,\n    Widget child,\n    ScrollableDetails details,\n  ) {\n    switch (axisDirectionToAxis(details.direction)) {\n      case Axis.horizontal:\n        return child;\n      case Axis.vertical:\n        switch (getPlatform(context)) {\n          case TargetPlatform.linux:\n          case TargetPlatform.macOS:\n          case TargetPlatform.windows:\n            assert(details.controller != null);\n            return CommonScrollBar(\n              controller: details.controller,\n              child: child,\n            );\n          case TargetPlatform.android:\n          case TargetPlatform.fuchsia:\n          case TargetPlatform.iOS:\n            return child;\n        }\n    }\n  }\n}\n\nclass HiddenBarScrollBehavior extends BaseScrollBehavior {\n  @override\n  Widget buildScrollbar(\n    BuildContext context,\n    Widget child,\n    ScrollableDetails details,\n  ) {\n    return child;\n  }\n}\n\nclass ShowBarScrollBehavior extends BaseScrollBehavior {\n  @override\n  Widget buildScrollbar(\n    BuildContext context,\n    Widget child,\n    ScrollableDetails details,\n  ) {\n    return CommonScrollBar(controller: details.controller, child: child);\n  }\n}\n\nclass NextClampingScrollPhysics extends ClampingScrollPhysics {\n  const NextClampingScrollPhysics({super.parent});\n\n  @override\n  NextClampingScrollPhysics applyTo(ScrollPhysics? ancestor) {\n    return NextClampingScrollPhysics(parent: buildParent(ancestor));\n  }\n\n  @override\n  Simulation? createBallisticSimulation(\n    ScrollMetrics position,\n    double velocity,\n  ) {\n    final Tolerance tolerance = toleranceFor(position);\n    if (position.outOfRange) {\n      double? end;\n      if (position.pixels > position.maxScrollExtent) {\n        end = position.maxScrollExtent;\n      }\n      if (position.pixels < position.minScrollExtent) {\n        end = position.minScrollExtent;\n      }\n      assert(end != null);\n      return ScrollSpringSimulation(\n        spring,\n        end!,\n        end,\n        min(0.0, velocity),\n        tolerance: tolerance,\n      );\n    }\n    if (velocity.abs() < tolerance.velocity) {\n      return null;\n    }\n    if (velocity > 0.0 && position.pixels >= position.maxScrollExtent) {\n      return null;\n    }\n    if (velocity < 0.0 && position.pixels <= position.minScrollExtent) {\n      return null;\n    }\n    return ClampingScrollSimulation(\n      position: position.pixels,\n      velocity: velocity,\n      tolerance: tolerance,\n    );\n  }\n}\n\n// class CacheScrollPositionController extends ScrollController {\n//   final String key;\n//\n//   CacheScrollPositionController({\n//     required this.key,\n//     double initialScrollOffset = 0.0,\n//     super.keepScrollOffset = true,\n//     super.debugLabel,\n//     super.onAttach,\n//     super.onDetach,\n//   });\n//\n//   @override\n//   ScrollPosition createScrollPosition(\n//     ScrollPhysics physics,\n//     ScrollContext context,\n//     ScrollPosition? oldPosition,\n//   ) {\n//     return ScrollPositionWithSingleContext(\n//       physics: physics,\n//       context: context,\n//       initialPixels:\n//           globalState.scrollPositionCache[key] ?? initialScrollOffset,\n//       keepScrollOffset: keepScrollOffset,\n//       oldPosition: oldPosition,\n//       debugLabel: debugLabel,\n//     );\n//   }\n//\n//   double? get cacheOffset => globalState.scrollPositionCache[key];\n//\n//   _handleScroll() {\n//     globalState.scrollPositionCache[key] = position.pixels;\n//   }\n//\n//   @override\n//   void attach(ScrollPosition position) {\n//     super.attach(position);\n//     addListener(_handleScroll);\n//   }\n//\n//   @override\n//   void detach(ScrollPosition position) {\n//     removeListener(_handleScroll);\n//     super.detach(position);\n//   }\n// }\n\nclass ReverseScrollController extends ScrollController {\n  ReverseScrollController({\n    super.initialScrollOffset,\n    super.keepScrollOffset,\n    super.debugLabel,\n  });\n\n  @override\n  ScrollPosition createScrollPosition(\n    ScrollPhysics physics,\n    ScrollContext context,\n    ScrollPosition? oldPosition,\n  ) {\n    return ReverseScrollPosition(\n      physics: physics,\n      context: context,\n      initialPixels: initialScrollOffset,\n      keepScrollOffset: keepScrollOffset,\n      oldPosition: oldPosition,\n      debugLabel: debugLabel,\n    );\n  }\n}\n\nclass ReverseScrollPosition extends ScrollPositionWithSingleContext {\n  ReverseScrollPosition({\n    required super.physics,\n    required super.context,\n    super.initialPixels = 0.0,\n    super.keepScrollOffset,\n    super.oldPosition,\n    super.debugLabel,\n  });\n\n  bool _isInit = false;\n\n  @override\n  bool applyContentDimensions(double minScrollExtent, double maxScrollExtent) {\n    if (!_isInit) {\n      correctPixels(maxScrollExtent);\n      _isInit = true;\n    }\n    return super.applyContentDimensions(minScrollExtent, maxScrollExtent);\n  }\n}\n"
  },
  {
    "path": "lib/common/snowflake.dart",
    "content": "class Snowflake {\n  static Snowflake? _instance;\n\n  Snowflake._internal();\n\n  factory Snowflake() {\n    _instance ??= Snowflake._internal();\n    return _instance!;\n  }\n\n  static const int twepoch = 1704067200000;\n\n  static const int workerIdBits = 10;\n  static const int sequenceBits = 12;\n\n  static const int maxWorkerId = -1 ^ (-1 << workerIdBits);\n  static const int sequenceMask = -1 ^ (-1 << sequenceBits);\n\n  static const int workerIdShift = sequenceBits;\n  static const int timestampLeftShift = sequenceBits + workerIdBits;\n\n  final int workerId = 1;\n  int _lastTimestamp = -1;\n  int _sequence = 0;\n\n  int get id {\n    int timestamp = DateTime.now().millisecondsSinceEpoch;\n    if (timestamp < _lastTimestamp) {\n      throw ArgumentError(\n        'Clock moved backwards. Refusing to generate id for ${_lastTimestamp - timestamp} milliseconds',\n      );\n    }\n    if (timestamp == _lastTimestamp) {\n      _sequence = (_sequence + 1) & sequenceMask;\n      if (_sequence == 0) {\n        timestamp = _getNextMillis(_lastTimestamp);\n      }\n    } else {\n      _sequence = 0;\n    }\n\n    _lastTimestamp = timestamp;\n\n    return ((timestamp - twepoch) << timestampLeftShift) |\n        (workerId << workerIdShift) |\n        _sequence;\n  }\n\n  int _getNextMillis(int lastTimestamp) {\n    int timestamp = DateTime.now().millisecondsSinceEpoch;\n    while (timestamp <= lastTimestamp) {\n      timestamp = DateTime.now().millisecondsSinceEpoch;\n    }\n    return timestamp;\n  }\n}\n\nfinal snowflake = Snowflake();\n"
  },
  {
    "path": "lib/common/store.dart",
    "content": "import 'dart:async';\n\nclass Store<T> {\n  late T _data;\n\n  Store(Stream stream, T defaultValue) {\n    stream.listen((data) {\n      _add(data);\n    });\n    _data = defaultValue;\n  }\n\n  bool equals(T oldValue, T newValue) {\n    return oldValue == newValue;\n  }\n\n  void _add(T value) {\n    if (!equals(_data, value)) {\n      _streamController.add(value);\n      _data = value;\n    }\n  }\n\n  final StreamController<T> _streamController = StreamController<T>.broadcast();\n\n  Stream<T> get stream => _streamController.stream;\n\n  T get value => _data;\n\n  set value(T value) {\n    _add(value);\n  }\n}\n"
  },
  {
    "path": "lib/common/string.dart",
    "content": "import 'dart:convert';\nimport 'dart:typed_data';\n\nimport 'package:crypto/crypto.dart';\nimport 'package:fl_clash/common/common.dart';\n\nextension StringExtension on String {\n  bool get isUrl {\n    return RegExp(r'^(http|https|ftp)://').hasMatch(this);\n  }\n\n  dynamic get splitByMultipleSeparators {\n    final parts = split(\n      RegExp(r'[, ;]+'),\n    ).where((part) => part.isNotEmpty).toList();\n\n    return parts.length > 1 ? parts : this;\n  }\n\n  int compareToLower(String other) {\n    return toLowerCase().compareTo(other.toLowerCase());\n  }\n\n  String safeSubstring(int start, [int? end]) {\n    if (isEmpty) return '';\n    final safeStart = start.clamp(0, length);\n    if (end == null) {\n      return substring(safeStart);\n    }\n    final safeEnd = end.clamp(safeStart, length);\n    return substring(safeStart, safeEnd);\n  }\n\n  List<int> get encodeUtf16LeWithBom {\n    final byteData = ByteData(length * 2);\n    final bom = [0xFF, 0xFE];\n    for (int i = 0; i < length; i++) {\n      int charCode = codeUnitAt(i);\n      byteData.setUint16(i * 2, charCode, Endian.little);\n    }\n    return bom + byteData.buffer.asUint8List();\n  }\n\n  Uint8List? get getBase64 {\n    final regExp = RegExp(r'base64,(.*)');\n    final match = regExp.firstMatch(this);\n    final realValue = match?.group(1) ?? '';\n    if (realValue.isEmpty) {\n      return null;\n    }\n    try {\n      return base64.decode(realValue);\n    } catch (e) {\n      return null;\n    }\n  }\n\n  bool get isSvg {\n    return endsWith('.svg');\n  }\n\n  bool get isRegex {\n    try {\n      RegExp(this);\n      return true;\n    } catch (e) {\n      commonPrint.log(e.toString());\n      return false;\n    }\n  }\n\n  String toMd5() {\n    final bytes = utf8.encode(this);\n    return md5.convert(bytes).toString();\n  }\n\n  // bool containsToLower(String target) {\n  //   return toLowerCase().contains(target);\n  // }\n\n  Future<T> commonToJSON<T>() async {\n    final thresholdLimit = 51200;\n    if (length < thresholdLimit) {\n      return json.decode(this);\n    } else {\n      return await decodeJSONTask<T>(this);\n    }\n  }\n}\n\nextension StringNullExt on String? {\n  String takeFirstValid(List<String?> others, {String defaultValue = ''}) {\n    if (this != null && this!.trim().isNotEmpty) return this!.trim();\n\n    for (final s in others) {\n      if (s != null && s.trim().isNotEmpty) {\n        return s.trim();\n      }\n    }\n    return defaultValue;\n  }\n}\n"
  },
  {
    "path": "lib/common/system.dart",
    "content": "import 'dart:ffi';\nimport 'dart:io';\n\nimport 'package:device_info_plus/device_info_plus.dart';\nimport 'package:ffi/ffi.dart';\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/plugins/app.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/input.dart';\nimport 'package:flutter/services.dart';\nimport 'package:path/path.dart';\n\nclass System {\n  static System? _instance;\n\n  System._internal();\n\n  factory System() {\n    _instance ??= System._internal();\n    return _instance!;\n  }\n\n  bool get isDesktop => isWindows || isMacOS || isLinux;\n\n  bool get isWindows => Platform.isWindows;\n\n  bool get isMacOS => Platform.isMacOS;\n\n  bool get isAndroid => Platform.isAndroid;\n\n  bool get isLinux => Platform.isLinux;\n\n  Future<int> get version async {\n    final deviceInfo = await DeviceInfoPlugin().deviceInfo;\n    return switch (Platform.operatingSystem) {\n      'macos' => (deviceInfo as MacOsDeviceInfo).majorVersion,\n      'android' => (deviceInfo as AndroidDeviceInfo).version.sdkInt,\n      'windows' => (deviceInfo as WindowsDeviceInfo).majorVersion,\n      String() => 0,\n    };\n  }\n\n  Future<bool> checkIsAdmin() async {\n    final corePath = appPath.corePath.replaceAll(' ', '\\\\\\\\ ');\n    if (system.isWindows) {\n      final result = await windows?.checkService();\n      return result == WindowsHelperServiceStatus.running;\n    } else if (system.isMacOS) {\n      final result = await Process.run('stat', ['-f', '%Su:%Sg %Sp', corePath]);\n      final output = result.stdout.trim();\n      if (output.startsWith('root:admin') && output.contains('rws')) {\n        return true;\n      }\n      return false;\n    } else if (Platform.isLinux) {\n      final result = await Process.run('stat', ['-c', '%U:%G %A', corePath]);\n      final output = result.stdout.trim();\n      if (output.startsWith('root:') && output.contains('rws')) {\n        return true;\n      }\n      return false;\n    }\n    return true;\n  }\n\n  Future<AuthorizeCode> authorizeCore() async {\n    if (system.isAndroid) {\n      return AuthorizeCode.error;\n    }\n    final corePath = appPath.corePath.replaceAll(' ', '\\\\\\\\ ');\n    final isAdmin = await checkIsAdmin();\n    if (isAdmin) {\n      return AuthorizeCode.none;\n    }\n\n    if (system.isWindows) {\n      final result = await windows?.registerService();\n      if (result == true) {\n        return AuthorizeCode.success;\n      }\n      return AuthorizeCode.error;\n    }\n\n    if (system.isMacOS) {\n      final shell = 'chown root:admin $corePath; chmod +sx $corePath';\n      final arguments = [\n        '-e',\n        'do shell script \"$shell\" with administrator privileges',\n      ];\n      final result = await Process.run('osascript', arguments);\n      if (result.exitCode != 0) {\n        return AuthorizeCode.error;\n      }\n      return AuthorizeCode.success;\n    } else if (Platform.isLinux) {\n      final shell = Platform.environment['SHELL'] ?? 'bash';\n      final password = await globalState.showCommonDialog<String>(\n        child: InputDialog(\n          obscureText: true,\n          title: appLocalizations.pleaseInputAdminPassword,\n          value: '',\n        ),\n      );\n      final arguments = [\n        '-c',\n        'echo \"$password\" | sudo -S chown root:root \"$corePath\" && echo \"$password\" | sudo -S chmod +sx \"$corePath\"',\n      ];\n      final result = await Process.run(shell, arguments);\n      if (result.exitCode != 0) {\n        return AuthorizeCode.error;\n      }\n      return AuthorizeCode.success;\n    }\n    return AuthorizeCode.error;\n  }\n\n  Future<void> back() async {\n    await app?.moveTaskToBack();\n    await window?.hide();\n  }\n\n  Future<void> exit() async {\n    if (system.isAndroid) {\n      await SystemNavigator.pop();\n    }\n    await window?.close();\n  }\n}\n\nfinal system = System();\n\nclass Windows {\n  static Windows? _instance;\n  late DynamicLibrary _shell32;\n\n  Windows._internal() {\n    _shell32 = DynamicLibrary.open('shell32.dll');\n  }\n\n  factory Windows() {\n    _instance ??= Windows._internal();\n    return _instance!;\n  }\n\n  bool runas(String command, String arguments) {\n    final commandPtr = command.toNativeUtf16();\n    final argumentsPtr = arguments.toNativeUtf16();\n    final operationPtr = 'runas'.toNativeUtf16();\n\n    final shellExecute = _shell32\n        .lookupFunction<\n          Int32 Function(\n            Pointer<Utf16> hwnd,\n            Pointer<Utf16> lpOperation,\n            Pointer<Utf16> lpFile,\n            Pointer<Utf16> lpParameters,\n            Pointer<Utf16> lpDirectory,\n            Int32 nShowCmd,\n          ),\n          int Function(\n            Pointer<Utf16> hwnd,\n            Pointer<Utf16> lpOperation,\n            Pointer<Utf16> lpFile,\n            Pointer<Utf16> lpParameters,\n            Pointer<Utf16> lpDirectory,\n            int nShowCmd,\n          )\n        >('ShellExecuteW');\n\n    final result = shellExecute(\n      nullptr,\n      operationPtr,\n      commandPtr,\n      argumentsPtr,\n      nullptr,\n      1,\n    );\n\n    calloc.free(commandPtr);\n    calloc.free(argumentsPtr);\n    calloc.free(operationPtr);\n\n    commonPrint.log(\n      'windows runas: $command $arguments resultCode:$result',\n      logLevel: LogLevel.warning,\n    );\n\n    if (result <= 32) {\n      return false;\n    }\n    return true;\n  }\n\n  // Future<void> _killProcess(int port) async {\n  //   final result = await Process.run('netstat', ['-ano']);\n  //   final lines = result.stdout.toString().trim().split('\\n');\n  //   for (final line in lines) {\n  //     if (!line.contains(':$port') || !line.contains('LISTENING')) {\n  //       continue;\n  //     }\n  //     final parts = line.trim().split(RegExp(r'\\s+'));\n  //     final pid = int.tryParse(parts.last);\n  //     if (pid != null) {\n  //      await Process.run('taskkill', ['/PID', pid.toString(), '/F']);\n  //     }\n  //   }\n  // }\n\n  Future<WindowsHelperServiceStatus> checkService() async {\n    // final qcResult = await Process.run('sc', ['qc', appHelperService]);\n    // final qcOutput = qcResult.stdout.toString();\n    // if (qcResult.exitCode != 0 || !qcOutput.contains(appPath.helperPath)) {\n    //   return WindowsHelperServiceStatus.none;\n    // }\n    final result = await Process.run('sc', ['query', appHelperService]);\n    if (result.exitCode != 0) {\n      return WindowsHelperServiceStatus.none;\n    }\n    final output = result.stdout.toString();\n    if (output.contains('RUNNING') && await request.pingHelper()) {\n      return WindowsHelperServiceStatus.running;\n    }\n    return WindowsHelperServiceStatus.presence;\n  }\n\n  Future<bool> registerService() async {\n    final status = await checkService();\n\n    if (status == WindowsHelperServiceStatus.running) {\n      return true;\n    }\n\n    final command = [\n      '/c',\n      if (status == WindowsHelperServiceStatus.presence) ...[\n        'taskkill',\n        '/F',\n        '/IM',\n        '$appHelperService.exe'\n            ' & '\n            'sc',\n        'delete',\n        appHelperService,\n        '&',\n      ],\n      'sc',\n      'create',\n      appHelperService,\n      'binPath= \"${appPath.helperPath}\"',\n      'start= auto',\n      '&&',\n      'sc',\n      'start',\n      appHelperService,\n    ].join(' ');\n\n    final res = runas('cmd.exe', command);\n\n    await Future.delayed(Duration(milliseconds: 300));\n    final retryStatus = await retry(\n      task: checkService,\n      maxAttempts: 5,\n      retryIf: (status) => status != WindowsHelperServiceStatus.running,\n      delay: Duration(seconds: 1),\n    );\n    return res && retryStatus == WindowsHelperServiceStatus.running;\n  }\n\n  Future<bool> registerTask(String appName) async {\n    final taskXml =\n        '''\n<?xml version=\"1.0\" encoding=\"UTF-16\"?>\n<Task version=\"1.3\" xmlns=\"http://schemas.microsoft.com/windows/2004/02/mit/task\">\n  <Principals>\n    <Principal id=\"Author\">\n      <LogonType>InteractiveToken</LogonType>\n      <RunLevel>HighestAvailable</RunLevel>\n    </Principal>\n  </Principals>\n  <Triggers>\n    <LogonTrigger/>\n  </Triggers>\n  <Settings>\n    <MultipleInstancesPolicy>Parallel</MultipleInstancesPolicy>\n    <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>\n    <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>\n    <AllowHardTerminate>false</AllowHardTerminate>\n    <StartWhenAvailable>false</StartWhenAvailable>\n    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>\n    <IdleSettings>\n      <StopOnIdleEnd>false</StopOnIdleEnd>\n      <RestartOnIdle>false</RestartOnIdle>\n    </IdleSettings>\n    <AllowStartOnDemand>true</AllowStartOnDemand>\n    <Enabled>true</Enabled>\n    <Hidden>false</Hidden>\n    <RunOnlyIfIdle>false</RunOnlyIfIdle>\n    <WakeToRun>false</WakeToRun>\n    <ExecutionTimeLimit>PT72H</ExecutionTimeLimit>\n    <Priority>7</Priority>\n  </Settings>\n  <Actions Context=\"Author\">\n    <Exec>\n      <Command>\"${Platform.resolvedExecutable}\"</Command>\n    </Exec>\n  </Actions>\n</Task>''';\n    final taskPath = join(await appPath.tempPath, 'task.xml');\n    await File(taskPath).create(recursive: true);\n    await File(\n      taskPath,\n    ).writeAsBytes(taskXml.encodeUtf16LeWithBom, flush: true);\n    final commandLine = [\n      '/Create',\n      '/TN',\n      appName,\n      '/XML',\n      '%s',\n      '/F',\n    ].join(' ');\n    return runas('schtasks', commandLine.replaceFirst('%s', taskPath));\n  }\n}\n\nfinal windows = system.isWindows ? Windows() : null;\n\nclass MacOS {\n  static MacOS? _instance;\n\n  List<String>? originDns;\n\n  MacOS._internal();\n\n  factory MacOS() {\n    _instance ??= MacOS._internal();\n    return _instance!;\n  }\n\n  Future<String?> get defaultServiceName async {\n    final result = await Process.run('route', ['-n', 'get', 'default']);\n    final output = result.stdout.toString();\n    final deviceLine = output\n        .split('\\n')\n        .firstWhere((s) => s.contains('interface:'), orElse: () => '');\n    final lineSplits = deviceLine.trim().split(' ');\n    if (lineSplits.length != 2) {\n      return null;\n    }\n    final device = lineSplits[1];\n    final serviceResult = await Process.run('networksetup', [\n      '-listnetworkserviceorder',\n    ]);\n    final serviceResultOutput = serviceResult.stdout.toString();\n    final currentService = serviceResultOutput\n        .split('\\n\\n')\n        .firstWhere((s) => s.contains('Device: $device'), orElse: () => '');\n    if (currentService.isEmpty) {\n      return null;\n    }\n    final currentServiceNameLine = currentService\n        .split('\\n')\n        .firstWhere(\n          (line) => RegExp(r'^\\(\\d+\\).*').hasMatch(line),\n          orElse: () => '',\n        );\n    final currentServiceNameLineSplits = currentServiceNameLine.trim().split(\n      ' ',\n    );\n    if (currentServiceNameLineSplits.length < 2) {\n      return null;\n    }\n    return currentServiceNameLineSplits[1];\n  }\n\n  Future<List<String>?> get systemDns async {\n    final deviceServiceName = await defaultServiceName;\n    if (deviceServiceName == null) {\n      return null;\n    }\n    final result = await Process.run('networksetup', [\n      '-getdnsservers',\n      deviceServiceName,\n    ]);\n    final output = result.stdout.toString().trim();\n    if (output.startsWith(\"There aren't any DNS Servers set on\")) {\n      originDns = [];\n    } else {\n      originDns = output.split('\\n');\n    }\n    return originDns;\n  }\n\n  Future<void> updateDns(bool restore) async {\n    final serviceName = await defaultServiceName;\n    if (serviceName == null) {\n      return;\n    }\n    List<String>? nextDns;\n    if (restore) {\n      nextDns = originDns;\n    } else {\n      final originDns = await systemDns;\n      if (originDns == null) {\n        return;\n      }\n      final needAddDns = '223.5.5.5';\n      if (originDns.contains(needAddDns)) {\n        return;\n      }\n      nextDns = List.from(originDns)..add(needAddDns);\n    }\n    if (nextDns == null) {\n      return;\n    }\n    await Process.run('networksetup', [\n      '-setdnsservers',\n      serviceName,\n      if (nextDns.isNotEmpty) ...nextDns,\n      if (nextDns.isEmpty) 'Empty',\n    ]);\n  }\n}\n\nfinal macOS = system.isMacOS ? MacOS() : null;\n"
  },
  {
    "path": "lib/common/task.dart",
    "content": "import 'dart:convert';\nimport 'dart:io';\n\nimport 'package:archive/archive_io.dart';\nimport 'package:drift/drift.dart';\nimport 'package:drift_flutter/drift_flutter.dart';\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/database/database.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/services.dart';\nimport 'package:path/path.dart';\n\nFuture<T> decodeJSONTask<T>(String data) async {\n  return await compute<String, T>(_decodeJSON, data);\n}\n\nFuture<T> _decodeJSON<T>(String content) async {\n  return json.decode(content);\n}\n\nFuture<String> encodeJSONTask<T>(T data) async {\n  return await compute<T, String>(_encodeJSON, data);\n}\n\nFuture<String> _encodeJSON<T>(T content) async {\n  return json.encode(content);\n}\n\nFuture<String> encodeYamlTask<T>(T data) async {\n  return await compute<T, String>(_encodeYaml, data);\n}\n\nFuture<String> _encodeYaml<T>(T content) async {\n  return yaml.encode(content);\n}\n\nFuture<List<Group>> toGroupsTask(ComputeGroupsState data) async {\n  return await compute<ComputeGroupsState, List<Group>>(_toGroupsTask, data);\n}\n\nFuture<List<Group>> _toGroupsTask(ComputeGroupsState state) async {\n  final proxiesData = state.proxiesData;\n  final all = proxiesData.all;\n  final sortType = state.sortType;\n  final delayMap = state.delayMap;\n  final selectedMap = state.selectedMap;\n  final defaultTestUrl = state.defaultTestUrl;\n  final proxies = proxiesData.proxies;\n  if (proxies.isEmpty) return [];\n  final groupsRaw = all\n      .where((name) {\n        final proxy = proxies[name] ?? {};\n        return GroupTypeExtension.valueList.contains(proxy['type']);\n      })\n      .map((groupName) {\n        final group = proxies[groupName];\n        group['all'] = ((group['all'] ?? []) as List)\n            .map((name) => proxies[name])\n            .where((proxy) => proxy != null)\n            .toList();\n        return group;\n      })\n      .toList();\n  final groups = groupsRaw.map((e) => Group.fromJson(e)).toList();\n  return computeSort(\n    groups: groups,\n    sortType: sortType,\n    delayMap: delayMap,\n    selectedMap: selectedMap,\n    defaultTestUrl: defaultTestUrl,\n  );\n}\n\nFuture<Map<String, dynamic>> makeRealProfileTask(\n  MakeRealProfileState data,\n) async {\n  return await compute<MakeRealProfileState, Map<String, dynamic>>(\n    _makeRealProfileTask,\n    data,\n  );\n}\n\nFuture<Map<String, dynamic>> _makeRealProfileTask(\n  MakeRealProfileState data,\n) async {\n  final rawConfig = Map.from(data.rawConfig);\n  final realPatchConfig = data.realPatchConfig;\n  final profilesPath = data.profilesPath;\n  final profileId = data.profileId;\n  final overrideDns = data.overrideDns;\n  final addedRules = data.addedRules;\n  final appendSystemDns = data.appendSystemDns;\n  final defaultUA = data.defaultUA;\n  String getProvidersFilePathInner(String type, String url) {\n    return join(\n      profilesPath,\n      'providers',\n      profileId.toString(),\n      type,\n      url.toMd5(),\n    );\n  }\n\n  rawConfig['external-controller'] = realPatchConfig.externalController.value;\n  rawConfig['external-ui'] = '';\n  rawConfig['interface-name'] = '';\n  rawConfig['external-ui-url'] = '';\n  rawConfig['tcp-concurrent'] = realPatchConfig.tcpConcurrent;\n  rawConfig['unified-delay'] = realPatchConfig.unifiedDelay;\n  rawConfig['ipv6'] = realPatchConfig.ipv6;\n  rawConfig['log-level'] = realPatchConfig.logLevel.name;\n  rawConfig['port'] = 0;\n  rawConfig['socks-port'] = 0;\n  rawConfig['keep-alive-interval'] = realPatchConfig.keepAliveInterval;\n  rawConfig['mixed-port'] = realPatchConfig.mixedPort;\n  rawConfig['port'] = realPatchConfig.port;\n  rawConfig['socks-port'] = realPatchConfig.socksPort;\n  rawConfig['redir-port'] = realPatchConfig.redirPort;\n  rawConfig['tproxy-port'] = realPatchConfig.tproxyPort;\n  rawConfig['find-process-mode'] = realPatchConfig.findProcessMode.name;\n  rawConfig['allow-lan'] = realPatchConfig.allowLan;\n  rawConfig['mode'] = realPatchConfig.mode.name;\n  if (rawConfig['tun'] == null) {\n    rawConfig['tun'] = {};\n  }\n  rawConfig['tun']['enable'] = realPatchConfig.tun.enable;\n  rawConfig['tun']['device'] = realPatchConfig.tun.device;\n  rawConfig['tun']['dns-hijack'] = realPatchConfig.tun.dnsHijack;\n  rawConfig['tun']['stack'] = realPatchConfig.tun.stack.name;\n  rawConfig['tun']['route-address'] = realPatchConfig.tun.routeAddress;\n  rawConfig['tun']['auto-route'] = realPatchConfig.tun.autoRoute;\n  rawConfig['geodata-loader'] = realPatchConfig.geodataLoader.name;\n  if (rawConfig['sniffer']?['sniff'] != null) {\n    for (final value in (rawConfig['sniffer']?['sniff'] as Map).values) {\n      if (value['ports'] != null && value['ports'] is List) {\n        value['ports'] =\n            value['ports']?.map((item) => item.toString()).toList() ?? [];\n      }\n    }\n  }\n  if (rawConfig['profile'] == null) {\n    rawConfig['profile'] = {};\n  }\n  if (rawConfig['proxy-providers'] != null) {\n    final proxyProviders = rawConfig['proxy-providers'] as Map;\n    for (final key in proxyProviders.keys) {\n      final proxyProvider = proxyProviders[key];\n      if (proxyProvider['type'] != 'http') {\n        continue;\n      }\n      if (proxyProvider['url'] != null) {\n        proxyProvider['path'] = getProvidersFilePathInner(\n          'proxies',\n          proxyProvider['url'],\n        );\n      }\n    }\n  }\n  if (rawConfig['rule-providers'] != null) {\n    final ruleProviders = rawConfig['rule-providers'] as Map;\n    for (final key in ruleProviders.keys) {\n      final ruleProvider = ruleProviders[key];\n      if (ruleProvider['type'] != 'http') {\n        continue;\n      }\n      if (ruleProvider['url'] != null) {\n        ruleProvider['path'] = getProvidersFilePathInner(\n          'rules',\n          ruleProvider['url'],\n        );\n      }\n    }\n  }\n  rawConfig['profile']['store-selected'] = false;\n  rawConfig['geox-url'] = realPatchConfig.geoXUrl.toJson();\n  rawConfig['global-ua'] = realPatchConfig.globalUa ?? defaultUA;\n  if (rawConfig['hosts'] == null) {\n    rawConfig['hosts'] = {};\n  }\n  for (final host in realPatchConfig.hosts.entries) {\n    rawConfig['hosts'][host.key] = host.value.splitByMultipleSeparators;\n  }\n  if (rawConfig['dns'] == null) {\n    rawConfig['dns'] = {};\n  }\n  final isEnableDns = rawConfig['dns']['enable'] == true;\n  final systemDns = 'system://';\n  if (overrideDns || !isEnableDns) {\n    final dns = switch (!isEnableDns) {\n      true => realPatchConfig.dns.copyWith(\n        nameserver: [...realPatchConfig.dns.nameserver, systemDns],\n      ),\n      false => realPatchConfig.dns,\n    };\n    rawConfig['dns'] = dns.toJson();\n    rawConfig['dns']['nameserver-policy'] = {};\n    for (final entry in dns.nameserverPolicy.entries) {\n      rawConfig['dns']['nameserver-policy'][entry.key] =\n          entry.value.splitByMultipleSeparators;\n    }\n  }\n  if (appendSystemDns) {\n    final List<String> nameserver = List<String>.from(\n      rawConfig['dns']['nameserver'] ?? [],\n    );\n    if (!nameserver.contains(systemDns)) {\n      rawConfig['dns']['nameserver'] = [...nameserver, systemDns];\n    }\n  }\n  List<String> rules = [];\n  if (rawConfig['rules'] != null) {\n    rules = List<String>.from(rawConfig['rules']);\n  }\n  rawConfig.remove('rules');\n  if (addedRules.isNotEmpty) {\n    final parsedNewRules = addedRules\n        .map((item) => ParsedRule.parseString(item.value))\n        .toList();\n    final hasMatchPlaceholder = parsedNewRules.any(\n      (item) => item.ruleTarget?.toUpperCase() == 'MATCH',\n    );\n    String? replacementTarget;\n\n    if (hasMatchPlaceholder) {\n      for (int i = rules.length - 1; i >= 0; i--) {\n        final parsed = ParsedRule.parseString(rules[i]);\n        if (parsed.ruleAction == RuleAction.MATCH) {\n          final target = parsed.ruleTarget;\n          if (target != null && target.isNotEmpty) {\n            replacementTarget = target;\n            break;\n          }\n        }\n      }\n    }\n    final List<String> finalAddedRules;\n\n    if (replacementTarget?.isNotEmpty == true) {\n      finalAddedRules = [];\n      for (int i = 0; i < parsedNewRules.length; i++) {\n        final parsed = parsedNewRules[i];\n        if (parsed.ruleTarget?.toUpperCase() == 'MATCH') {\n          finalAddedRules.add(\n            parsed.copyWith(ruleTarget: replacementTarget).value,\n          );\n        } else {\n          finalAddedRules.add(addedRules[i].value);\n        }\n      }\n    } else {\n      finalAddedRules = addedRules.map((e) => e.value).toList();\n    }\n    rules = [...finalAddedRules, ...rules];\n  }\n  rawConfig['rules'] = rules;\n  return Map<String, dynamic>.from(rawConfig);\n}\n\nFuture<List<String>> shakingProfileTask(\n  VM2<Iterable<int>, Iterable<int>> data,\n) async {\n  return await compute<\n    VM3<Iterable<int>, Iterable<int>, RootIsolateToken>,\n    List<String>\n  >(_shakingProfileTask, VM3(data.a, data.b, RootIsolateToken.instance!));\n}\n\nFuture<List<String>> _shakingProfileTask(\n  VM3<Iterable<int>, Iterable<int>, RootIsolateToken> data,\n) async {\n  final profileIds = data.a;\n  final scriptIds = data.b;\n  final token = data.c;\n  BackgroundIsolateBinaryMessenger.ensureInitialized(token);\n  final profilesDir = Directory(await appPath.profilesPath);\n  final scriptsDir = Directory(await appPath.scriptsDirPath);\n  final providersDir = Directory(await appPath.getProvidersRootPath());\n  final List<String> targets = [];\n  void scanDirectory(\n    Directory dir,\n    Iterable<int> baseNames, {\n    bool skipProvidersFolder = false,\n  }) {\n    if (!dir.existsSync()) return;\n    final entities = dir.listSync(recursive: false, followLinks: false);\n\n    for (final entity in entities) {\n      if (entity is File) {\n        final id = basenameWithoutExtension(entity.path);\n        if (!baseNames.contains(int.tryParse(id))) {\n          targets.add(entity.path);\n        }\n      } else if (skipProvidersFolder && entity is Directory) {\n        if (basename(entity.path) == 'providers') {\n          continue;\n        }\n      }\n    }\n  }\n\n  scanDirectory(profilesDir, profileIds, skipProvidersFolder: true);\n  scanDirectory(providersDir, profileIds);\n  scanDirectory(scriptsDir, scriptIds);\n  return targets;\n}\n\nFuture<String> encodeLogsTask(List<Log> data) async {\n  return await compute<List<Log>, String>(_encodeLogsTask, data);\n}\n\nFuture<String> _encodeLogsTask(List<Log> data) async {\n  final logsRaw = data.map((item) => item.toString());\n  final logsRawString = logsRaw.join('\\n');\n  return logsRawString;\n}\n\nFuture<MigrationData> oldToNowTask(Map<String, Object?> data) async {\n  final homeDir = await appPath.homeDirPath;\n  return await compute<\n    VM3<Map<String, Object?>, String, String>,\n    MigrationData\n  >(_oldToNowTask, VM3(data, homeDir, homeDir));\n}\n\nFuture<MigrationData> _oldToNowTask(\n  VM3<Map<String, Object?>, String, String> data,\n) async {\n  final configMap = data.a;\n  final sourcePath = data.b;\n  final targetPath = data.c;\n\n  final accessControlMap = configMap['accessControl'];\n  final isAccessControl = configMap['isAccessControl'];\n  if (accessControlMap != null) {\n    (accessControlMap as Map)['enable'] = isAccessControl;\n    if (configMap['vpnProps'] != null) {\n      final vpnPropsRaw = configMap['vpnProps'] as Map;\n      vpnPropsRaw['accessControl'] = accessControlMap;\n    }\n  }\n  if (configMap['vpnProps'] != null) {\n    final vpnPropsRaw = configMap['vpnProps'] as Map;\n    vpnPropsRaw['accessControlProps'] = vpnPropsRaw['accessControl'];\n  }\n  configMap['davProps'] = configMap['dav'];\n  final appSettingProps = configMap['appSetting'] as Map? ?? {};\n  appSettingProps['restoreStrategy'] = appSettingProps['recoveryStrategy'];\n  configMap['appSettingProps'] = appSettingProps;\n  configMap['proxiesStyleProps'] = configMap['proxiesStyle'];\n  configMap['proxiesStyleProps'] = configMap['proxiesStyle'];\n  // final overwriteMap = configMap['overwrite'] as Map? ?? {};\n  // configMap['overwriteType'] = overwriteMap['type'];\n  // configMap['scriptId'] = overwriteMap['scriptOverwrite'];\n  List rawScripts = configMap['scripts'] as List<dynamic>? ?? [];\n  if (rawScripts.isEmpty) {\n    final scriptPropsJson = configMap['scriptProps'] as Map<String, dynamic>?;\n    if (scriptPropsJson != null) {\n      rawScripts = scriptPropsJson['scripts'] as List<dynamic>? ?? [];\n    }\n  }\n  final Map<String, int> idMap = {};\n  final List<Script> scripts = [];\n  for (final rawScript in rawScripts) {\n    final id = rawScript['id'] as String?;\n    final content = rawScript['content'] as String?;\n    final label = rawScript['label'] as String?;\n    if (id == null || content == null || label == null) {\n      continue;\n    }\n    final newId = idMap.updateCacheValue(rawScript['id'], () => snowflake.id);\n    final path = _getScriptPath(targetPath, newId.toString());\n    final file = File(path);\n    await file.safeWriteAsString(content);\n    scripts.add(\n      Script(id: newId, label: label, lastUpdateTime: DateTime.now()),\n    );\n  }\n  List rawRules = configMap['rules'] as List<dynamic>? ?? [];\n  final List<Rule> rules = [];\n  final List<ProfileRuleLink> links = [];\n  for (final rawRule in rawRules) {\n    final id = idMap.updateCacheValue(rawRule['id'], () => snowflake.id);\n    rawRule['id'] = id;\n    rules.add(Rule.fromJson(rawRule));\n    links.add(ProfileRuleLink(ruleId: id));\n  }\n  List rawProfiles = configMap['profiles'] as List<dynamic>? ?? [];\n  final List<Profile> profiles = [];\n  for (final rawProfile in rawProfiles) {\n    final rawId = rawProfile['id'] as String?;\n    if (rawId == null) {\n      continue;\n    }\n    final profileId = idMap.updateCacheValue(rawId, () => snowflake.id);\n    rawProfile['id'] = profileId;\n    final overwrite = rawProfile['overwrite'] as Map?;\n    if (overwrite != null) {\n      final standardOverwrite = overwrite['standardOverwrite'] as Map?;\n      if (standardOverwrite != null) {\n        final addedRules = standardOverwrite['addedRules'] as List? ?? [];\n        for (final addRule in addedRules) {\n          final id = idMap.updateCacheValue(addRule['id'], () => snowflake.id);\n          addRule['id'] = id;\n          rules.add(Rule.fromJson(addRule));\n          links.add(\n            ProfileRuleLink(\n              profileId: profileId,\n              ruleId: id,\n              scene: RuleScene.added,\n            ),\n          );\n        }\n        final disabledRuleIds = standardOverwrite['disabledRuleIds'] as List?;\n        if (disabledRuleIds != null) {\n          for (final disabledRuleId in disabledRuleIds) {\n            final newDisabledRuleId = idMap[disabledRuleId];\n            if (newDisabledRuleId != null) {\n              links.add(\n                ProfileRuleLink(\n                  profileId: profileId,\n                  ruleId: newDisabledRuleId,\n                  scene: RuleScene.disabled,\n                ),\n              );\n            }\n          }\n        }\n      }\n      final scriptOverwrite = overwrite['scriptOverwrite'] as Map?;\n      if (scriptOverwrite != null) {\n        final scriptId = scriptOverwrite['scriptId'] as String?;\n        rawProfile['scriptId'] = scriptId != null ? idMap[scriptId] : null;\n      }\n      rawProfile['overwriteType'] = overwrite['type'];\n    }\n\n    final sourceFile = File(_getProfilePath(sourcePath, rawId));\n    final targetFilePath = _getProfilePath(targetPath, profileId.toString());\n    await sourceFile.safeCopy(targetFilePath);\n    profiles.add(Profile.fromJson(rawProfile));\n  }\n  final currentProfileId = configMap['currentProfileId'];\n  configMap['currentProfileId'] = currentProfileId != null\n      ? idMap[currentProfileId]\n      : null;\n  return MigrationData(\n    configMap: configMap,\n    profiles: profiles,\n    rules: rules,\n    scripts: scripts,\n    links: links,\n  );\n}\n\nFuture<String> backupTask(\n  Map<String, dynamic> configMap,\n  Iterable<String> fileNames,\n) async {\n  return await compute<\n    VM3<Map<String, dynamic>, Iterable<String>, RootIsolateToken>,\n    String\n  >(_backupTask, VM3(configMap, fileNames, RootIsolateToken.instance!));\n}\n\nFuture<String> _backupTask<T>(\n  VM3<Map<String, dynamic>, Iterable<String>, RootIsolateToken> args,\n) async {\n  final configMap = args.a;\n  final fileNames = args.b;\n  final token = args.c;\n  BackgroundIsolateBinaryMessenger.ensureInitialized(token);\n  final dbPath = await appPath.databasePath;\n  final configStr = json.encode(configMap);\n  final profilesDir = Directory(await appPath.profilesPath);\n  final scriptsDir = Directory(await appPath.scriptsDirPath);\n  final tempZipFilePath = await appPath.tempFilePath;\n  final tempDBFile = File(await appPath.tempFilePath);\n  final tempConfigFile = File(await appPath.tempFilePath);\n  final dbFile = File(dbPath);\n  if (await dbFile.exists()) {\n    await dbFile.copy(tempDBFile.path);\n  }\n  final encoder = ZipFileEncoder();\n  encoder.create(tempZipFilePath);\n  await tempConfigFile.writeAsString(configStr);\n  await encoder.addFile(tempDBFile, backupDatabaseName);\n  await encoder.addFile(tempConfigFile, configJsonName);\n  if (await profilesDir.exists()) {\n    await encoder.addDirectory(\n      profilesDir,\n      filter: (file, _) {\n        if (!fileNames.contains(basename(file.path))) {\n          return ZipFileOperation.skip;\n        }\n        return ZipFileOperation.include;\n      },\n    );\n  }\n  if (await scriptsDir.exists()) {\n    await encoder.addDirectory(\n      scriptsDir,\n      filter: (file, _) {\n        if (!fileNames.contains(basename(file.path))) {\n          return ZipFileOperation.skip;\n        }\n        return ZipFileOperation.include;\n      },\n    );\n  }\n  encoder.close();\n  await tempConfigFile.safeDelete();\n  await tempDBFile.safeDelete();\n  return tempZipFilePath;\n}\n\nFuture<MigrationData> restoreTask() async {\n  return await compute<RootIsolateToken, MigrationData>(\n    _restoreTask,\n    RootIsolateToken.instance!,\n  );\n}\n\nFuture<MigrationData> _restoreTask(RootIsolateToken token) async {\n  BackgroundIsolateBinaryMessenger.ensureInitialized(token);\n  final backupFilePath = await appPath.backupFilePath;\n  final restoreDirPath = await appPath.restoreDirPath;\n  final homeDirPath = await appPath.homeDirPath;\n  final zipDecoder = ZipDecoder();\n  final input = InputFileStream(backupFilePath);\n  final archive = zipDecoder.decodeStream(input);\n  final dir = Directory(restoreDirPath);\n  await dir.create(recursive: true);\n  for (final file in archive.files) {\n    final outPath = join(restoreDirPath, posix.normalize(file.name));\n    final outputStream = OutputFileStream(outPath);\n    file.writeContent(outputStream);\n    await outputStream.close();\n  }\n  await input.close();\n  final restoreConfigFile = File(join(restoreDirPath, configJsonName));\n  if (!await restoreConfigFile.exists()) {\n    throw appLocalizations.invalidBackupFile;\n  }\n  final restoreConfigMap =\n      json.decode(await restoreConfigFile.readAsString())\n          as Map<String, Object?>?;\n  final version = restoreConfigMap?['version'] ?? 0;\n  MigrationData migrationData = MigrationData(configMap: restoreConfigMap);\n  if (version == 0 && restoreConfigMap != null) {\n    migrationData = await _oldToNowTask(\n      VM3(restoreConfigMap, restoreDirPath, homeDirPath),\n    );\n    return migrationData;\n  }\n  final backupDatabaseFile = File(join(restoreDirPath, backupDatabaseName));\n  if (!await backupDatabaseFile.exists()) {\n    return migrationData;\n  }\n  final database = Database(\n    driftDatabase(\n      name: 'database',\n      native: DriftNativeOptions(\n        databaseDirectory: () async => Directory(restoreDirPath),\n      ),\n    ),\n  );\n  final results = await Future.wait([\n    database.profilesDao.all().get(),\n    database.scriptsDao.all().get(),\n    database.rules.all().map((item) => item.toRule()).get(),\n    database.profileRuleLinks.all().map((item) => item.toLink()).get(),\n  ]);\n  final profiles = results[0].cast<Profile>();\n  final scripts = results[1].cast<Script>();\n  final profilesMigration = profiles.map(\n    (item) => VM2(\n      _getProfilePath(restoreDirPath, item.id.toString()),\n      _getProfilePath(homeDirPath, item.id.toString()),\n    ),\n  );\n  final scriptsMigration = scripts.map(\n    (item) => VM2(\n      _getScriptPath(restoreDirPath, item.id.toString()),\n      _getScriptPath(homeDirPath, item.id.toString()),\n    ),\n  );\n  await _copyWithMapList([...profilesMigration, ...scriptsMigration]);\n  migrationData = migrationData.copyWith(\n    profiles: profiles,\n    scripts: scripts,\n    rules: results[2].cast<Rule>(),\n    links: results[3].cast<ProfileRuleLink>(),\n  );\n  await database.close();\n  return migrationData;\n}\n\nFuture<void> _copyWithMapList(List<VM2<String, String>> copyMapList) async {\n  await Future.wait(\n    copyMapList.map((item) => File(item.a).safeCopy(item.b)).toList(),\n  );\n}\n\nString _getScriptPath(String root, String fileName) {\n  return join(root, 'scripts', '$fileName.js');\n}\n\nString _getProfilePath(String root, String fileName) {\n  return join(root, 'profiles', '$fileName.yaml');\n}\n"
  },
  {
    "path": "lib/common/text.dart",
    "content": "import 'package:fl_clash/enum/enum.dart';\nimport 'package:flutter/material.dart';\nimport 'color.dart';\n\nextension TextStyleExtension on TextStyle {\n  TextStyle get toLight => copyWith(color: color?.opacity80);\n\n  TextStyle get toLighter => copyWith(color: color?.opacity60);\n\n  TextStyle get toSoftBold => copyWith(fontWeight: FontWeight.w500);\n\n  TextStyle get toBold => copyWith(fontWeight: FontWeight.bold);\n\n  TextStyle get toJetBrainsMono => copyWith(\n        fontFamily: FontFamily.jetBrainsMono.value,\n      );\n\n  TextStyle adjustSize(int size) => copyWith(\n        fontSize: fontSize! + size,\n      );\n}\n"
  },
  {
    "path": "lib/common/theme.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:flutter/material.dart';\n\nclass CommonTheme {\n  final BuildContext context;\n  final Map<String, Color> _colorMap;\n  final double textScaleFactor;\n\n  CommonTheme.of(\n    this.context,\n    this.textScaleFactor,\n  ) : _colorMap = {};\n\n  Color get darkenSecondaryContainer {\n    return _colorMap.updateCacheValue(\n      'darkenSecondaryContainer',\n      () => context.colorScheme.secondaryContainer\n          .blendDarken(context, factor: 0.1),\n    );\n  }\n\n  Color get darkenSecondaryContainerLighter {\n    return _colorMap.updateCacheValue(\n      'darkenSecondaryContainerLighter',\n      () => context.colorScheme.secondaryContainer\n          .blendDarken(context, factor: 0.1)\n          .opacity60,\n    );\n  }\n\n  Color get darken2SecondaryContainer {\n    return _colorMap.updateCacheValue(\n      'darken2SecondaryContainer',\n      () => context.colorScheme.secondaryContainer\n          .blendDarken(context, factor: 0.2),\n    );\n  }\n\n  Color get darken3PrimaryContainer {\n    return _colorMap.updateCacheValue(\n      'darken3PrimaryContainer',\n      () => context.colorScheme.primaryContainer\n          .blendDarken(context, factor: 0.3),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/common/tray.dart",
    "content": "import 'dart:io';\n\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:flutter/services.dart';\nimport 'package:intl/intl.dart';\nimport 'package:tray_manager/tray_manager.dart';\n\nimport 'app_localizations.dart';\nimport 'constant.dart';\nimport 'system.dart';\nimport 'window.dart';\n\nclass Tray {\n  static Tray? _instance;\n\n  Tray._internal();\n\n  factory Tray() {\n    _instance ??= Tray._internal();\n    return _instance!;\n  }\n\n  String get trayIconSuffix {\n    return system.isWindows ? 'ico' : 'png';\n  }\n\n  Future<void> destroy() async {\n    await trayManager.destroy();\n  }\n\n  String getTryIcon({required bool isStart, required bool tunEnable}) {\n    if (system.isMacOS || !isStart) {\n      return 'assets/images/icon/status_1.$trayIconSuffix';\n    }\n    if (!tunEnable) {\n      return 'assets/images/icon/status_2.$trayIconSuffix';\n    }\n    return 'assets/images/icon/status_3.$trayIconSuffix';\n  }\n\n  Future _updateSystemTray({\n    required bool isStart,\n    required bool tunEnable,\n  }) async {\n    if (Platform.isLinux) {\n      await trayManager.destroy();\n    }\n    await trayManager.setIcon(\n      getTryIcon(isStart: isStart, tunEnable: tunEnable),\n      isTemplate: true,\n    );\n    if (!Platform.isLinux) {\n      await trayManager.setToolTip(appName);\n    }\n  }\n\n  Future<void> update({\n    required TrayState trayState,\n    required Traffic traffic,\n  }) async {\n    if (system.isAndroid) {\n      return;\n    }\n    if (!system.isLinux) {\n      await _updateSystemTray(\n        isStart: trayState.isStart,\n        tunEnable: trayState.tunEnable,\n      );\n    }\n    List<MenuItem> menuItems = [];\n    final showMenuItem = MenuItem(\n      label: appLocalizations.show,\n      onClick: (_) {\n        window?.show();\n      },\n    );\n    menuItems.add(showMenuItem);\n    final startMenuItem = MenuItem.checkbox(\n      label: trayState.isStart ? appLocalizations.stop : appLocalizations.start,\n      onClick: (_) async {\n        appController.updateStart();\n      },\n      checked: false,\n    );\n    menuItems.add(startMenuItem);\n    if (system.isMacOS) {\n      final speedStatistics = MenuItem.checkbox(\n        label: appLocalizations.speedStatistics,\n        onClick: (_) async {\n          appController.updateSpeedStatistics();\n        },\n        checked: trayState.showTrayTitle,\n      );\n      menuItems.add(speedStatistics);\n    }\n    menuItems.add(MenuItem.separator());\n    for (final mode in Mode.values) {\n      menuItems.add(\n        MenuItem.checkbox(\n          label: Intl.message(mode.name),\n          onClick: (_) {\n            appController.changeMode(mode);\n          },\n          checked: mode == trayState.mode,\n        ),\n      );\n    }\n    menuItems.add(MenuItem.separator());\n    if (system.isMacOS) {\n      for (final group in trayState.groups) {\n        List<MenuItem> subMenuItems = [];\n        for (final proxy in group.all) {\n          subMenuItems.add(\n            MenuItem.checkbox(\n              label: proxy.name,\n              checked:\n                  appController.getSelectedProxyName(group.name) == proxy.name,\n              onClick: (_) {\n                appController.updateCurrentSelectedMap(group.name, proxy.name);\n                appController.changeProxy(\n                  groupName: group.name,\n                  proxyName: proxy.name,\n                );\n              },\n            ),\n          );\n        }\n        menuItems.add(\n          MenuItem.submenu(\n            label: group.name,\n            submenu: Menu(items: subMenuItems),\n          ),\n        );\n      }\n      if (trayState.groups.isNotEmpty) {\n        menuItems.add(MenuItem.separator());\n      }\n    }\n    if (trayState.isStart) {\n      menuItems.add(\n        MenuItem.checkbox(\n          label: appLocalizations.tun,\n          onClick: (_) {\n            appController.updateTun();\n          },\n          checked: trayState.tunEnable,\n        ),\n      );\n      menuItems.add(\n        MenuItem.checkbox(\n          label: appLocalizations.systemProxy,\n          onClick: (_) {\n            appController.updateSystemProxy();\n          },\n          checked: trayState.systemProxy,\n        ),\n      );\n      menuItems.add(MenuItem.separator());\n    }\n    final autoStartMenuItem = MenuItem.checkbox(\n      label: appLocalizations.autoLaunch,\n      onClick: (_) async {\n        appController.updateAutoLaunch();\n      },\n      checked: trayState.autoLaunch,\n    );\n    final copyEnvVarMenuItem = MenuItem(\n      label: appLocalizations.copyEnvVar,\n      onClick: (_) async {\n        await _copyEnv(trayState.port);\n      },\n    );\n    menuItems.add(autoStartMenuItem);\n    menuItems.add(copyEnvVarMenuItem);\n    menuItems.add(MenuItem.separator());\n    final exitMenuItem = MenuItem(\n      label: appLocalizations.exit,\n      onClick: (_) async {\n        await appController.handleExit();\n      },\n    );\n    menuItems.add(exitMenuItem);\n    final menu = Menu(items: menuItems);\n    await trayManager.setContextMenu(menu);\n    if (system.isLinux) {\n      await _updateSystemTray(\n        isStart: trayState.isStart,\n        tunEnable: trayState.tunEnable,\n      );\n    }\n    updateTrayTitle(showTrayTitle: trayState.showTrayTitle, traffic: traffic);\n  }\n\n  Future<void> updateTrayTitle({\n    required bool showTrayTitle,\n    required Traffic traffic,\n  }) async {\n    if (!system.isMacOS) {\n      return;\n    }\n    if (!showTrayTitle) {\n      await trayManager.setTitle('');\n    } else {\n      await trayManager.setTitle(traffic.trayTitle);\n    }\n  }\n\n  Future<void> _copyEnv(int port) async {\n    final url = 'http://127.0.0.1:$port';\n\n    final cmdline = system.isWindows\n        ? 'set \\$env:all_proxy=$url'\n        : 'export all_proxy=$url';\n\n    await Clipboard.setData(ClipboardData(text: cmdline));\n  }\n}\n\nfinal tray = system.isDesktop ? Tray() : null;\n"
  },
  {
    "path": "lib/common/utils.dart",
    "content": "import 'dart:async';\nimport 'dart:io';\nimport 'dart:math';\nimport 'dart:ui';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/services.dart';\n\nclass Utils {\n  static Utils? _instance;\n\n  Utils._internal();\n\n  factory Utils() {\n    _instance ??= Utils._internal();\n    return _instance!;\n  }\n\n  Color? getDelayColor(int? delay) {\n    if (delay == null) return null;\n    if (delay < 0) return Colors.red;\n    if (delay < 600) return Colors.green;\n    return const Color(0xFFC57F0A);\n  }\n\n  String get id {\n    final timestamp = DateTime.now().microsecondsSinceEpoch;\n    final random = Random();\n    final randomStr = String.fromCharCodes(\n      List.generate(8, (_) => random.nextInt(26) + 97),\n    );\n    return '$timestamp$randomStr';\n  }\n\n  String getDateStringLast2(int value) {\n    var valueRaw = '0$value';\n    return valueRaw.substring(valueRaw.length - 2);\n  }\n\n  String generateRandomString({int minLength = 10, int maxLength = 100}) {\n    const latinChars =\n        'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\n    final random = Random();\n\n    int length = minLength + random.nextInt(maxLength - minLength + 1);\n\n    String result = '';\n    for (int i = 0; i < length; i++) {\n      if (random.nextBool()) {\n        result += String.fromCharCode(\n          0x4E00 + random.nextInt(0x9FA5 - 0x4E00 + 1),\n        );\n      } else {\n        result += latinChars[random.nextInt(latinChars.length)];\n      }\n    }\n\n    return result;\n  }\n\n  String get uuidV4 {\n    final Random random = Random();\n    final bytes = List.generate(16, (_) => random.nextInt(256));\n\n    bytes[6] = (bytes[6] & 0x0F) | 0x40;\n    bytes[8] = (bytes[8] & 0x3F) | 0x80;\n\n    final hex = bytes\n        .map((byte) => byte.toRadixString(16).padLeft(2, '0'))\n        .join();\n\n    return '${hex.substring(0, 8)}-${hex.substring(8, 12)}-${hex.substring(12, 16)}-${hex.substring(16, 20)}-${hex.substring(20, 32)}';\n  }\n\n  String getTimeDifference(DateTime dateTime) {\n    var currentDateTime = DateTime.now();\n    var difference = currentDateTime.difference(dateTime);\n    var inHours = difference.inHours;\n    var inMinutes = difference.inMinutes;\n    var inSeconds = difference.inSeconds;\n\n    return '${getDateStringLast2(inHours)}:${getDateStringLast2(inMinutes)}:${getDateStringLast2(inSeconds)}';\n  }\n\n  String getTimeText(int? timeStamp) {\n    if (timeStamp == null) {\n      return '00:00:00';\n    }\n    final diff = timeStamp / 1000;\n    final inHours = (diff / 3600).floor();\n    if (inHours > 99) {\n      return '99:59:59';\n    }\n    final inMinutes = (diff / 60 % 60).floor();\n    final inSeconds = (diff % 60).floor();\n\n    return '${getDateStringLast2(inHours)}:${getDateStringLast2(inMinutes)}:${getDateStringLast2(inSeconds)}';\n  }\n\n  Locale? getLocaleForString(String? localString) {\n    if (localString == null) return null;\n    var localSplit = localString.split('_');\n    if (localSplit.length == 1) {\n      return Locale(localSplit[0]);\n    }\n    if (localSplit.length == 2) {\n      return Locale(localSplit[0], localSplit[1]);\n    }\n    if (localSplit.length == 3) {\n      return Locale.fromSubtags(\n        languageCode: localSplit[0],\n        scriptCode: localSplit[1],\n        countryCode: localSplit[2],\n      );\n    }\n    return null;\n  }\n\n  int sortByChar(String a, String b) {\n    if (a.isEmpty && b.isEmpty) {\n      return 0;\n    }\n    if (a.isEmpty) {\n      return -1;\n    }\n    if (b.isEmpty) {\n      return 1;\n    }\n    final charA = a[0];\n    final charB = b[0];\n\n    if (charA == charB) {\n      return sortByChar(a.substring(1), b.substring(1));\n    } else {\n      return charA.compareToLower(charB);\n    }\n  }\n\n  String getOverwriteLabel(String label) {\n    final reg = RegExp(r'\\((\\d+)\\)$');\n    final matches = reg.allMatches(label);\n    if (matches.isNotEmpty) {\n      final match = matches.last;\n      final number = int.parse(match[1] ?? '0') + 1;\n      return label.replaceFirst(reg, '($number)', label.length - 3 - 1);\n    } else {\n      return '$label(1)';\n    }\n  }\n\n  String get traySuffix {\n    final suffix = system.isWindows ? 'ico' : 'png';\n    return 'assets/images/icon/status_2.$suffix';\n  }\n\n  int compareVersions(String version1, String version2) {\n    List<String> v1 = version1.split('+')[0].split('.');\n    List<String> v2 = version2.split('+')[0].split('.');\n    int major1 = int.parse(v1[0]);\n    int major2 = int.parse(v2[0]);\n    if (major1 != major2) {\n      return major1.compareTo(major2);\n    }\n    int minor1 = v1.length > 1 ? int.parse(v1[1]) : 0;\n    int minor2 = v2.length > 1 ? int.parse(v2[1]) : 0;\n    if (minor1 != minor2) {\n      return minor1.compareTo(minor2);\n    }\n    int patch1 = v1.length > 2 ? int.parse(v1[2]) : 0;\n    int patch2 = v2.length > 2 ? int.parse(v2[2]) : 0;\n    if (patch1 != patch2) {\n      return patch1.compareTo(patch2);\n    }\n    int build1 = version1.contains('+') ? int.parse(version1.split('+')[1]) : 0;\n    int build2 = version2.contains('+') ? int.parse(version2.split('+')[1]) : 0;\n    return build1.compareTo(build2);\n  }\n\n  // String getPinyin(String value) {\n  //   return value.isNotEmpty\n  //       ? PinyinHelper.getFirstWordPinyin(value.substring(0, 1))\n  //       : '';\n  // }\n\n  String? getFileNameForDisposition(String? disposition) {\n    if (disposition == null) return null;\n    final parseValue = HeaderValue.parse(disposition);\n    final parameters = parseValue.parameters;\n    final fileNamePointKey = parameters.keys.firstWhere(\n      (key) => key == 'filename*',\n      orElse: () => '',\n    );\n    if (fileNamePointKey.isNotEmpty) {\n      final res = parameters[fileNamePointKey]?.split(\"''\") ?? [];\n      if (res.length >= 2) {\n        return Uri.decodeComponent(res[1]);\n      }\n    }\n    final fileNameKey = parameters.keys.firstWhere(\n      (key) => key == 'filename',\n      orElse: () => '',\n    );\n    if (fileNameKey.isEmpty) return null;\n    return parameters[fileNameKey];\n  }\n\n  FlutterView getScreen() {\n    return WidgetsBinding.instance.platformDispatcher.views.first;\n  }\n\n  List<String> parseReleaseBody(String? body) {\n    if (body == null) return [];\n    const pattern = r'- \\s*(.*)';\n    final regex = RegExp(pattern);\n    return regex\n        .allMatches(body)\n        .map((match) => match.group(1) ?? '')\n        .where((item) => item.isNotEmpty)\n        .toList();\n  }\n\n  ViewMode getViewMode(double viewWidth) {\n    if (viewWidth <= maxMobileWidth) return ViewMode.mobile;\n    if (viewWidth <= maxLaptopWidth) return ViewMode.laptop;\n    return ViewMode.desktop;\n  }\n\n  int getProxiesColumns(double viewWidth, ProxiesLayout proxiesLayout) {\n    final columns = max((viewWidth / 250).ceil(), 2);\n    return switch (proxiesLayout) {\n      ProxiesLayout.tight => columns + 1,\n      ProxiesLayout.standard => columns,\n      ProxiesLayout.loose => columns - 1,\n    };\n  }\n\n  int getProfilesColumns(double viewWidth) {\n    return max((viewWidth / 280).floor(), 1);\n  }\n\n  final _indexPrimary = [50, 100, 200, 300, 400, 500, 600, 700, 800, 850, 900];\n\n  MaterialColor _createPrimarySwatch(Color color) {\n    final Map<int, Color> swatch = <int, Color>{};\n    final int a = color.alpha8bit;\n    final int r = color.red8bit;\n    final int g = color.green8bit;\n    final int b = color.blue8bit;\n    for (final int strength in _indexPrimary) {\n      final double ds = 0.5 - strength / 1000;\n      swatch[strength] = Color.fromARGB(\n        a,\n        r + ((ds < 0 ? r : (255 - r)) * ds).round(),\n        g + ((ds < 0 ? g : (255 - g)) * ds).round(),\n        b + ((ds < 0 ? b : (255 - b)) * ds).round(),\n      );\n    }\n    swatch[50] = swatch[50]!.lighten(18);\n    swatch[100] = swatch[100]!.lighten(16);\n    swatch[200] = swatch[200]!.lighten(14);\n    swatch[300] = swatch[300]!.lighten(10);\n    swatch[400] = swatch[400]!.lighten(6);\n    swatch[700] = swatch[700]!.darken(2);\n    swatch[800] = swatch[800]!.darken(3);\n    swatch[900] = swatch[900]!.darken(4);\n    return MaterialColor(color.value32bit, swatch);\n  }\n\n  List<Color> getMaterialColorShades(Color color) {\n    final swatch = _createPrimarySwatch(color);\n    return <Color>[\n      if (swatch[50] != null) swatch[50]!,\n      if (swatch[100] != null) swatch[100]!,\n      if (swatch[200] != null) swatch[200]!,\n      if (swatch[300] != null) swatch[300]!,\n      if (swatch[400] != null) swatch[400]!,\n      if (swatch[500] != null) swatch[500]!,\n      if (swatch[600] != null) swatch[600]!,\n      if (swatch[700] != null) swatch[700]!,\n      if (swatch[800] != null) swatch[800]!,\n      if (swatch[850] != null) swatch[850]!,\n      if (swatch[900] != null) swatch[900]!,\n    ];\n  }\n\n  String getBackupFileName() {\n    return '${appName}_backup_${DateTime.now().show}.zip';\n  }\n\n  String get logFile {\n    return '${appName}_${DateTime.now().show}.log';\n  }\n\n  Future<String?> getLocalIpAddress() async {\n    List<NetworkInterface> interfaces =\n        await NetworkInterface.list(includeLoopback: false)\n          ..sort((a, b) {\n            if (a.isWifi && !b.isWifi) return -1;\n            if (!a.isWifi && b.isWifi) return 1;\n            if (a.includesIPv4 && !b.includesIPv4) return -1;\n            if (!a.includesIPv4 && b.includesIPv4) return 1;\n            return 0;\n          });\n    for (final interface in interfaces) {\n      final addresses = interface.addresses;\n      if (addresses.isEmpty) {\n        continue;\n      }\n      addresses.sort((a, b) {\n        if (a.isIPv4 && !b.isIPv4) return -1;\n        if (!a.isIPv4 && b.isIPv4) return 1;\n        return 0;\n      });\n      return addresses.first.address;\n    }\n    return '';\n  }\n\n  SingleActivator controlSingleActivator(LogicalKeyboardKey trigger) {\n    final control = system.isMacOS ? false : true;\n    return SingleActivator(trigger, control: control, meta: !control);\n  }\n\n  FutureOr<T> handleWatch<T>({\n    required Function function,\n    required void Function(T data, int elapsedMilliseconds) onWatch,\n  }) async {\n    if (kDebugMode && watchExecution) {\n      final stopwatch = Stopwatch()..start();\n      final res = await function();\n      stopwatch.stop();\n      onWatch(res, stopwatch.elapsedMilliseconds);\n      return res;\n    }\n    return await function();\n  }\n\n  int fastHash(String string) {\n    var hash = 0xcbf29ce484222325;\n\n    var i = 0;\n    while (i < string.length) {\n      final codeUnit = string.codeUnitAt(i++);\n      hash ^= codeUnit >> 8;\n      hash *= 0x100000001b3;\n      hash ^= codeUnit & 0xFF;\n      hash *= 0x100000001b3;\n    }\n\n    return hash;\n  }\n}\n\nfinal utils = Utils();\n"
  },
  {
    "path": "lib/common/window.dart",
    "content": "import 'dart:io';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/models/config.dart';\nimport 'package:flutter/material.dart';\nimport 'package:screen_retriever/screen_retriever.dart';\nimport 'package:window_manager/window_manager.dart';\n\nclass Window {\n  static Window? _instance;\n\n  Window._internal();\n\n  factory Window() {\n    _instance ??= Window._internal();\n    return _instance!;\n  }\n\n  Future<void> init(int version, WindowProps props) async {\n    final acquire = await singleInstanceLock.acquire();\n    if (!acquire) {\n      exit(0);\n    }\n    if (system.isWindows) {\n      protocol.register('clash');\n      protocol.register('clashmeta');\n      protocol.register('flclash');\n    }\n    await windowManager.ensureInitialized();\n    // kDebugMode ? Size(680, 580) :\n    WindowOptions windowOptions = WindowOptions(\n      size: props.size,\n      minimumSize: const Size(380, 400),\n    );\n    if (!system.isMacOS || version > 10) {\n      await windowManager.setTitleBarStyle(TitleBarStyle.hidden);\n    }\n    await windowManager.setMaximizable(false);\n    await _windowPosition(props);\n    await windowManager.waitUntilReadyToShow(windowOptions, () async {\n      await windowManager.setPreventClose(true);\n    });\n  }\n\n  Future<void> _windowPosition(WindowProps props) async {\n    if (!system.isMacOS) {\n      final left = props.left ?? 0;\n      final top = props.top ?? 0;\n      final right = left + props.width;\n      final bottom = top + props.height;\n      if (left == 0 && top == 0) {\n        await windowManager.setAlignment(Alignment.center);\n      } else {\n        final displays = await screenRetriever.getAllDisplays();\n        final isPositionValid = displays.any((display) {\n          final displayBounds = Rect.fromLTWH(\n            display.visiblePosition!.dx,\n            display.visiblePosition!.dy,\n            display.size.width,\n            display.size.height,\n          );\n          return displayBounds.contains(Offset(left, top)) ||\n              displayBounds.contains(Offset(right, bottom));\n        });\n        if (isPositionValid) {\n          await windowManager.setPosition(Offset(left, top));\n        }\n      }\n    }\n  }\n\n  Future<void> show() async {\n    render?.resume();\n    await windowManager.show();\n    await windowManager.focus();\n    await windowManager.setSkipTaskbar(false);\n  }\n\n  Future<bool> get isVisible async {\n    final value = await windowManager.isVisible();\n    commonPrint.log('window visible check: $value');\n    return value;\n  }\n\n  Future<void> close() async {\n    await windowManager.close();\n    exit(0);\n  }\n\n  Future<void> hide() async {\n    render?.pause();\n    await windowManager.hide();\n    await windowManager.setSkipTaskbar(true);\n  }\n}\n\nfinal window = system.isDesktop ? Window() : null;\n"
  },
  {
    "path": "lib/common/yaml.dart",
    "content": "import 'package:yaml_writer/yaml_writer.dart';\n\nclass Yaml {\n  static Yaml? _instance;\n\n  Yaml._internal();\n\n  factory Yaml() {\n    _instance ??= Yaml._internal();\n    return _instance!;\n  }\n\n  String encode(Object? value) {\n    return YamlWriter().convert(value);\n  }\n}\n\nfinal yaml = Yaml();\n"
  },
  {
    "path": "lib/controller.dart",
    "content": "import 'dart:async';\nimport 'dart:io';\n\nimport 'package:fl_clash/core/core.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/plugins/app.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/dialog.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:url_launcher/url_launcher.dart';\n\nimport 'common/common.dart';\nimport 'database/database.dart';\nimport 'models/models.dart';\nimport 'providers/database.dart';\n\nclass AppController {\n  late final BuildContext _context;\n  late final WidgetRef _ref;\n  bool isAttach = false;\n\n  static AppController? _instance;\n\n  AppController._internal();\n\n  factory AppController() {\n    _instance ??= AppController._internal();\n    return _instance!;\n  }\n\n  Future<void> attach(BuildContext context, WidgetRef ref) async {\n    _context = context;\n    _ref = ref;\n    await _init();\n    isAttach = true;\n  }\n}\n\nextension InitControllerExt on AppController {\n  Future<void> _init() async {\n    FlutterError.onError = (details) {\n      commonPrint.log(\n        'exception: ${details.exception} stack: ${details.stack}',\n        logLevel: LogLevel.warning,\n      );\n    };\n    updateTray();\n    autoUpdateProfiles();\n    autoCheckUpdate();\n    autoLaunch?.updateStatus(_ref.read(appSettingProvider).autoLaunch);\n    if (!_ref.read(appSettingProvider).silentLaunch) {\n      window?.show();\n    } else {\n      window?.hide();\n    }\n    await _handleFailedPreference();\n    await _handlerDisclaimer();\n    await _showCrashlyticsTip();\n    await _connectCore();\n    await _initCore();\n    await _initStatus();\n    _ref.read(initProvider.notifier).value = true;\n  }\n\n  Future<void> _handleFailedPreference() async {\n    if (await preferences.isInit) {\n      return;\n    }\n    final res = await globalState.showMessage(\n      title: appLocalizations.tip,\n      message: TextSpan(text: appLocalizations.cacheCorrupt),\n    );\n    if (res == true) {\n      final file = File(await appPath.sharedPreferencesPath);\n      await file.safeDelete();\n    }\n    await handleExit();\n  }\n\n  Future<bool> showDisclaimer() async {\n    return await globalState.showCommonDialog<bool>(\n          dismissible: false,\n          child: CommonDialog(\n            title: appLocalizations.disclaimer,\n            actions: [\n              TextButton(\n                onPressed: () {\n                  Navigator.of(_context).pop<bool>(false);\n                },\n                child: Text(appLocalizations.exit),\n              ),\n              TextButton(\n                onPressed: () {\n                  Navigator.of(_context).pop<bool>(true);\n                },\n                child: Text(appLocalizations.agree),\n              ),\n            ],\n            child: Text(appLocalizations.disclaimerDesc),\n          ),\n        ) ??\n        false;\n  }\n\n  Future<void> _showCrashlyticsTip() async {\n    if (!system.isAndroid) {\n      return;\n    }\n    if (_ref.read(appSettingProvider.select((state) => state.crashlyticsTip))) {\n      return;\n    }\n    await globalState.showMessage(\n      title: appLocalizations.dataCollectionTip,\n      cancelable: false,\n      message: TextSpan(text: appLocalizations.dataCollectionContent),\n    );\n    _ref\n        .read(appSettingProvider.notifier)\n        .update((state) => state.copyWith(crashlyticsTip: true));\n  }\n\n  Future<void> _handlerDisclaimer() async {\n    if (_ref.read(\n      appSettingProvider.select((state) => state.disclaimerAccepted),\n    )) {\n      return;\n    }\n    final isDisclaimerAccepted = await showDisclaimer();\n    if (!isDisclaimerAccepted) {\n      await handleExit();\n    }\n    _ref\n        .read(appSettingProvider.notifier)\n        .update((state) => state.copyWith(disclaimerAccepted: true));\n    return;\n  }\n\n  Future<void> _initStatus() async {\n    if (!globalState.needInitStatus) {\n      commonPrint.log('init status cancel');\n      return;\n    }\n    commonPrint.log('init status');\n    if (system.isAndroid) {\n      await globalState.updateStartTime();\n    }\n    final status = globalState.isStart == true\n        ? true\n        : _ref.read(appSettingProvider).autoRun;\n    if (status == true) {\n      await updateStatus(true, isInit: true);\n    } else {\n      await applyProfile(force: true);\n    }\n  }\n\n  Future<void> autoCheckUpdate() async {\n    if (!_ref.read(appSettingProvider).autoCheckUpdate) return;\n    final res = await request.checkForUpdate();\n    checkUpdateResultHandle(data: res);\n  }\n\n  Future<void> checkUpdateResultHandle({\n    Map<String, dynamic>? data,\n    bool isUser = false,\n  }) async {\n    if (data != null) {\n      final tagName = data['tag_name'];\n      final body = data['body'];\n      final submits = utils.parseReleaseBody(body);\n      final textTheme = _context.textTheme;\n      final res = await globalState.showMessage(\n        title: appLocalizations.discoverNewVersion,\n        message: TextSpan(\n          text: '$tagName \\n',\n          style: textTheme.headlineSmall,\n          children: [\n            TextSpan(text: '\\n', style: textTheme.bodyMedium),\n            for (final submit in submits)\n              TextSpan(text: '- $submit \\n', style: textTheme.bodyMedium),\n          ],\n        ),\n        confirmText: appLocalizations.goDownload,\n        cancelText: isUser ? null : appLocalizations.noLongerRemind,\n      );\n      if (res == true) {\n        launchUrl(Uri.parse('https://github.com/$repository/releases/latest'));\n      } else if (!isUser && res == false) {\n        _ref\n            .read(appSettingProvider.notifier)\n            .update((state) => state.copyWith(autoCheckUpdate: false));\n      }\n    } else if (isUser) {\n      globalState.showMessage(\n        title: appLocalizations.checkUpdate,\n        message: TextSpan(text: appLocalizations.checkUpdateError),\n      );\n    }\n  }\n}\n\nextension StateControllerExt on AppController {\n  Config get config {\n    return _ref.read(configProvider);\n  }\n\n  bool get isMobile {\n    return _ref.read(isMobileViewProvider);\n  }\n\n  bool get isStart {\n    return _ref.read(isStartProvider);\n  }\n\n  List<Group> get groups {\n    return _ref.read(groupsProvider);\n  }\n\n  String get ua => _ref.read(patchClashConfigProvider).globalUa.takeFirstValid([\n    globalState.packageInfo.ua,\n  ]);\n\n  Profile? get currentProfile {\n    return _ref.read(currentProfileProvider);\n  }\n\n  String? getSelectedProxyName(String groupName) {\n    return _ref.read(getSelectedProxyNameProvider(groupName));\n  }\n\n  Future<SetupState> getSetupState(int profileId) async {\n    return await _ref.read(setupStateProvider(profileId).future);\n  }\n\n  String getRealTestUrl(String? url) {\n    return _ref.read(realTestUrlProvider(url));\n  }\n\n  int getProxiesColumns() {\n    return _ref.read(getProxiesColumnsProvider);\n  }\n\n  SharedState get sharedState {\n    return _ref.read(sharedStateProvider);\n  }\n\n  SetupParams get setupParams {\n    final selectedMap = _ref.read(selectedMapProvider);\n    final testUrl = _ref.read(\n      appSettingProvider.select((state) => state.testUrl),\n    );\n    return SetupParams(selectedMap: selectedMap, testUrl: testUrl);\n  }\n\n  List<Group> getCurrentGroups() {\n    return _ref.read(currentGroupsStateProvider.select((state) => state.value));\n  }\n\n  String? getCurrentGroupName() {\n    final currentGroupName = _ref.read(\n      currentProfileProvider.select((state) => state?.currentGroupName),\n    );\n    return currentGroupName;\n  }\n}\n\nextension ProfilesControllerExt on AppController {\n  Future<void> deleteProfile(int id) async {\n    _ref.read(profilesProvider.notifier).del(id);\n    clearEffect(id);\n    final currentProfileId = _ref.read(currentProfileIdProvider);\n    if (currentProfileId == id) {\n      final profiles = _ref.read(profilesProvider);\n      if (profiles.isNotEmpty) {\n        final updateId = profiles.first.id;\n        _ref.read(currentProfileIdProvider.notifier).value = updateId;\n      } else {\n        _ref.read(currentProfileIdProvider.notifier).value = null;\n        updateStatus(false);\n      }\n    }\n  }\n\n  Future<void> autoUpdateProfiles() async {\n    for (final profile in _ref.read(profilesProvider)) {\n      if (!profile.autoUpdate) continue;\n      final isNotNeedUpdate = profile.lastUpdateDate\n          ?.add(profile.autoUpdateDuration)\n          .isBeforeNow;\n      if (isNotNeedUpdate == false || profile.type == ProfileType.file) {\n        continue;\n      }\n      try {\n        await updateProfile(profile);\n      } catch (e) {\n        commonPrint.log(e.toString(), logLevel: LogLevel.warning);\n      }\n    }\n  }\n\n  void putProfile(Profile profile) {\n    _ref.read(profilesProvider.notifier).put(profile);\n    if (_ref.read(currentProfileIdProvider) != null) return;\n    _ref.read(currentProfileIdProvider.notifier).value = profile.id;\n  }\n\n  Future<void> updateProfiles() async {\n    for (final profile in _ref.read(profilesProvider)) {\n      if (profile.type == ProfileType.file) {\n        continue;\n      }\n      await updateProfile(profile);\n    }\n  }\n\n  Future<void> updateProfile(\n    Profile profile, {\n    bool showLoading = false,\n  }) async {\n    try {\n      if (showLoading) {\n        _ref.read(isUpdatingProvider(profile.updatingKey).notifier).value =\n            true;\n      }\n      final newProfile = await profile.update();\n      _ref.read(profilesProvider.notifier).put(newProfile);\n      if (profile.id == _ref.read(currentProfileIdProvider)) {\n        applyProfileDebounce(silence: true);\n      }\n    } finally {\n      _ref.read(isUpdatingProvider(profile.updatingKey).notifier).value = false;\n    }\n  }\n\n  Future<void> addProfileFormURL(String url) async {\n    if (globalState.navigatorKey.currentState?.canPop() ?? false) {\n      globalState.navigatorKey.currentState?.popUntil((route) => route.isFirst);\n    }\n    toProfiles();\n    final profile = await loadingRun(tag: LoadingTag.profiles, () async {\n      return await Profile.normal(url: url).update();\n    }, title: appLocalizations.addProfile);\n    if (profile != null) {\n      putProfile(profile);\n    }\n  }\n\n  void setProfileAndAutoApply(Profile profile) {\n    _ref.read(profilesProvider.notifier).put(profile);\n    if (profile.id == _ref.read(currentProfileIdProvider)) {\n      applyProfileDebounce();\n    }\n  }\n\n  Future<void> addProfileFormFile() async {\n    final platformFile = await safeRun(picker.pickerFile);\n    final bytes = platformFile?.bytes;\n    if (bytes == null) {\n      return;\n    }\n    if (!_context.mounted) return;\n    globalState.navigatorKey.currentState?.popUntil((route) => route.isFirst);\n    toProfiles();\n    final profile = await loadingRun(tag: LoadingTag.profiles, () async {\n      return await Profile.normal(label: platformFile?.name).saveFile(bytes);\n    }, title: appLocalizations.addProfile);\n    if (profile != null) {\n      putProfile(profile);\n    }\n  }\n\n  Future<void> addProfileFormQrCode() async {\n    final url = await safeRun(picker.pickerConfigQRCode);\n    if (url == null) return;\n    addProfileFormURL(url);\n  }\n\n  void reorder(List<Profile> profiles) {\n    _ref.read(profilesProvider.notifier).reorder(profiles);\n  }\n\n  Future<void> clearEffect(int profileId) async {\n    final profilePath = await appPath.getProfilePath(profileId.toString());\n    final providersDirPath = await appPath.getProvidersDirPath(\n      profileId.toString(),\n    );\n    final profileFile = File(profilePath);\n    final isExists = await profileFile.exists();\n    if (isExists) {\n      await profileFile.safeDelete(recursive: true);\n    }\n    await coreController.deleteFile(providersDirPath);\n  }\n}\n\nextension LogsControllerExt on AppController {\n  void addLog(Log log) {\n    _ref.read(logsProvider).add(log);\n  }\n\n  Future<bool> exportLogs() async {\n    final logString = await encodeLogsTask(_ref.read(logsProvider).list);\n    final tempFilePath = await appPath.tempFilePath;\n    final file = File(tempFilePath);\n    await file.safeWriteAsString(logString);\n    bool res = false;\n    res = await picker.saveFileWithPath(utils.logFile, tempFilePath) != null;\n    return res;\n  }\n}\n\nextension ProxiesControllerExt on AppController {\n  void updateGroupsDebounce([Duration? duration]) {\n    debouncer.call(FunctionTag.updateGroups, updateGroups, duration: duration);\n  }\n\n  void changeProxyDebounce(String groupName, String proxyName) {\n    debouncer.call(FunctionTag.changeProxy, (\n      String groupName,\n      String proxyName,\n    ) async {\n      await changeProxy(groupName: groupName, proxyName: proxyName);\n      updateGroupsDebounce();\n    }, args: [groupName, proxyName]);\n  }\n\n  Future<void> updateGroups() async {\n    try {\n      commonPrint.log('updateGroups');\n      _ref.read(groupsProvider.notifier).value = await retry(\n        task: () async {\n          final sortType = _ref.read(\n            proxiesStyleSettingProvider.select((state) => state.sortType),\n          );\n          final delayMap = _ref.read(delayDataSourceProvider);\n          final testUrl = _ref.read(\n            appSettingProvider.select((state) => state.testUrl),\n          );\n          final selectedMap = _ref.read(\n            currentProfileProvider.select((state) => state?.selectedMap ?? {}),\n          );\n          return await coreController.getProxiesGroups(\n            selectedMap: selectedMap,\n            sortType: sortType,\n            delayMap: delayMap,\n            defaultTestUrl: testUrl,\n          );\n        },\n        retryIf: (res) => res.isEmpty,\n      );\n    } catch (e) {\n      commonPrint.log('updateGroups error: $e');\n      _ref.read(groupsProvider.notifier).value = [];\n    }\n  }\n\n  void updateCurrentGroupName(String groupName) {\n    final profile = _ref.read(currentProfileProvider);\n    if (profile == null || profile.currentGroupName == groupName) {\n      return;\n    }\n    _ref\n        .read(profilesProvider.notifier)\n        .put(profile.copyWith(currentGroupName: groupName));\n  }\n\n  void updateCurrentSelectedMap(String groupName, String proxyName) {\n    final currentProfile = _ref.read(currentProfileProvider);\n    if (currentProfile != null &&\n        currentProfile.selectedMap[groupName] != proxyName) {\n      final selectedMap = Map<String, String>.from(currentProfile.selectedMap)\n        ..[groupName] = proxyName;\n      _ref\n          .read(profilesProvider.notifier)\n          .put(currentProfile.copyWith(selectedMap: selectedMap));\n    }\n  }\n\n  void updateCurrentUnfoldSet(Set<String> value) {\n    final currentProfile = _ref.read(currentProfileProvider);\n    if (currentProfile == null) {\n      return;\n    }\n    _ref\n        .read(profilesProvider.notifier)\n        .put(currentProfile.copyWith(unfoldSet: value));\n  }\n\n  void setDelay(Delay delay) {\n    _ref.read(delayDataSourceProvider.notifier).setDelay(delay);\n  }\n\n  Future<void> changeProxy({\n    required String groupName,\n    required String proxyName,\n  }) async {\n    await coreController.changeProxy(\n      ChangeProxyParams(groupName: groupName, proxyName: proxyName),\n    );\n    if (_ref.read(appSettingProvider).closeConnections) {\n      coreController.closeConnections();\n    } else {\n      coreController.resetConnections();\n    }\n    addCheckIp();\n  }\n\n  void setProvider(ExternalProvider? provider) {\n    _ref.read(providersProvider.notifier).setProvider(provider);\n  }\n\n  Future<void> updateProviders() async {\n    _ref.read(providersProvider.notifier).value = await coreController\n        .getExternalProviders();\n  }\n\n  Future<String> updateProvider(\n    ExternalProvider provider, {\n    bool showLoading = false,\n  }) async {\n    try {\n      if (showLoading) {\n        _ref.read(isUpdatingProvider(provider.updatingKey).notifier).value =\n            true;\n      }\n      final message = await coreController.updateExternalProvider(\n        providerName: provider.name,\n      );\n      if (message.isNotEmpty) return message;\n      setProvider(await coreController.getExternalProvider(provider.name));\n      return '';\n    } finally {\n      _ref.read(isUpdatingProvider(provider.updatingKey).notifier).value =\n          false;\n    }\n  }\n\n  int addSortNum() {\n    return _ref.read(sortNumProvider.notifier).add();\n  }\n}\n\nextension SetupControllerExt on AppController {\n  void fullSetup() {\n    if (!_ref.read(initProvider)) {\n      return;\n    }\n    _ref.read(delayDataSourceProvider.notifier).value = {};\n    applyProfile(force: true);\n    _ref.read(logsProvider.notifier).value = FixedList(500);\n    _ref.read(requestsProvider.notifier).value = FixedList(500);\n  }\n\n  Future<void> updateStatus(bool isStart, {bool isInit = false}) async {\n    if (isStart) {\n      if (!isInit) {\n        final res = await tryStartCore(true);\n        if (res) {\n          return;\n        }\n        if (!_ref.read(initProvider)) {\n          return;\n        }\n        await globalState.handleStart([updateRunTime, updateTraffic]);\n        applyProfileDebounce(force: true, silence: true);\n      } else {\n        globalState.needInitStatus = false;\n        await applyProfile(\n          force: true,\n          preloadInvoke: () async {\n            await globalState.handleStart([updateRunTime, updateTraffic]);\n          },\n        );\n      }\n    } else {\n      await globalState.handleStop();\n      coreController.resetTraffic();\n      _ref.read(trafficsProvider.notifier).clear();\n      _ref.read(totalTrafficProvider.notifier).value = Traffic();\n      _ref.read(runTimeProvider.notifier).value = null;\n      addCheckIp();\n    }\n  }\n\n  Future<bool> needSetup() async {\n    final profileId = _ref.read(currentProfileIdProvider);\n    if (profileId == null) {\n      return false;\n    }\n    final setupState = await _ref.read(setupStateProvider(profileId).future);\n    return setupState.needSetup(globalState.lastSetupState) == true;\n  }\n\n  Future<void> updateConfigDebounce() async {\n    debouncer.call(FunctionTag.updateConfig, () async {\n      await safeRun(() async {\n        final updateParams = _ref.read(updateParamsProvider);\n        final res = await _requestAdmin(updateParams.tun.enable);\n        if (res.isError) {\n          return;\n        }\n        final realTunEnable = _ref.read(realTunEnableProvider);\n        final message = await coreController.updateConfig(\n          updateParams.copyWith.tun(enable: realTunEnable),\n        );\n        if (message.isNotEmpty) throw message;\n      });\n    });\n  }\n\n  void addCheckIp() {\n    _ref.read(checkIpNumProvider.notifier).add();\n  }\n\n  void tryCheckIp() {\n    final isTimeout = _ref.read(\n      networkDetectionProvider.select(\n        (state) => state.ipInfo == null && state.isLoading == false,\n      ),\n    );\n    if (!isTimeout) {\n      return;\n    }\n    _ref.read(checkIpNumProvider.notifier).add();\n  }\n\n  void applyProfileDebounce({bool silence = false, bool force = false}) {\n    debouncer.call(FunctionTag.applyProfile, (silence, force) {\n      applyProfile(silence: silence, force: force);\n    }, args: [silence, force]);\n  }\n\n  void changeMode(Mode mode) {\n    _ref\n        .read(patchClashConfigProvider.notifier)\n        .update((state) => state.copyWith(mode: mode));\n    if (mode == Mode.global) {\n      updateCurrentGroupName(GroupName.GLOBAL.name);\n    }\n    addCheckIp();\n  }\n\n  void autoApplyProfile() {\n    WidgetsBinding.instance.addPostFrameCallback((_) {\n      applyProfile();\n    });\n  }\n\n  Future<void> applyProfile({\n    bool silence = false,\n    bool force = false,\n    VoidCallback? preloadInvoke,\n  }) async {\n    if (!force && !await needSetup()) {\n      return;\n    }\n    await loadingRun(\n      () async {\n        await _setupConfig(preloadInvoke);\n        await updateGroups();\n        await updateProviders();\n      },\n      silence: true,\n      tag: !silence ? LoadingTag.proxies : null,\n    );\n  }\n\n  Future<Map<String, dynamic>> getProfile({\n    required SetupState setupState,\n    required ClashConfig patchConfig,\n  }) async {\n    final profileId = setupState.profileId;\n    if (profileId == null) {\n      return {};\n    }\n    final defaultUA = globalState.packageInfo.ua;\n    final networkVM2 = _ref.read(\n      networkSettingProvider.select(\n        (state) => VM2(state.appendSystemDns, state.routeMode),\n      ),\n    );\n    final overrideDns = _ref.read(overrideDnsProvider);\n    final appendSystemDns = networkVM2.a;\n    final routeMode = networkVM2.b;\n    final configMap = await coreController.getConfig(profileId);\n    String? scriptContent;\n    final List<Rule> addedRules = [];\n    if (setupState.overwriteType == OverwriteType.script) {\n      scriptContent = await setupState.script?.content;\n    } else {\n      addedRules.addAll(setupState.addedRules);\n    }\n    final realPatchConfig = patchConfig.copyWith(\n      tun: patchConfig.tun.getRealTun(routeMode),\n    );\n    Map<String, dynamic> rawConfig = configMap;\n    if (scriptContent?.isNotEmpty == true) {\n      rawConfig = await globalState.handleEvaluate(scriptContent!, rawConfig);\n    }\n    final directory = await appPath.profilesPath;\n    final res = makeRealProfileTask(\n      MakeRealProfileState(\n        profilesPath: directory,\n        profileId: profileId,\n        rawConfig: rawConfig,\n        realPatchConfig: realPatchConfig,\n        overrideDns: overrideDns,\n        appendSystemDns: appendSystemDns,\n        addedRules: addedRules,\n        defaultUA: defaultUA,\n      ),\n    );\n    return res;\n  }\n\n  Future<Map> getProfileWithId(int profileId) async {\n    var res = {};\n    try {\n      final setupState = await _ref.read(setupStateProvider(profileId).future);\n      final patchClashConfig = _ref.read(patchClashConfigProvider);\n      res = await getProfile(\n        setupState: setupState,\n        patchConfig: patchClashConfig,\n      );\n    } catch (e) {\n      globalState.showNotifier(e.toString());\n    }\n    return res;\n  }\n\n  Future<void> _setupConfig([VoidCallback? preloadInvoke]) async {\n    commonPrint.log('setup ===>');\n    var profile = _ref.read(currentProfileProvider);\n    final nextProfile = await profile?.checkAndUpdateAndCopy();\n    if (nextProfile != null) {\n      profile = nextProfile;\n      _ref.read(profilesProvider.notifier).put(nextProfile);\n    }\n    final patchConfig = _ref.read(patchClashConfigProvider);\n    final res = await _requestAdmin(patchConfig.tun.enable);\n    if (res.isError) {\n      return;\n    }\n    final realTunEnable = _ref.read(realTunEnableProvider);\n    final realPatchConfig = patchConfig.copyWith.tun(enable: realTunEnable);\n    final setupState = await _ref.read(setupStateProvider(profile?.id).future);\n    globalState.lastSetupState = setupState;\n    if (system.isAndroid) {\n      globalState.lastVpnState = _ref.read(vpnStateProvider);\n      preferences.saveShareState(this.sharedState);\n    }\n    final config = await getProfile(\n      setupState: setupState,\n      patchConfig: realPatchConfig,\n    );\n    final configFilePath = await appPath.configFilePath;\n    final yamlString = await encodeYamlTask(config);\n    await File(configFilePath).safeWriteAsString(yamlString);\n    final message = await coreController.setupConfig(\n      setupState: setupState,\n      params: setupParams,\n      preloadInvoke: preloadInvoke,\n    );\n    if (message.isNotEmpty) {\n      throw message;\n    }\n    addCheckIp();\n  }\n}\n\nextension CoreControllerExt on AppController {\n  Future<void> _initCore() async {\n    final isInit = await coreController.isInit;\n    final version = _ref.read(versionProvider);\n    if (!isInit) {\n      await coreController.init(version);\n    } else {\n      await updateGroups();\n    }\n  }\n\n  Future<void> _connectCore() async {\n    _ref.read(coreStatusProvider.notifier).value = CoreStatus.connecting;\n    final result = await Future.wait([\n      coreController.preload(),\n      Future.delayed(Duration(milliseconds: 300)),\n    ]);\n    final String message = result[0];\n    if (message.isNotEmpty) {\n      _ref.read(coreStatusProvider.notifier).value = CoreStatus.disconnected;\n      if (_context.mounted) {\n        _context.showNotifier(message);\n      }\n      return;\n    }\n    _ref.read(coreStatusProvider.notifier).value = CoreStatus.connected;\n  }\n\n  Future<Result<bool>> _requestAdmin(bool enableTun) async {\n    final realTunEnable = _ref.read(realTunEnableProvider);\n    if (enableTun != realTunEnable && realTunEnable == false) {\n      final code = await system.authorizeCore();\n      switch (code) {\n        case AuthorizeCode.success:\n          await restartCore();\n          return Result.error('');\n        case AuthorizeCode.none:\n          break;\n        case AuthorizeCode.error:\n          enableTun = false;\n          break;\n      }\n    }\n    _ref.read(realTunEnableProvider.notifier).value = enableTun;\n    return Result.success(enableTun);\n  }\n\n  Future<void> restartCore([bool start = false]) async {\n    _ref.read(coreStatusProvider.notifier).value = CoreStatus.disconnected;\n    await coreController.shutdown(true);\n    await _connectCore();\n    await _initCore();\n    if (start || _ref.read(isStartProvider)) {\n      await updateStatus(true, isInit: true);\n    } else {\n      await applyProfile(force: true);\n    }\n  }\n\n  Future<bool> tryStartCore([bool start = false]) async {\n    if (coreController.isCompleted) {\n      return false;\n    }\n    await restartCore(start);\n    return true;\n  }\n\n  void handleCoreDisconnected() {\n    _ref.read(coreStatusProvider.notifier).value = CoreStatus.disconnected;\n  }\n}\n\nextension SystemControllerExt on AppController {\n  Future<List<Package>> getPackages() async {\n    if (_ref.read(isMobileViewProvider)) {\n      await Future.delayed(commonDuration);\n    }\n    if (_ref.read(packagesProvider).isEmpty) {\n      _ref.read(packagesProvider.notifier).value =\n          await app?.getPackages() ?? [];\n    }\n    return _ref.read(packagesProvider);\n  }\n\n  Future<void> handleExit([bool needSave = false]) async {\n    Future.delayed(Duration(seconds: 3), () {\n      system.exit();\n    });\n    try {\n      await Future.wait([\n        if (needSave) preferences.saveConfig(config),\n        if (macOS != null) macOS!.updateDns(true),\n        if (proxy != null) proxy!.stopProxy(),\n        if (tray != null) tray!.destroy(),\n      ]);\n      await coreController.destroy();\n      commonPrint.log('exit');\n    } finally {\n      system.exit();\n    }\n  }\n\n  Future<void> handleBackOrExit() async {\n    if (_ref.read(backBlockProvider)) {\n      return;\n    }\n    if (_ref.read(appSettingProvider).minimizeOnExit) {\n      if (system.isDesktop) {\n        await preferences.saveConfig(config);\n      }\n      await system.back();\n    } else {\n      await handleExit();\n    }\n  }\n\n  Future<void> updateVisible() async {\n    final visible = await window?.isVisible;\n    if (visible != null && !visible) {\n      window?.show();\n    } else {\n      window?.hide();\n    }\n  }\n\n  void updateBrightness() {\n    WidgetsBinding.instance.addPostFrameCallback((_) {\n      _ref.read(systemBrightnessProvider.notifier).value =\n          WidgetsBinding.instance.platformDispatcher.platformBrightness;\n    });\n  }\n\n  void updateViewSize(Size size) {\n    WidgetsBinding.instance.addPostFrameCallback((_) {\n      _ref.read(viewSizeProvider.notifier).value = size;\n    });\n  }\n\n  void initLink() {\n    linkManager.initAppLinksListen((url) async {\n      final res = await globalState.showMessage(\n        title: '${appLocalizations.add}${appLocalizations.profile}',\n        message: TextSpan(\n          children: [\n            TextSpan(text: appLocalizations.doYouWantToPass),\n            TextSpan(\n              text: ' $url ',\n              style: TextStyle(\n                color: _context.colorScheme.primary,\n                decoration: TextDecoration.underline,\n                decorationColor: _context.colorScheme.primary,\n              ),\n            ),\n            TextSpan(\n              text: '${appLocalizations.create}${appLocalizations.profile}',\n            ),\n          ],\n        ),\n      );\n\n      if (res != true) {\n        return;\n      }\n      addProfileFormURL(url);\n    });\n  }\n\n  void updateTun() {\n    _ref\n        .read(patchClashConfigProvider.notifier)\n        .update((state) => state.copyWith.tun(enable: !state.tun.enable));\n  }\n\n  void updateSystemProxy() {\n    _ref\n        .read(networkSettingProvider.notifier)\n        .update((state) => state.copyWith(systemProxy: !state.systemProxy));\n  }\n\n  void updateAutoLaunch() {\n    _ref\n        .read(appSettingProvider.notifier)\n        .update((state) => state.copyWith(autoLaunch: !state.autoLaunch));\n  }\n\n  Future<void> updateTray() async {\n    tray?.update(\n      trayState: _ref.read(trayStateProvider),\n      traffic: _ref.read(\n        trafficsProvider.select((state) => state.list.safeLast(Traffic())),\n      ),\n    );\n  }\n\n  Future<void> updateLocalIp() async {\n    _ref.read(localIpProvider.notifier).value = null;\n    await Future.delayed(commonDuration);\n    _ref.read(localIpProvider.notifier).value = await utils.getLocalIpAddress();\n  }\n}\n\nextension BackupControllerExt on AppController {\n  Future<void> shakingStore() async {\n    final profileIds = _ref.read(\n      profilesProvider.select((state) => state.map((item) => item.id)),\n    );\n    final scriptIds = await _ref.read(\n      scriptsProvider.future.select(\n        (state) async => (await state).map((item) => item.id),\n      ),\n    );\n    final pathsToDelete = await shakingProfileTask(VM2(profileIds, scriptIds));\n    if (pathsToDelete.isNotEmpty) {\n      final deleteFutures = pathsToDelete.map((path) async {\n        try {\n          final res = await coreController.deleteFile(path);\n          if (res.isNotEmpty) {\n            throw res;\n          }\n        } catch (e) {\n          rethrow;\n        }\n      });\n\n      await Future.wait(deleteFutures);\n    }\n  }\n\n  Future<String> backup() async {\n    final profileFileNames = _ref.read(\n      profilesProvider.select((state) => state.map((item) => item.fileName)),\n    );\n    final scriptFileNames = await _ref.read(\n      scriptsProvider.future.select(\n        (state) async => (await state).map((item) => item.fileName),\n      ),\n    );\n    final configMap = _ref.read(configProvider).toJson();\n    configMap['version'] = await preferences.getVersion();\n    return await backupTask(configMap, [\n      ...profileFileNames,\n      ...scriptFileNames,\n    ]);\n  }\n\n  Future<void> restore(RestoreOption option) async {\n    final restoreDirPath = await appPath.restoreDirPath;\n    final restoreDir = Directory(restoreDirPath);\n    final restoreStrategy = _ref.read(\n      appSettingProvider.select((state) => state.restoreStrategy),\n    );\n    final isOverride = restoreStrategy == RestoreStrategy.override;\n    try {\n      final migrationData = await restoreTask();\n      if (!await restoreDir.exists()) {\n        throw appLocalizations.restoreException;\n      }\n      await database.restore(\n        migrationData.profiles,\n        migrationData.scripts,\n        migrationData.rules,\n        migrationData.links,\n        isOverride: isOverride,\n      );\n      final configMap = migrationData.configMap;\n      if (option == RestoreOption.onlyProfiles || configMap == null) {\n        return;\n      }\n      final config = Config.fromJson(configMap);\n      _ref.read(patchClashConfigProvider.notifier).value =\n          config.patchClashConfig;\n      _ref.read(appSettingProvider.notifier).value = config.appSettingProps;\n      _ref.read(currentProfileIdProvider.notifier).value =\n          config.currentProfileId;\n      _ref.read(davSettingProvider.notifier).value = config.davProps;\n      _ref.read(themeSettingProvider.notifier).value = config.themeProps;\n      _ref.read(windowSettingProvider.notifier).value = config.windowProps;\n      _ref.read(vpnSettingProvider.notifier).value = config.vpnProps;\n      _ref.read(proxiesStyleSettingProvider.notifier).value =\n          config.proxiesStyleProps;\n      _ref.read(overrideDnsProvider.notifier).value = config.overrideDns;\n      _ref.read(networkSettingProvider.notifier).value = config.networkProps;\n      _ref.read(hotKeyActionsProvider.notifier).value = config.hotKeyActions;\n      return;\n    } finally {\n      await restoreDir.safeDelete(recursive: true);\n    }\n  }\n}\n\nextension BackBlockControllExt on AppController {\n  void backBlock() {\n    _ref.read(backBlockProvider.notifier).value = true;\n  }\n\n  void unBackBlock() {\n    _ref.read(backBlockProvider.notifier).value = false;\n  }\n}\n\nextension StoreControllerExt on AppController {\n  void savePreferencesDebounce() {\n    debouncer.call(FunctionTag.savePreferences, () async {\n      await preferences.saveConfig(config);\n    });\n  }\n\n  Future handleClear() async {\n    await preferences.clearPreferences();\n    commonPrint.log('clear preferences');\n    await database.close();\n    await File(await appPath.databasePath).safeDelete(recursive: true);\n    final homeDir = Directory(await appPath.profilesPath);\n    await for (final file in homeDir.list(recursive: true)) {\n      await coreController.deleteFile(file.path);\n    }\n    await preferences.clearPreferences();\n    handleExit(false);\n  }\n}\n\nextension CommonControllerExt on AppController {\n  void toPage(PageLabel pageLabel) {\n    _ref.read(currentPageLabelProvider.notifier).value = pageLabel;\n  }\n\n  void toProfiles() {\n    toPage(PageLabel.profiles);\n  }\n\n  void updateStart() {\n    updateStatus(!_ref.read(isStartProvider));\n  }\n\n  void updateSpeedStatistics() {\n    _ref\n        .read(appSettingProvider.notifier)\n        .update((state) => state.copyWith(showTrayTitle: !state.showTrayTitle));\n  }\n\n  void updateMode() {\n    _ref.read(patchClashConfigProvider.notifier).update((state) {\n      final index = Mode.values.indexWhere((item) => item == state.mode);\n      if (index == -1) {\n        return null;\n      }\n      final nextIndex = index + 1 > Mode.values.length - 1 ? 0 : index + 1;\n      return state.copyWith(mode: Mode.values[nextIndex]);\n    });\n  }\n\n  void updateRunTime() {\n    final startTime = globalState.startTime;\n    if (startTime != null) {\n      final startTimeStamp = startTime.millisecondsSinceEpoch;\n      final nowTimeStamp = DateTime.now().millisecondsSinceEpoch;\n      _ref.read(runTimeProvider.notifier).value = nowTimeStamp - startTimeStamp;\n    } else {\n      _ref.read(runTimeProvider.notifier).value = null;\n    }\n  }\n\n  Future<void> updateTraffic() async {\n    final onlyStatisticsProxy = _ref.read(\n      appSettingProvider.select((state) => state.onlyStatisticsProxy),\n    );\n    final traffic = await coreController.getTraffic(onlyStatisticsProxy);\n    _ref.read(trafficsProvider.notifier).addTraffic(traffic);\n    _ref.read(totalTrafficProvider.notifier).value = await coreController\n        .getTotalTraffic(onlyStatisticsProxy);\n  }\n\n  Future<T?> loadingRun<T>(\n    FutureOr<T> Function() futureFunction, {\n    String? title,\n    required LoadingTag? tag,\n    bool silence = false,\n  }) async {\n    return safeRun(\n      futureFunction,\n      silence: silence,\n      title: title,\n      onStart: () {\n        if (tag == null) {\n          return;\n        }\n        _ref.read(loadingProvider(tag).notifier).start();\n      },\n      onEnd: () {\n        if (tag == null) {\n          return;\n        }\n        _ref.read(loadingProvider(tag).notifier).stop();\n      },\n    );\n  }\n\n  Future<T?> safeRun<T>(\n    FutureOr<T> Function() futureFunction, {\n    String? title,\n    VoidCallback? onStart,\n    VoidCallback? onEnd,\n    bool silence = true,\n  }) async {\n    try {\n      if (onStart != null) {\n        onStart();\n      }\n      final res = await futureFunction();\n      return res;\n    } catch (e, s) {\n      commonPrint.log('$title ===> $e, $s', logLevel: LogLevel.warning);\n      if (silence) {\n        globalState.showNotifier(e.toString());\n      } else {\n        globalState.showMessage(\n          title: title ?? appLocalizations.tip,\n          message: TextSpan(text: e.toString()),\n        );\n      }\n      return null;\n    } finally {\n      if (onEnd != null) {\n        onEnd();\n      }\n    }\n  }\n}\n\nfinal appController = AppController();\n"
  },
  {
    "path": "lib/core/controller.dart",
    "content": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:io';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/core/core.dart';\nimport 'package:fl_clash/core/interface.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:flutter/services.dart';\nimport 'package:path/path.dart';\n\nclass CoreController {\n  static CoreController? _instance;\n  late CoreHandlerInterface _interface;\n\n  CoreController._internal() {\n    if (system.isAndroid) {\n      _interface = coreLib!;\n    } else {\n      _interface = coreService!;\n    }\n  }\n\n  factory CoreController() {\n    _instance ??= CoreController._internal();\n    return _instance!;\n  }\n\n  bool get isCompleted => _interface.completer.isCompleted;\n\n  Future<String> preload() {\n    return _interface.preload();\n  }\n\n  static Future<void> initGeo() async {\n    final homePath = await appPath.homeDirPath;\n    final homeDir = Directory(homePath);\n    final isExists = await homeDir.exists();\n    if (!isExists) {\n      await homeDir.create(recursive: true);\n    }\n    const geoFileNameList = [MMDB, GEOIP, GEOSITE, ASN];\n    try {\n      for (final geoFileName in geoFileNameList) {\n        final geoFile = File(join(homePath, geoFileName));\n        final isExists = await geoFile.exists();\n        if (isExists) {\n          continue;\n        }\n        final data = await rootBundle.load('assets/data/$geoFileName');\n        List<int> bytes = data.buffer.asUint8List();\n        await geoFile.writeAsBytes(bytes, flush: true);\n      }\n    } catch (e) {\n      exit(0);\n    }\n  }\n\n  Future<bool> init(int version) async {\n    await initGeo();\n    final homeDirPath = await appPath.homeDirPath;\n    return await _interface.init(\n      InitParams(homeDir: homeDirPath, version: version),\n    );\n  }\n\n  Future<void> shutdown(bool isUser) async {\n    await _interface.shutdown(isUser);\n  }\n\n  FutureOr<bool> get isInit => _interface.isInit;\n\n  Future<String> validateConfig(String path) async {\n    final res = await _interface.validateConfig(path);\n    return res;\n  }\n\n  Future<String> validateConfigWithData(String data) async {\n    final path = await appPath.tempFilePath;\n    final file = File(path);\n    await file.safeWriteAsString(data);\n    final res = await _interface.validateConfig(path);\n    await File(path).safeDelete();\n    return res;\n  }\n\n  Future<String> updateConfig(UpdateParams updateParams) async {\n    return await _interface.updateConfig(updateParams);\n  }\n\n  Future<String> setupConfig({\n    required SetupParams params,\n    required SetupState setupState,\n    VoidCallback? preloadInvoke,\n  }) async {\n    final res = _interface.setupConfig(params);\n    if (preloadInvoke != null) {\n      preloadInvoke();\n    }\n    return res;\n  }\n\n  Future<List<Group>> getProxiesGroups({\n    required ProxiesSortType sortType,\n    required DelayMap delayMap,\n    required Map<String, String> selectedMap,\n    required String defaultTestUrl,\n  }) async {\n    final proxiesData = await _interface.getProxies();\n    return toGroupsTask(\n      ComputeGroupsState(\n        proxiesData: proxiesData,\n        sortType: sortType,\n        delayMap: delayMap,\n        selectedMap: selectedMap,\n        defaultTestUrl: defaultTestUrl,\n      ),\n    );\n  }\n\n  FutureOr<String> changeProxy(ChangeProxyParams changeProxyParams) async {\n    return await _interface.changeProxy(changeProxyParams);\n  }\n\n  Future<List<TrackerInfo>> getConnections() async {\n    final res = await _interface.getConnections();\n    final connectionsData = json.decode(res) as Map;\n    final connectionsRaw = connectionsData['connections'] as List? ?? [];\n    return connectionsRaw.map((e) => TrackerInfo.fromJson(e)).toList();\n  }\n\n  void closeConnection(String id) {\n    _interface.closeConnection(id);\n  }\n\n  void closeConnections() {\n    _interface.closeConnections();\n  }\n\n  void resetConnections() {\n    _interface.resetConnections();\n  }\n\n  Future<List<ExternalProvider>> getExternalProviders() async {\n    final externalProvidersRawString = await _interface.getExternalProviders();\n    if (externalProvidersRawString.isEmpty) {\n      return [];\n    }\n    final externalProviders =\n        (await externalProvidersRawString.commonToJSON<List<dynamic>>())\n            .map((item) => ExternalProvider.fromJson(item))\n            .toList();\n    return externalProviders;\n  }\n\n  Future<ExternalProvider?> getExternalProvider(\n    String externalProviderName,\n  ) async {\n    final externalProvidersRawString = await _interface.getExternalProvider(\n      externalProviderName,\n    );\n    if (externalProvidersRawString.isEmpty) {\n      return null;\n    }\n    return ExternalProvider.fromJson(json.decode(externalProvidersRawString));\n  }\n\n  Future<String> updateGeoData(UpdateGeoDataParams params) {\n    return _interface.updateGeoData(params);\n  }\n\n  Future<String> sideLoadExternalProvider({\n    required String providerName,\n    required String data,\n  }) {\n    return _interface.sideLoadExternalProvider(\n      providerName: providerName,\n      data: data,\n    );\n  }\n\n  Future<String> updateExternalProvider({required String providerName}) async {\n    return _interface.updateExternalProvider(providerName);\n  }\n\n  Future<bool> startListener() async {\n    return await _interface.startListener();\n  }\n\n  Future<bool> stopListener() async {\n    return await _interface.stopListener();\n  }\n\n  Future<Delay> getDelay(String url, String proxyName) async {\n    final data = await _interface.asyncTestDelay(url, proxyName);\n    return Delay.fromJson(json.decode(data));\n  }\n\n  Future<Map<String, dynamic>> getConfig(int id) async {\n    final profilePath = await appPath.getProfilePath(id.toString());\n    final res = await _interface.getConfig(profilePath);\n    if (res.isSuccess) {\n      final data = Map<String, dynamic>.from(res.data);\n      data['rules'] = data['rule'];\n      data.remove('rule');\n      return data;\n    } else {\n      throw res.message;\n    }\n  }\n\n  Future<Traffic> getTraffic(bool onlyStatisticsProxy) async {\n    final trafficString = await _interface.getTraffic(onlyStatisticsProxy);\n    if (trafficString.isEmpty) {\n      return Traffic();\n    }\n    return Traffic.fromJson(json.decode(trafficString));\n  }\n\n  Future<IpInfo?> getCountryCode(String ip) async {\n    final countryCode = await _interface.getCountryCode(ip);\n    if (countryCode.isEmpty) {\n      return null;\n    }\n    return IpInfo(ip: ip, countryCode: countryCode);\n  }\n\n  Future<Traffic> getTotalTraffic(bool onlyStatisticsProxy) async {\n    final totalTrafficString = await _interface.getTotalTraffic(\n      onlyStatisticsProxy,\n    );\n    if (totalTrafficString.isEmpty) {\n      return Traffic();\n    }\n    return Traffic.fromJson(json.decode(totalTrafficString));\n  }\n\n  Future<int> getMemory() async {\n    final value = await _interface.getMemory();\n    if (value.isEmpty) {\n      return 0;\n    }\n    return int.parse(value);\n  }\n\n  void resetTraffic() {\n    _interface.resetTraffic();\n  }\n\n  void startLog() {\n    _interface.startLog();\n  }\n\n  void stopLog() {\n    _interface.stopLog();\n  }\n\n  Future<void> requestGc() async {\n    await _interface.forceGc();\n  }\n\n  Future<void> destroy() async {\n    await _interface.destroy();\n  }\n\n  Future<void> crash() async {\n    await _interface.crash();\n  }\n\n  Future<String> deleteFile(String path) async {\n    return await _interface.deleteFile(path);\n  }\n}\n\nfinal coreController = CoreController();\n"
  },
  {
    "path": "lib/core/core.dart",
    "content": "export 'controller.dart';\nexport 'core.dart';\nexport 'event.dart';\nexport 'lib.dart';\nexport 'service.dart';\n"
  },
  {
    "path": "lib/core/event.dart",
    "content": "import 'dart:async';\n\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:flutter/foundation.dart';\n\nabstract mixin class CoreEventListener {\n  void onLog(Log log) {}\n\n  void onDelay(Delay delay) {}\n\n  void onRequest(TrackerInfo connection) {}\n\n  void onLoaded(String providerName) {}\n\n  void onCrash(String message) {}\n}\n\nclass CoreEventManager {\n  final _controller = StreamController<CoreEvent>();\n\n  CoreEventManager._() {\n    _controller.stream.listen((event) {\n      for (final CoreEventListener listener in _listeners) {\n        switch (event.type) {\n          case CoreEventType.log:\n            listener.onLog(Log.fromJson(event.data));\n            break;\n          case CoreEventType.delay:\n            listener.onDelay(Delay.fromJson(event.data));\n            break;\n          case CoreEventType.request:\n            listener.onRequest(TrackerInfo.fromJson(event.data));\n            break;\n          case CoreEventType.loaded:\n            listener.onLoaded(event.data);\n            break;\n          case CoreEventType.crash:\n            listener.onCrash(event.data);\n            break;\n        }\n      }\n    });\n  }\n\n  static final CoreEventManager instance = CoreEventManager._();\n\n  final ObserverList<CoreEventListener> _listeners =\n      ObserverList<CoreEventListener>();\n\n  bool get hasListeners {\n    return _listeners.isNotEmpty;\n  }\n\n  void sendEvent(CoreEvent event) {\n    _controller.add(event);\n  }\n\n  void addListener(CoreEventListener listener) {\n    _listeners.add(listener);\n  }\n\n  void removeListener(CoreEventListener listener) {\n    _listeners.remove(listener);\n  }\n}\n\nfinal coreEventManager = CoreEventManager.instance;\n"
  },
  {
    "path": "lib/core/interface.dart",
    "content": "import 'dart:async';\nimport 'dart:convert';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:flutter/foundation.dart';\n\nmixin CoreInterface {\n  Future<bool> init(InitParams params);\n\n  Future<String> preload();\n\n  Future<bool> shutdown(bool isUser);\n\n  Future<bool> get isInit;\n\n  Future<bool> forceGc();\n\n  Future<String> validateConfig(String path);\n\n  Future<Result> getConfig(String path);\n\n  Future<String> asyncTestDelay(String url, String proxyName);\n\n  Future<String> updateConfig(UpdateParams updateParams);\n\n  Future<String> setupConfig(SetupParams setupParams);\n\n  Future<ProxiesData> getProxies();\n\n  Future<String> changeProxy(ChangeProxyParams changeProxyParams);\n\n  Future<bool> startListener();\n\n  Future<bool> stopListener();\n\n  Future<String> getExternalProviders();\n\n  Future<String>? getExternalProvider(String externalProviderName);\n\n  Future<String> updateGeoData(UpdateGeoDataParams params);\n\n  Future<String> sideLoadExternalProvider({\n    required String providerName,\n    required String data,\n  });\n\n  Future<String> updateExternalProvider(String providerName);\n\n  FutureOr<String> getTraffic(bool onlyStatisticsProxy);\n\n  FutureOr<String> getTotalTraffic(bool onlyStatisticsProxy);\n\n  FutureOr<String> getCountryCode(String ip);\n\n  FutureOr<String> getMemory();\n\n  FutureOr<void> resetTraffic();\n\n  FutureOr<void> startLog();\n\n  FutureOr<void> stopLog();\n\n  Future<bool> crash();\n\n  FutureOr<String> getConnections();\n\n  FutureOr<bool> closeConnection(String id);\n\n  FutureOr<String> deleteFile(String path);\n\n  FutureOr<bool> closeConnections();\n\n  FutureOr<bool> resetConnections();\n}\n\nabstract class CoreHandlerInterface with CoreInterface {\n  Completer get completer;\n\n  FutureOr<bool> destroy();\n\n  Future<T?> _invoke<T>({\n    required ActionMethod method,\n    dynamic data,\n    Duration? timeout,\n  }) async {\n    try {\n      await completer.future.timeout(const Duration(seconds: 10));\n    } catch (e) {\n      commonPrint.log(\n        'Invoke pre ${method.name} timeout $e',\n        logLevel: LogLevel.error,\n      );\n      return null;\n    }\n    if (kDebugMode && watchExecution) {\n      commonPrint.log('Invoke ${method.name} ${DateTime.now()} $data');\n    }\n\n    return await utils.handleWatch(\n      function: () async {\n        return await invoke<T>(method: method, data: data, timeout: timeout);\n      },\n      onWatch: (data, elapsedMilliseconds) {\n        commonPrint.log('Invoke ${method.name} ${elapsedMilliseconds}ms');\n      },\n    );\n  }\n\n  Future<T?> invoke<T>({\n    required ActionMethod method,\n    dynamic data,\n    Duration? timeout,\n  });\n\n  Future<T> parasResult<T>(ActionResult result) async {\n    return switch (result.method) {\n      ActionMethod.getConfig => result.toResult as T,\n      _ => result.data as T,\n    };\n  }\n\n  @override\n  Future<bool> init(InitParams params) async {\n    return await _invoke<bool>(\n          method: ActionMethod.initClash,\n          data: json.encode(params),\n        ) ??\n        false;\n  }\n\n  @override\n  Future<bool> shutdown(bool isUser);\n\n  @override\n  Future<bool> get isInit async {\n    return await _invoke<bool>(method: ActionMethod.getIsInit) ?? false;\n  }\n\n  @override\n  Future<bool> forceGc() async {\n    return await _invoke<bool>(method: ActionMethod.forceGc) ?? false;\n  }\n\n  @override\n  Future<String> validateConfig(String path) async {\n    return await _invoke<String>(\n          method: ActionMethod.validateConfig,\n          data: path,\n        ) ??\n        '';\n  }\n\n  @override\n  Future<String> updateConfig(UpdateParams updateParams) async {\n    return await _invoke<String>(\n          method: ActionMethod.updateConfig,\n          data: json.encode(updateParams),\n        ) ??\n        '';\n  }\n\n  @override\n  Future<Result> getConfig(String path) async {\n    final res = await _invoke(method: ActionMethod.getConfig, data: path);\n    return res ?? Result.success({});\n  }\n\n  @override\n  Future<String> setupConfig(SetupParams setupParams) async {\n    return await _invoke<String>(\n          method: ActionMethod.setupConfig,\n          data: json.encode(setupParams),\n        ) ??\n        '';\n  }\n\n  @override\n  Future<bool> crash() async {\n    return await _invoke<bool>(method: ActionMethod.crash) ?? false;\n  }\n\n  @override\n  Future<ProxiesData> getProxies() async {\n    final data = await _invoke<Map<String, dynamic>>(\n      method: ActionMethod.getProxies,\n    );\n    return data != null\n        ? ProxiesData.fromJson(data)\n        : ProxiesData(proxies: {}, all: []);\n  }\n\n  @override\n  Future<String> changeProxy(ChangeProxyParams changeProxyParams) async {\n    return await _invoke<String>(\n          method: ActionMethod.changeProxy,\n          data: json.encode(changeProxyParams),\n        ) ??\n        '';\n  }\n\n  @override\n  Future<String> getExternalProviders() async {\n    return await _invoke<String>(method: ActionMethod.getExternalProviders) ??\n        '';\n  }\n\n  @override\n  Future<String> getExternalProvider(String externalProviderName) async {\n    return await _invoke<String>(\n          method: ActionMethod.getExternalProvider,\n          data: externalProviderName,\n        ) ??\n        '';\n  }\n\n  @override\n  Future<String> updateGeoData(UpdateGeoDataParams params) async {\n    return await _invoke<String>(\n          method: ActionMethod.updateGeoData,\n          data: json.encode(params),\n        ) ??\n        '';\n  }\n\n  @override\n  Future<String> sideLoadExternalProvider({\n    required String providerName,\n    required String data,\n  }) async {\n    return await _invoke<String>(\n          method: ActionMethod.sideLoadExternalProvider,\n          data: json.encode({'providerName': providerName, 'data': data}),\n        ) ??\n        '';\n  }\n\n  @override\n  Future<String> updateExternalProvider(String providerName) async {\n    return await _invoke<String>(\n          method: ActionMethod.updateExternalProvider,\n          data: providerName,\n        ) ??\n        '';\n  }\n\n  @override\n  Future<String> getConnections() async {\n    return await _invoke<String>(method: ActionMethod.getConnections) ?? '';\n  }\n\n  @override\n  Future<bool> closeConnections() async {\n    return await _invoke<bool>(method: ActionMethod.closeConnections) ?? false;\n  }\n\n  @override\n  Future<bool> resetConnections() async {\n    return await _invoke<bool>(method: ActionMethod.resetConnections) ?? false;\n  }\n\n  @override\n  Future<bool> closeConnection(String id) async {\n    return await _invoke<bool>(\n          method: ActionMethod.closeConnection,\n          data: id,\n        ) ??\n        false;\n  }\n\n  @override\n  Future<String> getTotalTraffic(bool onlyStatisticsProxy) async {\n    return await _invoke<String>(\n          method: ActionMethod.getTotalTraffic,\n          data: onlyStatisticsProxy,\n        ) ??\n        '';\n  }\n\n  @override\n  Future<String> getTraffic(bool onlyStatisticsProxy) async {\n    return await _invoke<String>(\n          method: ActionMethod.getTraffic,\n          data: onlyStatisticsProxy,\n        ) ??\n        '';\n  }\n\n  @override\n  Future<String> deleteFile(String path) async {\n    return await _invoke<String>(method: ActionMethod.deleteFile, data: path) ??\n        '';\n  }\n\n  @override\n  resetTraffic() {\n    _invoke(method: ActionMethod.resetTraffic);\n  }\n\n  @override\n  startLog() {\n    _invoke(method: ActionMethod.startLog);\n  }\n\n  @override\n  stopLog() {\n    _invoke<bool>(method: ActionMethod.stopLog);\n  }\n\n  @override\n  Future<bool> startListener() async {\n    return await _invoke<bool>(method: ActionMethod.startListener) ?? false;\n  }\n\n  @override\n  Future<bool> stopListener() async {\n    return await _invoke<bool>(method: ActionMethod.stopListener) ?? false;\n  }\n\n  @override\n  Future<String> asyncTestDelay(String url, String proxyName) async {\n    final delayParams = {\n      'proxy-name': proxyName,\n      'timeout': httpTimeoutDuration.inMilliseconds,\n      'test-url': url,\n    };\n    return await _invoke<String>(\n          method: ActionMethod.asyncTestDelay,\n          data: json.encode(delayParams),\n          timeout: Duration(seconds: 6),\n        ) ??\n        json.encode(Delay(name: proxyName, value: -1, url: url));\n  }\n\n  @override\n  Future<String> getCountryCode(String ip) async {\n    return await _invoke<String>(\n          method: ActionMethod.getCountryCode,\n          data: ip,\n        ) ??\n        '';\n  }\n\n  @override\n  Future<String> getMemory() async {\n    return await _invoke<String>(method: ActionMethod.getMemory) ?? '';\n  }\n}\n"
  },
  {
    "path": "lib/core/lib.dart",
    "content": "import 'dart:async';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/core.dart';\nimport 'package:fl_clash/plugins/service.dart';\n\nimport 'interface.dart';\n\nclass CoreLib extends CoreHandlerInterface {\n  static CoreLib? _instance;\n\n  Completer<bool> _connectedCompleter = Completer();\n\n  CoreLib._internal();\n\n  @override\n  Future<String> preload() async {\n    final res = await service?.init();\n    if (res?.isEmpty != true) {\n      return res ?? '';\n    }\n    _connectedCompleter.complete(true);\n    final syncRes = await service?.syncState(appController.sharedState);\n    return syncRes ?? '';\n  }\n\n  factory CoreLib() {\n    _instance ??= CoreLib._internal();\n    return _instance!;\n  }\n\n  @override\n  destroy() async {\n    return true;\n  }\n\n  @override\n  Future<bool> shutdown(_) async {\n    if (!_connectedCompleter.isCompleted) {\n      return false;\n    }\n    _connectedCompleter = Completer();\n    return service?.shutdown() ?? true;\n  }\n\n  @override\n  Future<T?> invoke<T>({\n    required ActionMethod method,\n    dynamic data,\n    Duration? timeout,\n  }) async {\n    final id = '${method.name}#${utils.id}';\n    final result = await service\n        ?.invokeAction(Action(id: id, method: method, data: data))\n        .withTimeout(onTimeout: () => null);\n    if (result == null) {\n      return null;\n    }\n    return parasResult<T>(result);\n  }\n\n  @override\n  Completer get completer => _connectedCompleter;\n}\n\nCoreLib? get coreLib => system.isAndroid ? CoreLib() : null;\n"
  },
  {
    "path": "lib/core/service.dart",
    "content": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:io';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/core/core.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/core.dart';\n\nimport 'interface.dart';\n\nclass CoreService extends CoreHandlerInterface {\n  static CoreService? _instance;\n\n  final Completer<ServerSocket> _serverCompleter = Completer();\n\n  Completer<Socket> _socketCompleter = Completer();\n\n  Completer<bool> _shutdownCompleter = Completer();\n\n  final Map<String, Completer> _callbackCompleterMap = {};\n\n  Process? _process;\n\n  factory CoreService() {\n    _instance ??= CoreService._internal();\n    return _instance!;\n  }\n\n  CoreService._internal() {\n    _initServer();\n  }\n\n  Future<void> handleResult(ActionResult result) async {\n    final completer = _callbackCompleterMap[result.id];\n    final data = await parasResult(result);\n    if (result.id?.isEmpty == true) {\n      coreEventManager.sendEvent(CoreEvent.fromJson(result.data));\n    }\n    if (completer?.isCompleted == true) {\n      return;\n    }\n    completer?.complete(data);\n  }\n\n  Future<void> _initServer() async {\n    final server = await retry(\n      task: () async {\n        try {\n          final address = !system.isWindows\n              ? InternetAddress(unixSocketPath, type: InternetAddressType.unix)\n              : InternetAddress(localhost, type: InternetAddressType.IPv4);\n          await _deleteSocketFile();\n          final server = await ServerSocket.bind(address, 0, shared: true);\n          server.listen((socket) async {\n            await _attachSocket(socket);\n          });\n          return server;\n        } catch (_) {\n          return null;\n        }\n      },\n      retryIf: (server) => server == null,\n    );\n    if (server == null) {\n      exit(0);\n    }\n    _serverCompleter.complete(server);\n  }\n\n  Future<void> _attachSocket(Socket socket) async {\n    await _destroySocket();\n    _socketCompleter.complete(socket);\n    socket\n        .transform(uint8ListToListIntConverter)\n        .transform(utf8.decoder)\n        .transform(LineSplitter())\n        .listen((data) async {\n          final dataJson = await data.trim().commonToJSON<dynamic>();\n          handleResult(ActionResult.fromJson(dataJson));\n        })\n        .onDone(() {\n          _handleInvokeCrashEvent();\n          if (!_shutdownCompleter.isCompleted) {\n            _shutdownCompleter.complete(true);\n          }\n        });\n  }\n\n  void _handleInvokeCrashEvent() {\n    coreEventManager.sendEvent(\n      CoreEvent(type: CoreEventType.crash, data: 'socket done'),\n    );\n  }\n\n  Future<void> start() async {\n    if (_process != null) {\n      await shutdown(false);\n    }\n    final serverSocket = await _serverCompleter.future;\n    final arg = system.isWindows\n        ? '${serverSocket.port}'\n        : serverSocket.address.address;\n    if (system.isWindows && await system.checkIsAdmin()) {\n      final isSuccess = await request.startCoreByHelper(arg);\n      if (isSuccess) {\n        return;\n      }\n    }\n    _process = await Process.start(appPath.corePath, [arg]);\n    _process?.stdout.listen((_) {});\n    _process?.stderr.listen((e) {\n      final error = utf8.decode(e);\n      if (error.isNotEmpty) {\n        commonPrint.log(error, logLevel: LogLevel.warning);\n      }\n    });\n    await _socketCompleter.future;\n  }\n\n  @override\n  destroy() async {\n    final server = await _serverCompleter.future;\n    await shutdown(false);\n    await server.close();\n    await _deleteSocketFile();\n    return true;\n  }\n\n  Future<void> sendMessage(String message) async {\n    final socket = await _socketCompleter.future;\n    socket.writeln(message);\n  }\n\n  Future<void> _deleteSocketFile() async {\n    if (!system.isWindows) {\n      final file = File(unixSocketPath);\n      await file.safeDelete();\n    }\n  }\n\n  Future<void> _destroySocket() async {\n    if (_socketCompleter.isCompleted) {\n      final socket = await _socketCompleter.future;\n      _socketCompleter = Completer();\n      await socket.close();\n    }\n  }\n\n  @override\n  shutdown(bool isUser) async {\n    if (!_socketCompleter.isCompleted && _process == null) {\n      return false;\n    }\n    _shutdownCompleter = Completer();\n    await _destroySocket();\n    _clearCompleter();\n    if (system.isWindows) {\n      await request.stopCoreByHelper();\n    }\n    _process?.kill();\n    _process = null;\n    if (isUser) {\n      return _shutdownCompleter.future;\n    } else {\n      return true;\n    }\n  }\n\n  void _clearCompleter() {\n    for (final completer in _callbackCompleterMap.values) {\n      completer.safeCompleter(null);\n    }\n  }\n\n  @override\n  Future<String> preload() async {\n    await _serverCompleter.future;\n    await start();\n    return '';\n  }\n\n  @override\n  Future<T?> invoke<T>({\n    required ActionMethod method,\n    dynamic data,\n    Duration? timeout,\n  }) async {\n    final id = '${method.name}#${utils.id}';\n    _callbackCompleterMap[id] = Completer<T?>();\n    sendMessage(json.encode(Action(id: id, method: method, data: data)));\n    return (_callbackCompleterMap[id] as Completer<T?>).future.withTimeout(\n      timeout: timeout,\n      onLast: () {\n        final completer = _callbackCompleterMap[id];\n        completer?.safeCompleter(null);\n        _callbackCompleterMap.remove(id);\n      },\n      tag: id,\n      onTimeout: () => null,\n    );\n  }\n\n  @override\n  Completer get completer => _socketCompleter;\n}\n\nfinal coreService = system.isDesktop ? CoreService() : null;\n"
  },
  {
    "path": "lib/database/database.dart",
    "content": "import 'dart:convert';\nimport 'dart:io';\n\nimport 'package:collection/collection.dart';\nimport 'package:drift/drift.dart';\nimport 'package:drift/native.dart';\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\n\npart 'generated/database.g.dart';\npart 'links.dart';\npart 'profiles.dart';\npart 'rules.dart';\npart 'scripts.dart';\n\n@DriftDatabase(\n  tables: [Profiles, Scripts, Rules, ProfileRuleLinks],\n  daos: [ProfilesDao, ScriptsDao, RulesDao],\n)\nclass Database extends _$Database {\n  Database([QueryExecutor? executor]) : super(executor ?? _openConnection());\n\n  @override\n  int get schemaVersion => 1;\n\n  static LazyDatabase _openConnection() {\n    return LazyDatabase(() async {\n      final databaseFile = File(await appPath.databasePath);\n      return NativeDatabase.createInBackground(databaseFile);\n    });\n  }\n\n  Future<void> restore(\n    List<Profile> profiles,\n    List<Script> scripts,\n    List<Rule> rules,\n    List<ProfileRuleLink> links, {\n    bool isOverride = false,\n  }) async {\n    if (profiles.isNotEmpty ||\n        scripts.isNotEmpty ||\n        rules.isNotEmpty ||\n        links.isNotEmpty) {\n      await batch((b) {\n        isOverride\n            ? profilesDao.setAllWithBatch(b, profiles)\n            : profilesDao.putAllWithBatch(\n                b,\n                profiles.map((item) => item.toCompanion()),\n              );\n        scriptsDao.setAllWithBatch(b, scripts);\n        rulesDao.restoreWithBatch(b, rules, links);\n      });\n    }\n  }\n}\n\nextension TableInfoExt<Tbl extends Table, Row> on TableInfo<Tbl, Row> {\n  void setAll(\n    Batch batch,\n    Iterable<Insertable<Row>> items, {\n    required Expression<bool> Function(Tbl tbl) deleteFilter,\n  }) async {\n    batch.insertAllOnConflictUpdate(this, items);\n    batch.deleteWhere(this, deleteFilter);\n  }\n\n  Future<int> remove(Expression<bool> Function(Tbl tbl) filter) async {\n    return await (delete()..where(filter)).go();\n  }\n\n  Future<int> put(Insertable<Row> item) async {\n    return await insertOnConflictUpdate(item);\n  }\n}\n\nfinal database = Database();\n"
  },
  {
    "path": "lib/database/generated/database.g.dart",
    "content": "// GENERATED CODE - DO NOT MODIFY BY HAND\n\npart of '../database.dart';\n\n// ignore_for_file: type=lint\nclass $ProfilesTable extends Profiles\n    with TableInfo<$ProfilesTable, RawProfile> {\n  @override\n  final GeneratedDatabase attachedDatabase;\n  final String? _alias;\n  $ProfilesTable(this.attachedDatabase, [this._alias]);\n  static const VerificationMeta _idMeta = const VerificationMeta('id');\n  @override\n  late final GeneratedColumn<int> id = GeneratedColumn<int>(\n    'id',\n    aliasedName,\n    false,\n    type: DriftSqlType.int,\n    requiredDuringInsert: false,\n  );\n  static const VerificationMeta _labelMeta = const VerificationMeta('label');\n  @override\n  late final GeneratedColumn<String> label = GeneratedColumn<String>(\n    'label',\n    aliasedName,\n    false,\n    type: DriftSqlType.string,\n    requiredDuringInsert: true,\n  );\n  static const VerificationMeta _currentGroupNameMeta = const VerificationMeta(\n    'currentGroupName',\n  );\n  @override\n  late final GeneratedColumn<String> currentGroupName = GeneratedColumn<String>(\n    'current_group_name',\n    aliasedName,\n    true,\n    type: DriftSqlType.string,\n    requiredDuringInsert: false,\n  );\n  static const VerificationMeta _urlMeta = const VerificationMeta('url');\n  @override\n  late final GeneratedColumn<String> url = GeneratedColumn<String>(\n    'url',\n    aliasedName,\n    false,\n    type: DriftSqlType.string,\n    requiredDuringInsert: true,\n  );\n  static const VerificationMeta _lastUpdateDateMeta = const VerificationMeta(\n    'lastUpdateDate',\n  );\n  @override\n  late final GeneratedColumn<DateTime> lastUpdateDate =\n      GeneratedColumn<DateTime>(\n        'last_update_date',\n        aliasedName,\n        true,\n        type: DriftSqlType.dateTime,\n        requiredDuringInsert: false,\n      );\n  @override\n  late final GeneratedColumnWithTypeConverter<OverwriteType, String>\n  overwriteType = GeneratedColumn<String>(\n    'overwrite_type',\n    aliasedName,\n    false,\n    type: DriftSqlType.string,\n    requiredDuringInsert: true,\n  ).withConverter<OverwriteType>($ProfilesTable.$converteroverwriteType);\n  static const VerificationMeta _scriptIdMeta = const VerificationMeta(\n    'scriptId',\n  );\n  @override\n  late final GeneratedColumn<int> scriptId = GeneratedColumn<int>(\n    'script_id',\n    aliasedName,\n    true,\n    type: DriftSqlType.int,\n    requiredDuringInsert: false,\n  );\n  static const VerificationMeta _autoUpdateDurationMillisMeta =\n      const VerificationMeta('autoUpdateDurationMillis');\n  @override\n  late final GeneratedColumn<int> autoUpdateDurationMillis =\n      GeneratedColumn<int>(\n        'auto_update_duration_millis',\n        aliasedName,\n        false,\n        type: DriftSqlType.int,\n        requiredDuringInsert: true,\n      );\n  @override\n  late final GeneratedColumnWithTypeConverter<SubscriptionInfo?, String>\n  subscriptionInfo = GeneratedColumn<String>(\n    'subscription_info',\n    aliasedName,\n    true,\n    type: DriftSqlType.string,\n    requiredDuringInsert: false,\n  ).withConverter<SubscriptionInfo?>($ProfilesTable.$convertersubscriptionInfo);\n  static const VerificationMeta _autoUpdateMeta = const VerificationMeta(\n    'autoUpdate',\n  );\n  @override\n  late final GeneratedColumn<bool> autoUpdate = GeneratedColumn<bool>(\n    'auto_update',\n    aliasedName,\n    false,\n    type: DriftSqlType.bool,\n    requiredDuringInsert: true,\n    defaultConstraints: GeneratedColumn.constraintIsAlways(\n      'CHECK (\"auto_update\" IN (0, 1))',\n    ),\n  );\n  @override\n  late final GeneratedColumnWithTypeConverter<Map<String, String>, String>\n  selectedMap = GeneratedColumn<String>(\n    'selected_map',\n    aliasedName,\n    false,\n    type: DriftSqlType.string,\n    requiredDuringInsert: true,\n  ).withConverter<Map<String, String>>($ProfilesTable.$converterselectedMap);\n  @override\n  late final GeneratedColumnWithTypeConverter<Set<String>, String> unfoldSet =\n      GeneratedColumn<String>(\n        'unfold_set',\n        aliasedName,\n        false,\n        type: DriftSqlType.string,\n        requiredDuringInsert: true,\n      ).withConverter<Set<String>>($ProfilesTable.$converterunfoldSet);\n  static const VerificationMeta _orderMeta = const VerificationMeta('order');\n  @override\n  late final GeneratedColumn<int> order = GeneratedColumn<int>(\n    'order',\n    aliasedName,\n    true,\n    type: DriftSqlType.int,\n    requiredDuringInsert: false,\n  );\n  @override\n  List<GeneratedColumn> get $columns => [\n    id,\n    label,\n    currentGroupName,\n    url,\n    lastUpdateDate,\n    overwriteType,\n    scriptId,\n    autoUpdateDurationMillis,\n    subscriptionInfo,\n    autoUpdate,\n    selectedMap,\n    unfoldSet,\n    order,\n  ];\n  @override\n  String get aliasedName => _alias ?? actualTableName;\n  @override\n  String get actualTableName => $name;\n  static const String $name = 'profiles';\n  @override\n  VerificationContext validateIntegrity(\n    Insertable<RawProfile> instance, {\n    bool isInserting = false,\n  }) {\n    final context = VerificationContext();\n    final data = instance.toColumns(true);\n    if (data.containsKey('id')) {\n      context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));\n    }\n    if (data.containsKey('label')) {\n      context.handle(\n        _labelMeta,\n        label.isAcceptableOrUnknown(data['label']!, _labelMeta),\n      );\n    } else if (isInserting) {\n      context.missing(_labelMeta);\n    }\n    if (data.containsKey('current_group_name')) {\n      context.handle(\n        _currentGroupNameMeta,\n        currentGroupName.isAcceptableOrUnknown(\n          data['current_group_name']!,\n          _currentGroupNameMeta,\n        ),\n      );\n    }\n    if (data.containsKey('url')) {\n      context.handle(\n        _urlMeta,\n        url.isAcceptableOrUnknown(data['url']!, _urlMeta),\n      );\n    } else if (isInserting) {\n      context.missing(_urlMeta);\n    }\n    if (data.containsKey('last_update_date')) {\n      context.handle(\n        _lastUpdateDateMeta,\n        lastUpdateDate.isAcceptableOrUnknown(\n          data['last_update_date']!,\n          _lastUpdateDateMeta,\n        ),\n      );\n    }\n    if (data.containsKey('script_id')) {\n      context.handle(\n        _scriptIdMeta,\n        scriptId.isAcceptableOrUnknown(data['script_id']!, _scriptIdMeta),\n      );\n    }\n    if (data.containsKey('auto_update_duration_millis')) {\n      context.handle(\n        _autoUpdateDurationMillisMeta,\n        autoUpdateDurationMillis.isAcceptableOrUnknown(\n          data['auto_update_duration_millis']!,\n          _autoUpdateDurationMillisMeta,\n        ),\n      );\n    } else if (isInserting) {\n      context.missing(_autoUpdateDurationMillisMeta);\n    }\n    if (data.containsKey('auto_update')) {\n      context.handle(\n        _autoUpdateMeta,\n        autoUpdate.isAcceptableOrUnknown(data['auto_update']!, _autoUpdateMeta),\n      );\n    } else if (isInserting) {\n      context.missing(_autoUpdateMeta);\n    }\n    if (data.containsKey('order')) {\n      context.handle(\n        _orderMeta,\n        order.isAcceptableOrUnknown(data['order']!, _orderMeta),\n      );\n    }\n    return context;\n  }\n\n  @override\n  Set<GeneratedColumn> get $primaryKey => {id};\n  @override\n  RawProfile map(Map<String, dynamic> data, {String? tablePrefix}) {\n    final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';\n    return RawProfile(\n      id: attachedDatabase.typeMapping.read(\n        DriftSqlType.int,\n        data['${effectivePrefix}id'],\n      )!,\n      label: attachedDatabase.typeMapping.read(\n        DriftSqlType.string,\n        data['${effectivePrefix}label'],\n      )!,\n      currentGroupName: attachedDatabase.typeMapping.read(\n        DriftSqlType.string,\n        data['${effectivePrefix}current_group_name'],\n      ),\n      url: attachedDatabase.typeMapping.read(\n        DriftSqlType.string,\n        data['${effectivePrefix}url'],\n      )!,\n      lastUpdateDate: attachedDatabase.typeMapping.read(\n        DriftSqlType.dateTime,\n        data['${effectivePrefix}last_update_date'],\n      ),\n      overwriteType: $ProfilesTable.$converteroverwriteType.fromSql(\n        attachedDatabase.typeMapping.read(\n          DriftSqlType.string,\n          data['${effectivePrefix}overwrite_type'],\n        )!,\n      ),\n      scriptId: attachedDatabase.typeMapping.read(\n        DriftSqlType.int,\n        data['${effectivePrefix}script_id'],\n      ),\n      autoUpdateDurationMillis: attachedDatabase.typeMapping.read(\n        DriftSqlType.int,\n        data['${effectivePrefix}auto_update_duration_millis'],\n      )!,\n      subscriptionInfo: $ProfilesTable.$convertersubscriptionInfo.fromSql(\n        attachedDatabase.typeMapping.read(\n          DriftSqlType.string,\n          data['${effectivePrefix}subscription_info'],\n        ),\n      ),\n      autoUpdate: attachedDatabase.typeMapping.read(\n        DriftSqlType.bool,\n        data['${effectivePrefix}auto_update'],\n      )!,\n      selectedMap: $ProfilesTable.$converterselectedMap.fromSql(\n        attachedDatabase.typeMapping.read(\n          DriftSqlType.string,\n          data['${effectivePrefix}selected_map'],\n        )!,\n      ),\n      unfoldSet: $ProfilesTable.$converterunfoldSet.fromSql(\n        attachedDatabase.typeMapping.read(\n          DriftSqlType.string,\n          data['${effectivePrefix}unfold_set'],\n        )!,\n      ),\n      order: attachedDatabase.typeMapping.read(\n        DriftSqlType.int,\n        data['${effectivePrefix}order'],\n      ),\n    );\n  }\n\n  @override\n  $ProfilesTable createAlias(String alias) {\n    return $ProfilesTable(attachedDatabase, alias);\n  }\n\n  static JsonTypeConverter2<OverwriteType, String, String>\n  $converteroverwriteType = const EnumNameConverter<OverwriteType>(\n    OverwriteType.values,\n  );\n  static TypeConverter<SubscriptionInfo?, String?> $convertersubscriptionInfo =\n      const SubscriptionInfoConverter();\n  static TypeConverter<Map<String, String>, String> $converterselectedMap =\n      const StringMapConverter();\n  static TypeConverter<Set<String>, String> $converterunfoldSet =\n      const StringSetConverter();\n}\n\nclass RawProfile extends DataClass implements Insertable<RawProfile> {\n  final int id;\n  final String label;\n  final String? currentGroupName;\n  final String url;\n  final DateTime? lastUpdateDate;\n  final OverwriteType overwriteType;\n  final int? scriptId;\n  final int autoUpdateDurationMillis;\n  final SubscriptionInfo? subscriptionInfo;\n  final bool autoUpdate;\n  final Map<String, String> selectedMap;\n  final Set<String> unfoldSet;\n  final int? order;\n  const RawProfile({\n    required this.id,\n    required this.label,\n    this.currentGroupName,\n    required this.url,\n    this.lastUpdateDate,\n    required this.overwriteType,\n    this.scriptId,\n    required this.autoUpdateDurationMillis,\n    this.subscriptionInfo,\n    required this.autoUpdate,\n    required this.selectedMap,\n    required this.unfoldSet,\n    this.order,\n  });\n  @override\n  Map<String, Expression> toColumns(bool nullToAbsent) {\n    final map = <String, Expression>{};\n    map['id'] = Variable<int>(id);\n    map['label'] = Variable<String>(label);\n    if (!nullToAbsent || currentGroupName != null) {\n      map['current_group_name'] = Variable<String>(currentGroupName);\n    }\n    map['url'] = Variable<String>(url);\n    if (!nullToAbsent || lastUpdateDate != null) {\n      map['last_update_date'] = Variable<DateTime>(lastUpdateDate);\n    }\n    {\n      map['overwrite_type'] = Variable<String>(\n        $ProfilesTable.$converteroverwriteType.toSql(overwriteType),\n      );\n    }\n    if (!nullToAbsent || scriptId != null) {\n      map['script_id'] = Variable<int>(scriptId);\n    }\n    map['auto_update_duration_millis'] = Variable<int>(\n      autoUpdateDurationMillis,\n    );\n    if (!nullToAbsent || subscriptionInfo != null) {\n      map['subscription_info'] = Variable<String>(\n        $ProfilesTable.$convertersubscriptionInfo.toSql(subscriptionInfo),\n      );\n    }\n    map['auto_update'] = Variable<bool>(autoUpdate);\n    {\n      map['selected_map'] = Variable<String>(\n        $ProfilesTable.$converterselectedMap.toSql(selectedMap),\n      );\n    }\n    {\n      map['unfold_set'] = Variable<String>(\n        $ProfilesTable.$converterunfoldSet.toSql(unfoldSet),\n      );\n    }\n    if (!nullToAbsent || order != null) {\n      map['order'] = Variable<int>(order);\n    }\n    return map;\n  }\n\n  ProfilesCompanion toCompanion(bool nullToAbsent) {\n    return ProfilesCompanion(\n      id: Value(id),\n      label: Value(label),\n      currentGroupName: currentGroupName == null && nullToAbsent\n          ? const Value.absent()\n          : Value(currentGroupName),\n      url: Value(url),\n      lastUpdateDate: lastUpdateDate == null && nullToAbsent\n          ? const Value.absent()\n          : Value(lastUpdateDate),\n      overwriteType: Value(overwriteType),\n      scriptId: scriptId == null && nullToAbsent\n          ? const Value.absent()\n          : Value(scriptId),\n      autoUpdateDurationMillis: Value(autoUpdateDurationMillis),\n      subscriptionInfo: subscriptionInfo == null && nullToAbsent\n          ? const Value.absent()\n          : Value(subscriptionInfo),\n      autoUpdate: Value(autoUpdate),\n      selectedMap: Value(selectedMap),\n      unfoldSet: Value(unfoldSet),\n      order: order == null && nullToAbsent\n          ? const Value.absent()\n          : Value(order),\n    );\n  }\n\n  factory RawProfile.fromJson(\n    Map<String, dynamic> json, {\n    ValueSerializer? serializer,\n  }) {\n    serializer ??= driftRuntimeOptions.defaultSerializer;\n    return RawProfile(\n      id: serializer.fromJson<int>(json['id']),\n      label: serializer.fromJson<String>(json['label']),\n      currentGroupName: serializer.fromJson<String?>(json['currentGroupName']),\n      url: serializer.fromJson<String>(json['url']),\n      lastUpdateDate: serializer.fromJson<DateTime?>(json['lastUpdateDate']),\n      overwriteType: $ProfilesTable.$converteroverwriteType.fromJson(\n        serializer.fromJson<String>(json['overwriteType']),\n      ),\n      scriptId: serializer.fromJson<int?>(json['scriptId']),\n      autoUpdateDurationMillis: serializer.fromJson<int>(\n        json['autoUpdateDurationMillis'],\n      ),\n      subscriptionInfo: serializer.fromJson<SubscriptionInfo?>(\n        json['subscriptionInfo'],\n      ),\n      autoUpdate: serializer.fromJson<bool>(json['autoUpdate']),\n      selectedMap: serializer.fromJson<Map<String, String>>(\n        json['selectedMap'],\n      ),\n      unfoldSet: serializer.fromJson<Set<String>>(json['unfoldSet']),\n      order: serializer.fromJson<int?>(json['order']),\n    );\n  }\n  @override\n  Map<String, dynamic> toJson({ValueSerializer? serializer}) {\n    serializer ??= driftRuntimeOptions.defaultSerializer;\n    return <String, dynamic>{\n      'id': serializer.toJson<int>(id),\n      'label': serializer.toJson<String>(label),\n      'currentGroupName': serializer.toJson<String?>(currentGroupName),\n      'url': serializer.toJson<String>(url),\n      'lastUpdateDate': serializer.toJson<DateTime?>(lastUpdateDate),\n      'overwriteType': serializer.toJson<String>(\n        $ProfilesTable.$converteroverwriteType.toJson(overwriteType),\n      ),\n      'scriptId': serializer.toJson<int?>(scriptId),\n      'autoUpdateDurationMillis': serializer.toJson<int>(\n        autoUpdateDurationMillis,\n      ),\n      'subscriptionInfo': serializer.toJson<SubscriptionInfo?>(\n        subscriptionInfo,\n      ),\n      'autoUpdate': serializer.toJson<bool>(autoUpdate),\n      'selectedMap': serializer.toJson<Map<String, String>>(selectedMap),\n      'unfoldSet': serializer.toJson<Set<String>>(unfoldSet),\n      'order': serializer.toJson<int?>(order),\n    };\n  }\n\n  RawProfile copyWith({\n    int? id,\n    String? label,\n    Value<String?> currentGroupName = const Value.absent(),\n    String? url,\n    Value<DateTime?> lastUpdateDate = const Value.absent(),\n    OverwriteType? overwriteType,\n    Value<int?> scriptId = const Value.absent(),\n    int? autoUpdateDurationMillis,\n    Value<SubscriptionInfo?> subscriptionInfo = const Value.absent(),\n    bool? autoUpdate,\n    Map<String, String>? selectedMap,\n    Set<String>? unfoldSet,\n    Value<int?> order = const Value.absent(),\n  }) => RawProfile(\n    id: id ?? this.id,\n    label: label ?? this.label,\n    currentGroupName: currentGroupName.present\n        ? currentGroupName.value\n        : this.currentGroupName,\n    url: url ?? this.url,\n    lastUpdateDate: lastUpdateDate.present\n        ? lastUpdateDate.value\n        : this.lastUpdateDate,\n    overwriteType: overwriteType ?? this.overwriteType,\n    scriptId: scriptId.present ? scriptId.value : this.scriptId,\n    autoUpdateDurationMillis:\n        autoUpdateDurationMillis ?? this.autoUpdateDurationMillis,\n    subscriptionInfo: subscriptionInfo.present\n        ? subscriptionInfo.value\n        : this.subscriptionInfo,\n    autoUpdate: autoUpdate ?? this.autoUpdate,\n    selectedMap: selectedMap ?? this.selectedMap,\n    unfoldSet: unfoldSet ?? this.unfoldSet,\n    order: order.present ? order.value : this.order,\n  );\n  RawProfile copyWithCompanion(ProfilesCompanion data) {\n    return RawProfile(\n      id: data.id.present ? data.id.value : this.id,\n      label: data.label.present ? data.label.value : this.label,\n      currentGroupName: data.currentGroupName.present\n          ? data.currentGroupName.value\n          : this.currentGroupName,\n      url: data.url.present ? data.url.value : this.url,\n      lastUpdateDate: data.lastUpdateDate.present\n          ? data.lastUpdateDate.value\n          : this.lastUpdateDate,\n      overwriteType: data.overwriteType.present\n          ? data.overwriteType.value\n          : this.overwriteType,\n      scriptId: data.scriptId.present ? data.scriptId.value : this.scriptId,\n      autoUpdateDurationMillis: data.autoUpdateDurationMillis.present\n          ? data.autoUpdateDurationMillis.value\n          : this.autoUpdateDurationMillis,\n      subscriptionInfo: data.subscriptionInfo.present\n          ? data.subscriptionInfo.value\n          : this.subscriptionInfo,\n      autoUpdate: data.autoUpdate.present\n          ? data.autoUpdate.value\n          : this.autoUpdate,\n      selectedMap: data.selectedMap.present\n          ? data.selectedMap.value\n          : this.selectedMap,\n      unfoldSet: data.unfoldSet.present ? data.unfoldSet.value : this.unfoldSet,\n      order: data.order.present ? data.order.value : this.order,\n    );\n  }\n\n  @override\n  String toString() {\n    return (StringBuffer('RawProfile(')\n          ..write('id: $id, ')\n          ..write('label: $label, ')\n          ..write('currentGroupName: $currentGroupName, ')\n          ..write('url: $url, ')\n          ..write('lastUpdateDate: $lastUpdateDate, ')\n          ..write('overwriteType: $overwriteType, ')\n          ..write('scriptId: $scriptId, ')\n          ..write('autoUpdateDurationMillis: $autoUpdateDurationMillis, ')\n          ..write('subscriptionInfo: $subscriptionInfo, ')\n          ..write('autoUpdate: $autoUpdate, ')\n          ..write('selectedMap: $selectedMap, ')\n          ..write('unfoldSet: $unfoldSet, ')\n          ..write('order: $order')\n          ..write(')'))\n        .toString();\n  }\n\n  @override\n  int get hashCode => Object.hash(\n    id,\n    label,\n    currentGroupName,\n    url,\n    lastUpdateDate,\n    overwriteType,\n    scriptId,\n    autoUpdateDurationMillis,\n    subscriptionInfo,\n    autoUpdate,\n    selectedMap,\n    unfoldSet,\n    order,\n  );\n  @override\n  bool operator ==(Object other) =>\n      identical(this, other) ||\n      (other is RawProfile &&\n          other.id == this.id &&\n          other.label == this.label &&\n          other.currentGroupName == this.currentGroupName &&\n          other.url == this.url &&\n          other.lastUpdateDate == this.lastUpdateDate &&\n          other.overwriteType == this.overwriteType &&\n          other.scriptId == this.scriptId &&\n          other.autoUpdateDurationMillis == this.autoUpdateDurationMillis &&\n          other.subscriptionInfo == this.subscriptionInfo &&\n          other.autoUpdate == this.autoUpdate &&\n          other.selectedMap == this.selectedMap &&\n          other.unfoldSet == this.unfoldSet &&\n          other.order == this.order);\n}\n\nclass ProfilesCompanion extends UpdateCompanion<RawProfile> {\n  final Value<int> id;\n  final Value<String> label;\n  final Value<String?> currentGroupName;\n  final Value<String> url;\n  final Value<DateTime?> lastUpdateDate;\n  final Value<OverwriteType> overwriteType;\n  final Value<int?> scriptId;\n  final Value<int> autoUpdateDurationMillis;\n  final Value<SubscriptionInfo?> subscriptionInfo;\n  final Value<bool> autoUpdate;\n  final Value<Map<String, String>> selectedMap;\n  final Value<Set<String>> unfoldSet;\n  final Value<int?> order;\n  const ProfilesCompanion({\n    this.id = const Value.absent(),\n    this.label = const Value.absent(),\n    this.currentGroupName = const Value.absent(),\n    this.url = const Value.absent(),\n    this.lastUpdateDate = const Value.absent(),\n    this.overwriteType = const Value.absent(),\n    this.scriptId = const Value.absent(),\n    this.autoUpdateDurationMillis = const Value.absent(),\n    this.subscriptionInfo = const Value.absent(),\n    this.autoUpdate = const Value.absent(),\n    this.selectedMap = const Value.absent(),\n    this.unfoldSet = const Value.absent(),\n    this.order = const Value.absent(),\n  });\n  ProfilesCompanion.insert({\n    this.id = const Value.absent(),\n    required String label,\n    this.currentGroupName = const Value.absent(),\n    required String url,\n    this.lastUpdateDate = const Value.absent(),\n    required OverwriteType overwriteType,\n    this.scriptId = const Value.absent(),\n    required int autoUpdateDurationMillis,\n    this.subscriptionInfo = const Value.absent(),\n    required bool autoUpdate,\n    required Map<String, String> selectedMap,\n    required Set<String> unfoldSet,\n    this.order = const Value.absent(),\n  }) : label = Value(label),\n       url = Value(url),\n       overwriteType = Value(overwriteType),\n       autoUpdateDurationMillis = Value(autoUpdateDurationMillis),\n       autoUpdate = Value(autoUpdate),\n       selectedMap = Value(selectedMap),\n       unfoldSet = Value(unfoldSet);\n  static Insertable<RawProfile> custom({\n    Expression<int>? id,\n    Expression<String>? label,\n    Expression<String>? currentGroupName,\n    Expression<String>? url,\n    Expression<DateTime>? lastUpdateDate,\n    Expression<String>? overwriteType,\n    Expression<int>? scriptId,\n    Expression<int>? autoUpdateDurationMillis,\n    Expression<String>? subscriptionInfo,\n    Expression<bool>? autoUpdate,\n    Expression<String>? selectedMap,\n    Expression<String>? unfoldSet,\n    Expression<int>? order,\n  }) {\n    return RawValuesInsertable({\n      if (id != null) 'id': id,\n      if (label != null) 'label': label,\n      if (currentGroupName != null) 'current_group_name': currentGroupName,\n      if (url != null) 'url': url,\n      if (lastUpdateDate != null) 'last_update_date': lastUpdateDate,\n      if (overwriteType != null) 'overwrite_type': overwriteType,\n      if (scriptId != null) 'script_id': scriptId,\n      if (autoUpdateDurationMillis != null)\n        'auto_update_duration_millis': autoUpdateDurationMillis,\n      if (subscriptionInfo != null) 'subscription_info': subscriptionInfo,\n      if (autoUpdate != null) 'auto_update': autoUpdate,\n      if (selectedMap != null) 'selected_map': selectedMap,\n      if (unfoldSet != null) 'unfold_set': unfoldSet,\n      if (order != null) 'order': order,\n    });\n  }\n\n  ProfilesCompanion copyWith({\n    Value<int>? id,\n    Value<String>? label,\n    Value<String?>? currentGroupName,\n    Value<String>? url,\n    Value<DateTime?>? lastUpdateDate,\n    Value<OverwriteType>? overwriteType,\n    Value<int?>? scriptId,\n    Value<int>? autoUpdateDurationMillis,\n    Value<SubscriptionInfo?>? subscriptionInfo,\n    Value<bool>? autoUpdate,\n    Value<Map<String, String>>? selectedMap,\n    Value<Set<String>>? unfoldSet,\n    Value<int?>? order,\n  }) {\n    return ProfilesCompanion(\n      id: id ?? this.id,\n      label: label ?? this.label,\n      currentGroupName: currentGroupName ?? this.currentGroupName,\n      url: url ?? this.url,\n      lastUpdateDate: lastUpdateDate ?? this.lastUpdateDate,\n      overwriteType: overwriteType ?? this.overwriteType,\n      scriptId: scriptId ?? this.scriptId,\n      autoUpdateDurationMillis:\n          autoUpdateDurationMillis ?? this.autoUpdateDurationMillis,\n      subscriptionInfo: subscriptionInfo ?? this.subscriptionInfo,\n      autoUpdate: autoUpdate ?? this.autoUpdate,\n      selectedMap: selectedMap ?? this.selectedMap,\n      unfoldSet: unfoldSet ?? this.unfoldSet,\n      order: order ?? this.order,\n    );\n  }\n\n  @override\n  Map<String, Expression> toColumns(bool nullToAbsent) {\n    final map = <String, Expression>{};\n    if (id.present) {\n      map['id'] = Variable<int>(id.value);\n    }\n    if (label.present) {\n      map['label'] = Variable<String>(label.value);\n    }\n    if (currentGroupName.present) {\n      map['current_group_name'] = Variable<String>(currentGroupName.value);\n    }\n    if (url.present) {\n      map['url'] = Variable<String>(url.value);\n    }\n    if (lastUpdateDate.present) {\n      map['last_update_date'] = Variable<DateTime>(lastUpdateDate.value);\n    }\n    if (overwriteType.present) {\n      map['overwrite_type'] = Variable<String>(\n        $ProfilesTable.$converteroverwriteType.toSql(overwriteType.value),\n      );\n    }\n    if (scriptId.present) {\n      map['script_id'] = Variable<int>(scriptId.value);\n    }\n    if (autoUpdateDurationMillis.present) {\n      map['auto_update_duration_millis'] = Variable<int>(\n        autoUpdateDurationMillis.value,\n      );\n    }\n    if (subscriptionInfo.present) {\n      map['subscription_info'] = Variable<String>(\n        $ProfilesTable.$convertersubscriptionInfo.toSql(subscriptionInfo.value),\n      );\n    }\n    if (autoUpdate.present) {\n      map['auto_update'] = Variable<bool>(autoUpdate.value);\n    }\n    if (selectedMap.present) {\n      map['selected_map'] = Variable<String>(\n        $ProfilesTable.$converterselectedMap.toSql(selectedMap.value),\n      );\n    }\n    if (unfoldSet.present) {\n      map['unfold_set'] = Variable<String>(\n        $ProfilesTable.$converterunfoldSet.toSql(unfoldSet.value),\n      );\n    }\n    if (order.present) {\n      map['order'] = Variable<int>(order.value);\n    }\n    return map;\n  }\n\n  @override\n  String toString() {\n    return (StringBuffer('ProfilesCompanion(')\n          ..write('id: $id, ')\n          ..write('label: $label, ')\n          ..write('currentGroupName: $currentGroupName, ')\n          ..write('url: $url, ')\n          ..write('lastUpdateDate: $lastUpdateDate, ')\n          ..write('overwriteType: $overwriteType, ')\n          ..write('scriptId: $scriptId, ')\n          ..write('autoUpdateDurationMillis: $autoUpdateDurationMillis, ')\n          ..write('subscriptionInfo: $subscriptionInfo, ')\n          ..write('autoUpdate: $autoUpdate, ')\n          ..write('selectedMap: $selectedMap, ')\n          ..write('unfoldSet: $unfoldSet, ')\n          ..write('order: $order')\n          ..write(')'))\n        .toString();\n  }\n}\n\nclass $ScriptsTable extends Scripts with TableInfo<$ScriptsTable, RawScript> {\n  @override\n  final GeneratedDatabase attachedDatabase;\n  final String? _alias;\n  $ScriptsTable(this.attachedDatabase, [this._alias]);\n  static const VerificationMeta _idMeta = const VerificationMeta('id');\n  @override\n  late final GeneratedColumn<int> id = GeneratedColumn<int>(\n    'id',\n    aliasedName,\n    false,\n    type: DriftSqlType.int,\n    requiredDuringInsert: false,\n  );\n  static const VerificationMeta _labelMeta = const VerificationMeta('label');\n  @override\n  late final GeneratedColumn<String> label = GeneratedColumn<String>(\n    'label',\n    aliasedName,\n    false,\n    type: DriftSqlType.string,\n    requiredDuringInsert: true,\n  );\n  static const VerificationMeta _lastUpdateTimeMeta = const VerificationMeta(\n    'lastUpdateTime',\n  );\n  @override\n  late final GeneratedColumn<DateTime> lastUpdateTime =\n      GeneratedColumn<DateTime>(\n        'last_update_time',\n        aliasedName,\n        false,\n        type: DriftSqlType.dateTime,\n        requiredDuringInsert: true,\n      );\n  @override\n  List<GeneratedColumn> get $columns => [id, label, lastUpdateTime];\n  @override\n  String get aliasedName => _alias ?? actualTableName;\n  @override\n  String get actualTableName => $name;\n  static const String $name = 'scripts';\n  @override\n  VerificationContext validateIntegrity(\n    Insertable<RawScript> instance, {\n    bool isInserting = false,\n  }) {\n    final context = VerificationContext();\n    final data = instance.toColumns(true);\n    if (data.containsKey('id')) {\n      context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));\n    }\n    if (data.containsKey('label')) {\n      context.handle(\n        _labelMeta,\n        label.isAcceptableOrUnknown(data['label']!, _labelMeta),\n      );\n    } else if (isInserting) {\n      context.missing(_labelMeta);\n    }\n    if (data.containsKey('last_update_time')) {\n      context.handle(\n        _lastUpdateTimeMeta,\n        lastUpdateTime.isAcceptableOrUnknown(\n          data['last_update_time']!,\n          _lastUpdateTimeMeta,\n        ),\n      );\n    } else if (isInserting) {\n      context.missing(_lastUpdateTimeMeta);\n    }\n    return context;\n  }\n\n  @override\n  Set<GeneratedColumn> get $primaryKey => {id};\n  @override\n  RawScript map(Map<String, dynamic> data, {String? tablePrefix}) {\n    final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';\n    return RawScript(\n      id: attachedDatabase.typeMapping.read(\n        DriftSqlType.int,\n        data['${effectivePrefix}id'],\n      )!,\n      label: attachedDatabase.typeMapping.read(\n        DriftSqlType.string,\n        data['${effectivePrefix}label'],\n      )!,\n      lastUpdateTime: attachedDatabase.typeMapping.read(\n        DriftSqlType.dateTime,\n        data['${effectivePrefix}last_update_time'],\n      )!,\n    );\n  }\n\n  @override\n  $ScriptsTable createAlias(String alias) {\n    return $ScriptsTable(attachedDatabase, alias);\n  }\n}\n\nclass RawScript extends DataClass implements Insertable<RawScript> {\n  final int id;\n  final String label;\n  final DateTime lastUpdateTime;\n  const RawScript({\n    required this.id,\n    required this.label,\n    required this.lastUpdateTime,\n  });\n  @override\n  Map<String, Expression> toColumns(bool nullToAbsent) {\n    final map = <String, Expression>{};\n    map['id'] = Variable<int>(id);\n    map['label'] = Variable<String>(label);\n    map['last_update_time'] = Variable<DateTime>(lastUpdateTime);\n    return map;\n  }\n\n  ScriptsCompanion toCompanion(bool nullToAbsent) {\n    return ScriptsCompanion(\n      id: Value(id),\n      label: Value(label),\n      lastUpdateTime: Value(lastUpdateTime),\n    );\n  }\n\n  factory RawScript.fromJson(\n    Map<String, dynamic> json, {\n    ValueSerializer? serializer,\n  }) {\n    serializer ??= driftRuntimeOptions.defaultSerializer;\n    return RawScript(\n      id: serializer.fromJson<int>(json['id']),\n      label: serializer.fromJson<String>(json['label']),\n      lastUpdateTime: serializer.fromJson<DateTime>(json['lastUpdateTime']),\n    );\n  }\n  @override\n  Map<String, dynamic> toJson({ValueSerializer? serializer}) {\n    serializer ??= driftRuntimeOptions.defaultSerializer;\n    return <String, dynamic>{\n      'id': serializer.toJson<int>(id),\n      'label': serializer.toJson<String>(label),\n      'lastUpdateTime': serializer.toJson<DateTime>(lastUpdateTime),\n    };\n  }\n\n  RawScript copyWith({int? id, String? label, DateTime? lastUpdateTime}) =>\n      RawScript(\n        id: id ?? this.id,\n        label: label ?? this.label,\n        lastUpdateTime: lastUpdateTime ?? this.lastUpdateTime,\n      );\n  RawScript copyWithCompanion(ScriptsCompanion data) {\n    return RawScript(\n      id: data.id.present ? data.id.value : this.id,\n      label: data.label.present ? data.label.value : this.label,\n      lastUpdateTime: data.lastUpdateTime.present\n          ? data.lastUpdateTime.value\n          : this.lastUpdateTime,\n    );\n  }\n\n  @override\n  String toString() {\n    return (StringBuffer('RawScript(')\n          ..write('id: $id, ')\n          ..write('label: $label, ')\n          ..write('lastUpdateTime: $lastUpdateTime')\n          ..write(')'))\n        .toString();\n  }\n\n  @override\n  int get hashCode => Object.hash(id, label, lastUpdateTime);\n  @override\n  bool operator ==(Object other) =>\n      identical(this, other) ||\n      (other is RawScript &&\n          other.id == this.id &&\n          other.label == this.label &&\n          other.lastUpdateTime == this.lastUpdateTime);\n}\n\nclass ScriptsCompanion extends UpdateCompanion<RawScript> {\n  final Value<int> id;\n  final Value<String> label;\n  final Value<DateTime> lastUpdateTime;\n  const ScriptsCompanion({\n    this.id = const Value.absent(),\n    this.label = const Value.absent(),\n    this.lastUpdateTime = const Value.absent(),\n  });\n  ScriptsCompanion.insert({\n    this.id = const Value.absent(),\n    required String label,\n    required DateTime lastUpdateTime,\n  }) : label = Value(label),\n       lastUpdateTime = Value(lastUpdateTime);\n  static Insertable<RawScript> custom({\n    Expression<int>? id,\n    Expression<String>? label,\n    Expression<DateTime>? lastUpdateTime,\n  }) {\n    return RawValuesInsertable({\n      if (id != null) 'id': id,\n      if (label != null) 'label': label,\n      if (lastUpdateTime != null) 'last_update_time': lastUpdateTime,\n    });\n  }\n\n  ScriptsCompanion copyWith({\n    Value<int>? id,\n    Value<String>? label,\n    Value<DateTime>? lastUpdateTime,\n  }) {\n    return ScriptsCompanion(\n      id: id ?? this.id,\n      label: label ?? this.label,\n      lastUpdateTime: lastUpdateTime ?? this.lastUpdateTime,\n    );\n  }\n\n  @override\n  Map<String, Expression> toColumns(bool nullToAbsent) {\n    final map = <String, Expression>{};\n    if (id.present) {\n      map['id'] = Variable<int>(id.value);\n    }\n    if (label.present) {\n      map['label'] = Variable<String>(label.value);\n    }\n    if (lastUpdateTime.present) {\n      map['last_update_time'] = Variable<DateTime>(lastUpdateTime.value);\n    }\n    return map;\n  }\n\n  @override\n  String toString() {\n    return (StringBuffer('ScriptsCompanion(')\n          ..write('id: $id, ')\n          ..write('label: $label, ')\n          ..write('lastUpdateTime: $lastUpdateTime')\n          ..write(')'))\n        .toString();\n  }\n}\n\nclass $RulesTable extends Rules with TableInfo<$RulesTable, RawRule> {\n  @override\n  final GeneratedDatabase attachedDatabase;\n  final String? _alias;\n  $RulesTable(this.attachedDatabase, [this._alias]);\n  static const VerificationMeta _idMeta = const VerificationMeta('id');\n  @override\n  late final GeneratedColumn<int> id = GeneratedColumn<int>(\n    'id',\n    aliasedName,\n    false,\n    type: DriftSqlType.int,\n    requiredDuringInsert: false,\n  );\n  static const VerificationMeta _valueMeta = const VerificationMeta('value');\n  @override\n  late final GeneratedColumn<String> value = GeneratedColumn<String>(\n    'value',\n    aliasedName,\n    false,\n    type: DriftSqlType.string,\n    requiredDuringInsert: true,\n  );\n  @override\n  List<GeneratedColumn> get $columns => [id, value];\n  @override\n  String get aliasedName => _alias ?? actualTableName;\n  @override\n  String get actualTableName => $name;\n  static const String $name = 'rules';\n  @override\n  VerificationContext validateIntegrity(\n    Insertable<RawRule> instance, {\n    bool isInserting = false,\n  }) {\n    final context = VerificationContext();\n    final data = instance.toColumns(true);\n    if (data.containsKey('id')) {\n      context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));\n    }\n    if (data.containsKey('value')) {\n      context.handle(\n        _valueMeta,\n        value.isAcceptableOrUnknown(data['value']!, _valueMeta),\n      );\n    } else if (isInserting) {\n      context.missing(_valueMeta);\n    }\n    return context;\n  }\n\n  @override\n  Set<GeneratedColumn> get $primaryKey => {id};\n  @override\n  RawRule map(Map<String, dynamic> data, {String? tablePrefix}) {\n    final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';\n    return RawRule(\n      id: attachedDatabase.typeMapping.read(\n        DriftSqlType.int,\n        data['${effectivePrefix}id'],\n      )!,\n      value: attachedDatabase.typeMapping.read(\n        DriftSqlType.string,\n        data['${effectivePrefix}value'],\n      )!,\n    );\n  }\n\n  @override\n  $RulesTable createAlias(String alias) {\n    return $RulesTable(attachedDatabase, alias);\n  }\n}\n\nclass RawRule extends DataClass implements Insertable<RawRule> {\n  final int id;\n  final String value;\n  const RawRule({required this.id, required this.value});\n  @override\n  Map<String, Expression> toColumns(bool nullToAbsent) {\n    final map = <String, Expression>{};\n    map['id'] = Variable<int>(id);\n    map['value'] = Variable<String>(value);\n    return map;\n  }\n\n  RulesCompanion toCompanion(bool nullToAbsent) {\n    return RulesCompanion(id: Value(id), value: Value(value));\n  }\n\n  factory RawRule.fromJson(\n    Map<String, dynamic> json, {\n    ValueSerializer? serializer,\n  }) {\n    serializer ??= driftRuntimeOptions.defaultSerializer;\n    return RawRule(\n      id: serializer.fromJson<int>(json['id']),\n      value: serializer.fromJson<String>(json['value']),\n    );\n  }\n  @override\n  Map<String, dynamic> toJson({ValueSerializer? serializer}) {\n    serializer ??= driftRuntimeOptions.defaultSerializer;\n    return <String, dynamic>{\n      'id': serializer.toJson<int>(id),\n      'value': serializer.toJson<String>(value),\n    };\n  }\n\n  RawRule copyWith({int? id, String? value}) =>\n      RawRule(id: id ?? this.id, value: value ?? this.value);\n  RawRule copyWithCompanion(RulesCompanion data) {\n    return RawRule(\n      id: data.id.present ? data.id.value : this.id,\n      value: data.value.present ? data.value.value : this.value,\n    );\n  }\n\n  @override\n  String toString() {\n    return (StringBuffer('RawRule(')\n          ..write('id: $id, ')\n          ..write('value: $value')\n          ..write(')'))\n        .toString();\n  }\n\n  @override\n  int get hashCode => Object.hash(id, value);\n  @override\n  bool operator ==(Object other) =>\n      identical(this, other) ||\n      (other is RawRule && other.id == this.id && other.value == this.value);\n}\n\nclass RulesCompanion extends UpdateCompanion<RawRule> {\n  final Value<int> id;\n  final Value<String> value;\n  const RulesCompanion({\n    this.id = const Value.absent(),\n    this.value = const Value.absent(),\n  });\n  RulesCompanion.insert({this.id = const Value.absent(), required String value})\n    : value = Value(value);\n  static Insertable<RawRule> custom({\n    Expression<int>? id,\n    Expression<String>? value,\n  }) {\n    return RawValuesInsertable({\n      if (id != null) 'id': id,\n      if (value != null) 'value': value,\n    });\n  }\n\n  RulesCompanion copyWith({Value<int>? id, Value<String>? value}) {\n    return RulesCompanion(id: id ?? this.id, value: value ?? this.value);\n  }\n\n  @override\n  Map<String, Expression> toColumns(bool nullToAbsent) {\n    final map = <String, Expression>{};\n    if (id.present) {\n      map['id'] = Variable<int>(id.value);\n    }\n    if (value.present) {\n      map['value'] = Variable<String>(value.value);\n    }\n    return map;\n  }\n\n  @override\n  String toString() {\n    return (StringBuffer('RulesCompanion(')\n          ..write('id: $id, ')\n          ..write('value: $value')\n          ..write(')'))\n        .toString();\n  }\n}\n\nclass $ProfileRuleLinksTable extends ProfileRuleLinks\n    with TableInfo<$ProfileRuleLinksTable, RawProfileRuleLink> {\n  @override\n  final GeneratedDatabase attachedDatabase;\n  final String? _alias;\n  $ProfileRuleLinksTable(this.attachedDatabase, [this._alias]);\n  static const VerificationMeta _idMeta = const VerificationMeta('id');\n  @override\n  late final GeneratedColumn<String> id = GeneratedColumn<String>(\n    'id',\n    aliasedName,\n    false,\n    type: DriftSqlType.string,\n    requiredDuringInsert: true,\n  );\n  static const VerificationMeta _profileIdMeta = const VerificationMeta(\n    'profileId',\n  );\n  @override\n  late final GeneratedColumn<int> profileId = GeneratedColumn<int>(\n    'profile_id',\n    aliasedName,\n    true,\n    type: DriftSqlType.int,\n    requiredDuringInsert: false,\n    defaultConstraints: GeneratedColumn.constraintIsAlways(\n      'REFERENCES profiles (id) ON DELETE CASCADE',\n    ),\n  );\n  static const VerificationMeta _ruleIdMeta = const VerificationMeta('ruleId');\n  @override\n  late final GeneratedColumn<int> ruleId = GeneratedColumn<int>(\n    'rule_id',\n    aliasedName,\n    false,\n    type: DriftSqlType.int,\n    requiredDuringInsert: true,\n    defaultConstraints: GeneratedColumn.constraintIsAlways(\n      'REFERENCES rules (id) ON DELETE CASCADE',\n    ),\n  );\n  @override\n  late final GeneratedColumnWithTypeConverter<RuleScene?, String> scene =\n      GeneratedColumn<String>(\n        'scene',\n        aliasedName,\n        true,\n        type: DriftSqlType.string,\n        requiredDuringInsert: false,\n      ).withConverter<RuleScene?>($ProfileRuleLinksTable.$converterscenen);\n  static const VerificationMeta _orderMeta = const VerificationMeta('order');\n  @override\n  late final GeneratedColumn<String> order = GeneratedColumn<String>(\n    'order',\n    aliasedName,\n    true,\n    type: DriftSqlType.string,\n    requiredDuringInsert: false,\n  );\n  @override\n  List<GeneratedColumn> get $columns => [id, profileId, ruleId, scene, order];\n  @override\n  String get aliasedName => _alias ?? actualTableName;\n  @override\n  String get actualTableName => $name;\n  static const String $name = 'profile_rule_mapping';\n  @override\n  VerificationContext validateIntegrity(\n    Insertable<RawProfileRuleLink> instance, {\n    bool isInserting = false,\n  }) {\n    final context = VerificationContext();\n    final data = instance.toColumns(true);\n    if (data.containsKey('id')) {\n      context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));\n    } else if (isInserting) {\n      context.missing(_idMeta);\n    }\n    if (data.containsKey('profile_id')) {\n      context.handle(\n        _profileIdMeta,\n        profileId.isAcceptableOrUnknown(data['profile_id']!, _profileIdMeta),\n      );\n    }\n    if (data.containsKey('rule_id')) {\n      context.handle(\n        _ruleIdMeta,\n        ruleId.isAcceptableOrUnknown(data['rule_id']!, _ruleIdMeta),\n      );\n    } else if (isInserting) {\n      context.missing(_ruleIdMeta);\n    }\n    if (data.containsKey('order')) {\n      context.handle(\n        _orderMeta,\n        order.isAcceptableOrUnknown(data['order']!, _orderMeta),\n      );\n    }\n    return context;\n  }\n\n  @override\n  Set<GeneratedColumn> get $primaryKey => {id};\n  @override\n  RawProfileRuleLink map(Map<String, dynamic> data, {String? tablePrefix}) {\n    final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';\n    return RawProfileRuleLink(\n      id: attachedDatabase.typeMapping.read(\n        DriftSqlType.string,\n        data['${effectivePrefix}id'],\n      )!,\n      profileId: attachedDatabase.typeMapping.read(\n        DriftSqlType.int,\n        data['${effectivePrefix}profile_id'],\n      ),\n      ruleId: attachedDatabase.typeMapping.read(\n        DriftSqlType.int,\n        data['${effectivePrefix}rule_id'],\n      )!,\n      scene: $ProfileRuleLinksTable.$converterscenen.fromSql(\n        attachedDatabase.typeMapping.read(\n          DriftSqlType.string,\n          data['${effectivePrefix}scene'],\n        ),\n      ),\n      order: attachedDatabase.typeMapping.read(\n        DriftSqlType.string,\n        data['${effectivePrefix}order'],\n      ),\n    );\n  }\n\n  @override\n  $ProfileRuleLinksTable createAlias(String alias) {\n    return $ProfileRuleLinksTable(attachedDatabase, alias);\n  }\n\n  static JsonTypeConverter2<RuleScene, String, String> $converterscene =\n      const EnumNameConverter<RuleScene>(RuleScene.values);\n  static JsonTypeConverter2<RuleScene?, String?, String?> $converterscenen =\n      JsonTypeConverter2.asNullable($converterscene);\n}\n\nclass RawProfileRuleLink extends DataClass\n    implements Insertable<RawProfileRuleLink> {\n  final String id;\n  final int? profileId;\n  final int ruleId;\n  final RuleScene? scene;\n  final String? order;\n  const RawProfileRuleLink({\n    required this.id,\n    this.profileId,\n    required this.ruleId,\n    this.scene,\n    this.order,\n  });\n  @override\n  Map<String, Expression> toColumns(bool nullToAbsent) {\n    final map = <String, Expression>{};\n    map['id'] = Variable<String>(id);\n    if (!nullToAbsent || profileId != null) {\n      map['profile_id'] = Variable<int>(profileId);\n    }\n    map['rule_id'] = Variable<int>(ruleId);\n    if (!nullToAbsent || scene != null) {\n      map['scene'] = Variable<String>(\n        $ProfileRuleLinksTable.$converterscenen.toSql(scene),\n      );\n    }\n    if (!nullToAbsent || order != null) {\n      map['order'] = Variable<String>(order);\n    }\n    return map;\n  }\n\n  ProfileRuleLinksCompanion toCompanion(bool nullToAbsent) {\n    return ProfileRuleLinksCompanion(\n      id: Value(id),\n      profileId: profileId == null && nullToAbsent\n          ? const Value.absent()\n          : Value(profileId),\n      ruleId: Value(ruleId),\n      scene: scene == null && nullToAbsent\n          ? const Value.absent()\n          : Value(scene),\n      order: order == null && nullToAbsent\n          ? const Value.absent()\n          : Value(order),\n    );\n  }\n\n  factory RawProfileRuleLink.fromJson(\n    Map<String, dynamic> json, {\n    ValueSerializer? serializer,\n  }) {\n    serializer ??= driftRuntimeOptions.defaultSerializer;\n    return RawProfileRuleLink(\n      id: serializer.fromJson<String>(json['id']),\n      profileId: serializer.fromJson<int?>(json['profileId']),\n      ruleId: serializer.fromJson<int>(json['ruleId']),\n      scene: $ProfileRuleLinksTable.$converterscenen.fromJson(\n        serializer.fromJson<String?>(json['scene']),\n      ),\n      order: serializer.fromJson<String?>(json['order']),\n    );\n  }\n  @override\n  Map<String, dynamic> toJson({ValueSerializer? serializer}) {\n    serializer ??= driftRuntimeOptions.defaultSerializer;\n    return <String, dynamic>{\n      'id': serializer.toJson<String>(id),\n      'profileId': serializer.toJson<int?>(profileId),\n      'ruleId': serializer.toJson<int>(ruleId),\n      'scene': serializer.toJson<String?>(\n        $ProfileRuleLinksTable.$converterscenen.toJson(scene),\n      ),\n      'order': serializer.toJson<String?>(order),\n    };\n  }\n\n  RawProfileRuleLink copyWith({\n    String? id,\n    Value<int?> profileId = const Value.absent(),\n    int? ruleId,\n    Value<RuleScene?> scene = const Value.absent(),\n    Value<String?> order = const Value.absent(),\n  }) => RawProfileRuleLink(\n    id: id ?? this.id,\n    profileId: profileId.present ? profileId.value : this.profileId,\n    ruleId: ruleId ?? this.ruleId,\n    scene: scene.present ? scene.value : this.scene,\n    order: order.present ? order.value : this.order,\n  );\n  RawProfileRuleLink copyWithCompanion(ProfileRuleLinksCompanion data) {\n    return RawProfileRuleLink(\n      id: data.id.present ? data.id.value : this.id,\n      profileId: data.profileId.present ? data.profileId.value : this.profileId,\n      ruleId: data.ruleId.present ? data.ruleId.value : this.ruleId,\n      scene: data.scene.present ? data.scene.value : this.scene,\n      order: data.order.present ? data.order.value : this.order,\n    );\n  }\n\n  @override\n  String toString() {\n    return (StringBuffer('RawProfileRuleLink(')\n          ..write('id: $id, ')\n          ..write('profileId: $profileId, ')\n          ..write('ruleId: $ruleId, ')\n          ..write('scene: $scene, ')\n          ..write('order: $order')\n          ..write(')'))\n        .toString();\n  }\n\n  @override\n  int get hashCode => Object.hash(id, profileId, ruleId, scene, order);\n  @override\n  bool operator ==(Object other) =>\n      identical(this, other) ||\n      (other is RawProfileRuleLink &&\n          other.id == this.id &&\n          other.profileId == this.profileId &&\n          other.ruleId == this.ruleId &&\n          other.scene == this.scene &&\n          other.order == this.order);\n}\n\nclass ProfileRuleLinksCompanion extends UpdateCompanion<RawProfileRuleLink> {\n  final Value<String> id;\n  final Value<int?> profileId;\n  final Value<int> ruleId;\n  final Value<RuleScene?> scene;\n  final Value<String?> order;\n  final Value<int> rowid;\n  const ProfileRuleLinksCompanion({\n    this.id = const Value.absent(),\n    this.profileId = const Value.absent(),\n    this.ruleId = const Value.absent(),\n    this.scene = const Value.absent(),\n    this.order = const Value.absent(),\n    this.rowid = const Value.absent(),\n  });\n  ProfileRuleLinksCompanion.insert({\n    required String id,\n    this.profileId = const Value.absent(),\n    required int ruleId,\n    this.scene = const Value.absent(),\n    this.order = const Value.absent(),\n    this.rowid = const Value.absent(),\n  }) : id = Value(id),\n       ruleId = Value(ruleId);\n  static Insertable<RawProfileRuleLink> custom({\n    Expression<String>? id,\n    Expression<int>? profileId,\n    Expression<int>? ruleId,\n    Expression<String>? scene,\n    Expression<String>? order,\n    Expression<int>? rowid,\n  }) {\n    return RawValuesInsertable({\n      if (id != null) 'id': id,\n      if (profileId != null) 'profile_id': profileId,\n      if (ruleId != null) 'rule_id': ruleId,\n      if (scene != null) 'scene': scene,\n      if (order != null) 'order': order,\n      if (rowid != null) 'rowid': rowid,\n    });\n  }\n\n  ProfileRuleLinksCompanion copyWith({\n    Value<String>? id,\n    Value<int?>? profileId,\n    Value<int>? ruleId,\n    Value<RuleScene?>? scene,\n    Value<String?>? order,\n    Value<int>? rowid,\n  }) {\n    return ProfileRuleLinksCompanion(\n      id: id ?? this.id,\n      profileId: profileId ?? this.profileId,\n      ruleId: ruleId ?? this.ruleId,\n      scene: scene ?? this.scene,\n      order: order ?? this.order,\n      rowid: rowid ?? this.rowid,\n    );\n  }\n\n  @override\n  Map<String, Expression> toColumns(bool nullToAbsent) {\n    final map = <String, Expression>{};\n    if (id.present) {\n      map['id'] = Variable<String>(id.value);\n    }\n    if (profileId.present) {\n      map['profile_id'] = Variable<int>(profileId.value);\n    }\n    if (ruleId.present) {\n      map['rule_id'] = Variable<int>(ruleId.value);\n    }\n    if (scene.present) {\n      map['scene'] = Variable<String>(\n        $ProfileRuleLinksTable.$converterscenen.toSql(scene.value),\n      );\n    }\n    if (order.present) {\n      map['order'] = Variable<String>(order.value);\n    }\n    if (rowid.present) {\n      map['rowid'] = Variable<int>(rowid.value);\n    }\n    return map;\n  }\n\n  @override\n  String toString() {\n    return (StringBuffer('ProfileRuleLinksCompanion(')\n          ..write('id: $id, ')\n          ..write('profileId: $profileId, ')\n          ..write('ruleId: $ruleId, ')\n          ..write('scene: $scene, ')\n          ..write('order: $order, ')\n          ..write('rowid: $rowid')\n          ..write(')'))\n        .toString();\n  }\n}\n\nabstract class _$Database extends GeneratedDatabase {\n  _$Database(QueryExecutor e) : super(e);\n  $DatabaseManager get managers => $DatabaseManager(this);\n  late final $ProfilesTable profiles = $ProfilesTable(this);\n  late final $ScriptsTable scripts = $ScriptsTable(this);\n  late final $RulesTable rules = $RulesTable(this);\n  late final $ProfileRuleLinksTable profileRuleLinks = $ProfileRuleLinksTable(\n    this,\n  );\n  late final Index idxProfileSceneOrder = Index(\n    'idx_profile_scene_order',\n    'CREATE INDEX idx_profile_scene_order ON profile_rule_mapping (profile_id, scene, \"order\")',\n  );\n  late final ProfilesDao profilesDao = ProfilesDao(this as Database);\n  late final ScriptsDao scriptsDao = ScriptsDao(this as Database);\n  late final RulesDao rulesDao = RulesDao(this as Database);\n  @override\n  Iterable<TableInfo<Table, Object?>> get allTables =>\n      allSchemaEntities.whereType<TableInfo<Table, Object?>>();\n  @override\n  List<DatabaseSchemaEntity> get allSchemaEntities => [\n    profiles,\n    scripts,\n    rules,\n    profileRuleLinks,\n    idxProfileSceneOrder,\n  ];\n  @override\n  StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([\n    WritePropagation(\n      on: TableUpdateQuery.onTableName(\n        'profiles',\n        limitUpdateKind: UpdateKind.delete,\n      ),\n      result: [TableUpdate('profile_rule_mapping', kind: UpdateKind.delete)],\n    ),\n    WritePropagation(\n      on: TableUpdateQuery.onTableName(\n        'rules',\n        limitUpdateKind: UpdateKind.delete,\n      ),\n      result: [TableUpdate('profile_rule_mapping', kind: UpdateKind.delete)],\n    ),\n  ]);\n}\n\ntypedef $$ProfilesTableCreateCompanionBuilder =\n    ProfilesCompanion Function({\n      Value<int> id,\n      required String label,\n      Value<String?> currentGroupName,\n      required String url,\n      Value<DateTime?> lastUpdateDate,\n      required OverwriteType overwriteType,\n      Value<int?> scriptId,\n      required int autoUpdateDurationMillis,\n      Value<SubscriptionInfo?> subscriptionInfo,\n      required bool autoUpdate,\n      required Map<String, String> selectedMap,\n      required Set<String> unfoldSet,\n      Value<int?> order,\n    });\ntypedef $$ProfilesTableUpdateCompanionBuilder =\n    ProfilesCompanion Function({\n      Value<int> id,\n      Value<String> label,\n      Value<String?> currentGroupName,\n      Value<String> url,\n      Value<DateTime?> lastUpdateDate,\n      Value<OverwriteType> overwriteType,\n      Value<int?> scriptId,\n      Value<int> autoUpdateDurationMillis,\n      Value<SubscriptionInfo?> subscriptionInfo,\n      Value<bool> autoUpdate,\n      Value<Map<String, String>> selectedMap,\n      Value<Set<String>> unfoldSet,\n      Value<int?> order,\n    });\n\nfinal class $$ProfilesTableReferences\n    extends BaseReferences<_$Database, $ProfilesTable, RawProfile> {\n  $$ProfilesTableReferences(super.$_db, super.$_table, super.$_typedResult);\n\n  static MultiTypedResultKey<$ProfileRuleLinksTable, List<RawProfileRuleLink>>\n  _profileRuleLinksRefsTable(_$Database db) => MultiTypedResultKey.fromTable(\n    db.profileRuleLinks,\n    aliasName: $_aliasNameGenerator(\n      db.profiles.id,\n      db.profileRuleLinks.profileId,\n    ),\n  );\n\n  $$ProfileRuleLinksTableProcessedTableManager get profileRuleLinksRefs {\n    final manager = $$ProfileRuleLinksTableTableManager(\n      $_db,\n      $_db.profileRuleLinks,\n    ).filter((f) => f.profileId.id.sqlEquals($_itemColumn<int>('id')!));\n\n    final cache = $_typedResult.readTableOrNull(\n      _profileRuleLinksRefsTable($_db),\n    );\n    return ProcessedTableManager(\n      manager.$state.copyWith(prefetchedData: cache),\n    );\n  }\n}\n\nclass $$ProfilesTableFilterComposer\n    extends Composer<_$Database, $ProfilesTable> {\n  $$ProfilesTableFilterComposer({\n    required super.$db,\n    required super.$table,\n    super.joinBuilder,\n    super.$addJoinBuilderToRootComposer,\n    super.$removeJoinBuilderFromRootComposer,\n  });\n  ColumnFilters<int> get id => $composableBuilder(\n    column: $table.id,\n    builder: (column) => ColumnFilters(column),\n  );\n\n  ColumnFilters<String> get label => $composableBuilder(\n    column: $table.label,\n    builder: (column) => ColumnFilters(column),\n  );\n\n  ColumnFilters<String> get currentGroupName => $composableBuilder(\n    column: $table.currentGroupName,\n    builder: (column) => ColumnFilters(column),\n  );\n\n  ColumnFilters<String> get url => $composableBuilder(\n    column: $table.url,\n    builder: (column) => ColumnFilters(column),\n  );\n\n  ColumnFilters<DateTime> get lastUpdateDate => $composableBuilder(\n    column: $table.lastUpdateDate,\n    builder: (column) => ColumnFilters(column),\n  );\n\n  ColumnWithTypeConverterFilters<OverwriteType, OverwriteType, String>\n  get overwriteType => $composableBuilder(\n    column: $table.overwriteType,\n    builder: (column) => ColumnWithTypeConverterFilters(column),\n  );\n\n  ColumnFilters<int> get scriptId => $composableBuilder(\n    column: $table.scriptId,\n    builder: (column) => ColumnFilters(column),\n  );\n\n  ColumnFilters<int> get autoUpdateDurationMillis => $composableBuilder(\n    column: $table.autoUpdateDurationMillis,\n    builder: (column) => ColumnFilters(column),\n  );\n\n  ColumnWithTypeConverterFilters<SubscriptionInfo?, SubscriptionInfo, String>\n  get subscriptionInfo => $composableBuilder(\n    column: $table.subscriptionInfo,\n    builder: (column) => ColumnWithTypeConverterFilters(column),\n  );\n\n  ColumnFilters<bool> get autoUpdate => $composableBuilder(\n    column: $table.autoUpdate,\n    builder: (column) => ColumnFilters(column),\n  );\n\n  ColumnWithTypeConverterFilters<\n    Map<String, String>,\n    Map<String, String>,\n    String\n  >\n  get selectedMap => $composableBuilder(\n    column: $table.selectedMap,\n    builder: (column) => ColumnWithTypeConverterFilters(column),\n  );\n\n  ColumnWithTypeConverterFilters<Set<String>, Set<String>, String>\n  get unfoldSet => $composableBuilder(\n    column: $table.unfoldSet,\n    builder: (column) => ColumnWithTypeConverterFilters(column),\n  );\n\n  ColumnFilters<int> get order => $composableBuilder(\n    column: $table.order,\n    builder: (column) => ColumnFilters(column),\n  );\n\n  Expression<bool> profileRuleLinksRefs(\n    Expression<bool> Function($$ProfileRuleLinksTableFilterComposer f) f,\n  ) {\n    final $$ProfileRuleLinksTableFilterComposer composer = $composerBuilder(\n      composer: this,\n      getCurrentColumn: (t) => t.id,\n      referencedTable: $db.profileRuleLinks,\n      getReferencedColumn: (t) => t.profileId,\n      builder:\n          (\n            joinBuilder, {\n            $addJoinBuilderToRootComposer,\n            $removeJoinBuilderFromRootComposer,\n          }) => $$ProfileRuleLinksTableFilterComposer(\n            $db: $db,\n            $table: $db.profileRuleLinks,\n            $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,\n            joinBuilder: joinBuilder,\n            $removeJoinBuilderFromRootComposer:\n                $removeJoinBuilderFromRootComposer,\n          ),\n    );\n    return f(composer);\n  }\n}\n\nclass $$ProfilesTableOrderingComposer\n    extends Composer<_$Database, $ProfilesTable> {\n  $$ProfilesTableOrderingComposer({\n    required super.$db,\n    required super.$table,\n    super.joinBuilder,\n    super.$addJoinBuilderToRootComposer,\n    super.$removeJoinBuilderFromRootComposer,\n  });\n  ColumnOrderings<int> get id => $composableBuilder(\n    column: $table.id,\n    builder: (column) => ColumnOrderings(column),\n  );\n\n  ColumnOrderings<String> get label => $composableBuilder(\n    column: $table.label,\n    builder: (column) => ColumnOrderings(column),\n  );\n\n  ColumnOrderings<String> get currentGroupName => $composableBuilder(\n    column: $table.currentGroupName,\n    builder: (column) => ColumnOrderings(column),\n  );\n\n  ColumnOrderings<String> get url => $composableBuilder(\n    column: $table.url,\n    builder: (column) => ColumnOrderings(column),\n  );\n\n  ColumnOrderings<DateTime> get lastUpdateDate => $composableBuilder(\n    column: $table.lastUpdateDate,\n    builder: (column) => ColumnOrderings(column),\n  );\n\n  ColumnOrderings<String> get overwriteType => $composableBuilder(\n    column: $table.overwriteType,\n    builder: (column) => ColumnOrderings(column),\n  );\n\n  ColumnOrderings<int> get scriptId => $composableBuilder(\n    column: $table.scriptId,\n    builder: (column) => ColumnOrderings(column),\n  );\n\n  ColumnOrderings<int> get autoUpdateDurationMillis => $composableBuilder(\n    column: $table.autoUpdateDurationMillis,\n    builder: (column) => ColumnOrderings(column),\n  );\n\n  ColumnOrderings<String> get subscriptionInfo => $composableBuilder(\n    column: $table.subscriptionInfo,\n    builder: (column) => ColumnOrderings(column),\n  );\n\n  ColumnOrderings<bool> get autoUpdate => $composableBuilder(\n    column: $table.autoUpdate,\n    builder: (column) => ColumnOrderings(column),\n  );\n\n  ColumnOrderings<String> get selectedMap => $composableBuilder(\n    column: $table.selectedMap,\n    builder: (column) => ColumnOrderings(column),\n  );\n\n  ColumnOrderings<String> get unfoldSet => $composableBuilder(\n    column: $table.unfoldSet,\n    builder: (column) => ColumnOrderings(column),\n  );\n\n  ColumnOrderings<int> get order => $composableBuilder(\n    column: $table.order,\n    builder: (column) => ColumnOrderings(column),\n  );\n}\n\nclass $$ProfilesTableAnnotationComposer\n    extends Composer<_$Database, $ProfilesTable> {\n  $$ProfilesTableAnnotationComposer({\n    required super.$db,\n    required super.$table,\n    super.joinBuilder,\n    super.$addJoinBuilderToRootComposer,\n    super.$removeJoinBuilderFromRootComposer,\n  });\n  GeneratedColumn<int> get id =>\n      $composableBuilder(column: $table.id, builder: (column) => column);\n\n  GeneratedColumn<String> get label =>\n      $composableBuilder(column: $table.label, builder: (column) => column);\n\n  GeneratedColumn<String> get currentGroupName => $composableBuilder(\n    column: $table.currentGroupName,\n    builder: (column) => column,\n  );\n\n  GeneratedColumn<String> get url =>\n      $composableBuilder(column: $table.url, builder: (column) => column);\n\n  GeneratedColumn<DateTime> get lastUpdateDate => $composableBuilder(\n    column: $table.lastUpdateDate,\n    builder: (column) => column,\n  );\n\n  GeneratedColumnWithTypeConverter<OverwriteType, String> get overwriteType =>\n      $composableBuilder(\n        column: $table.overwriteType,\n        builder: (column) => column,\n      );\n\n  GeneratedColumn<int> get scriptId =>\n      $composableBuilder(column: $table.scriptId, builder: (column) => column);\n\n  GeneratedColumn<int> get autoUpdateDurationMillis => $composableBuilder(\n    column: $table.autoUpdateDurationMillis,\n    builder: (column) => column,\n  );\n\n  GeneratedColumnWithTypeConverter<SubscriptionInfo?, String>\n  get subscriptionInfo => $composableBuilder(\n    column: $table.subscriptionInfo,\n    builder: (column) => column,\n  );\n\n  GeneratedColumn<bool> get autoUpdate => $composableBuilder(\n    column: $table.autoUpdate,\n    builder: (column) => column,\n  );\n\n  GeneratedColumnWithTypeConverter<Map<String, String>, String>\n  get selectedMap => $composableBuilder(\n    column: $table.selectedMap,\n    builder: (column) => column,\n  );\n\n  GeneratedColumnWithTypeConverter<Set<String>, String> get unfoldSet =>\n      $composableBuilder(column: $table.unfoldSet, builder: (column) => column);\n\n  GeneratedColumn<int> get order =>\n      $composableBuilder(column: $table.order, builder: (column) => column);\n\n  Expression<T> profileRuleLinksRefs<T extends Object>(\n    Expression<T> Function($$ProfileRuleLinksTableAnnotationComposer a) f,\n  ) {\n    final $$ProfileRuleLinksTableAnnotationComposer composer = $composerBuilder(\n      composer: this,\n      getCurrentColumn: (t) => t.id,\n      referencedTable: $db.profileRuleLinks,\n      getReferencedColumn: (t) => t.profileId,\n      builder:\n          (\n            joinBuilder, {\n            $addJoinBuilderToRootComposer,\n            $removeJoinBuilderFromRootComposer,\n          }) => $$ProfileRuleLinksTableAnnotationComposer(\n            $db: $db,\n            $table: $db.profileRuleLinks,\n            $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,\n            joinBuilder: joinBuilder,\n            $removeJoinBuilderFromRootComposer:\n                $removeJoinBuilderFromRootComposer,\n          ),\n    );\n    return f(composer);\n  }\n}\n\nclass $$ProfilesTableTableManager\n    extends\n        RootTableManager<\n          _$Database,\n          $ProfilesTable,\n          RawProfile,\n          $$ProfilesTableFilterComposer,\n          $$ProfilesTableOrderingComposer,\n          $$ProfilesTableAnnotationComposer,\n          $$ProfilesTableCreateCompanionBuilder,\n          $$ProfilesTableUpdateCompanionBuilder,\n          (RawProfile, $$ProfilesTableReferences),\n          RawProfile,\n          PrefetchHooks Function({bool profileRuleLinksRefs})\n        > {\n  $$ProfilesTableTableManager(_$Database db, $ProfilesTable table)\n    : super(\n        TableManagerState(\n          db: db,\n          table: table,\n          createFilteringComposer: () =>\n              $$ProfilesTableFilterComposer($db: db, $table: table),\n          createOrderingComposer: () =>\n              $$ProfilesTableOrderingComposer($db: db, $table: table),\n          createComputedFieldComposer: () =>\n              $$ProfilesTableAnnotationComposer($db: db, $table: table),\n          updateCompanionCallback:\n              ({\n                Value<int> id = const Value.absent(),\n                Value<String> label = const Value.absent(),\n                Value<String?> currentGroupName = const Value.absent(),\n                Value<String> url = const Value.absent(),\n                Value<DateTime?> lastUpdateDate = const Value.absent(),\n                Value<OverwriteType> overwriteType = const Value.absent(),\n                Value<int?> scriptId = const Value.absent(),\n                Value<int> autoUpdateDurationMillis = const Value.absent(),\n                Value<SubscriptionInfo?> subscriptionInfo =\n                    const Value.absent(),\n                Value<bool> autoUpdate = const Value.absent(),\n                Value<Map<String, String>> selectedMap = const Value.absent(),\n                Value<Set<String>> unfoldSet = const Value.absent(),\n                Value<int?> order = const Value.absent(),\n              }) => ProfilesCompanion(\n                id: id,\n                label: label,\n                currentGroupName: currentGroupName,\n                url: url,\n                lastUpdateDate: lastUpdateDate,\n                overwriteType: overwriteType,\n                scriptId: scriptId,\n                autoUpdateDurationMillis: autoUpdateDurationMillis,\n                subscriptionInfo: subscriptionInfo,\n                autoUpdate: autoUpdate,\n                selectedMap: selectedMap,\n                unfoldSet: unfoldSet,\n                order: order,\n              ),\n          createCompanionCallback:\n              ({\n                Value<int> id = const Value.absent(),\n                required String label,\n                Value<String?> currentGroupName = const Value.absent(),\n                required String url,\n                Value<DateTime?> lastUpdateDate = const Value.absent(),\n                required OverwriteType overwriteType,\n                Value<int?> scriptId = const Value.absent(),\n                required int autoUpdateDurationMillis,\n                Value<SubscriptionInfo?> subscriptionInfo =\n                    const Value.absent(),\n                required bool autoUpdate,\n                required Map<String, String> selectedMap,\n                required Set<String> unfoldSet,\n                Value<int?> order = const Value.absent(),\n              }) => ProfilesCompanion.insert(\n                id: id,\n                label: label,\n                currentGroupName: currentGroupName,\n                url: url,\n                lastUpdateDate: lastUpdateDate,\n                overwriteType: overwriteType,\n                scriptId: scriptId,\n                autoUpdateDurationMillis: autoUpdateDurationMillis,\n                subscriptionInfo: subscriptionInfo,\n                autoUpdate: autoUpdate,\n                selectedMap: selectedMap,\n                unfoldSet: unfoldSet,\n                order: order,\n              ),\n          withReferenceMapper: (p0) => p0\n              .map(\n                (e) => (\n                  e.readTable(table),\n                  $$ProfilesTableReferences(db, table, e),\n                ),\n              )\n              .toList(),\n          prefetchHooksCallback: ({profileRuleLinksRefs = false}) {\n            return PrefetchHooks(\n              db: db,\n              explicitlyWatchedTables: [\n                if (profileRuleLinksRefs) db.profileRuleLinks,\n              ],\n              addJoins: null,\n              getPrefetchedDataCallback: (items) async {\n                return [\n                  if (profileRuleLinksRefs)\n                    await $_getPrefetchedData<\n                      RawProfile,\n                      $ProfilesTable,\n                      RawProfileRuleLink\n                    >(\n                      currentTable: table,\n                      referencedTable: $$ProfilesTableReferences\n                          ._profileRuleLinksRefsTable(db),\n                      managerFromTypedResult: (p0) => $$ProfilesTableReferences(\n                        db,\n                        table,\n                        p0,\n                      ).profileRuleLinksRefs,\n                      referencedItemsForCurrentItem: (item, referencedItems) =>\n                          referencedItems.where((e) => e.profileId == item.id),\n                      typedResults: items,\n                    ),\n                ];\n              },\n            );\n          },\n        ),\n      );\n}\n\ntypedef $$ProfilesTableProcessedTableManager =\n    ProcessedTableManager<\n      _$Database,\n      $ProfilesTable,\n      RawProfile,\n      $$ProfilesTableFilterComposer,\n      $$ProfilesTableOrderingComposer,\n      $$ProfilesTableAnnotationComposer,\n      $$ProfilesTableCreateCompanionBuilder,\n      $$ProfilesTableUpdateCompanionBuilder,\n      (RawProfile, $$ProfilesTableReferences),\n      RawProfile,\n      PrefetchHooks Function({bool profileRuleLinksRefs})\n    >;\ntypedef $$ScriptsTableCreateCompanionBuilder =\n    ScriptsCompanion Function({\n      Value<int> id,\n      required String label,\n      required DateTime lastUpdateTime,\n    });\ntypedef $$ScriptsTableUpdateCompanionBuilder =\n    ScriptsCompanion Function({\n      Value<int> id,\n      Value<String> label,\n      Value<DateTime> lastUpdateTime,\n    });\n\nclass $$ScriptsTableFilterComposer extends Composer<_$Database, $ScriptsTable> {\n  $$ScriptsTableFilterComposer({\n    required super.$db,\n    required super.$table,\n    super.joinBuilder,\n    super.$addJoinBuilderToRootComposer,\n    super.$removeJoinBuilderFromRootComposer,\n  });\n  ColumnFilters<int> get id => $composableBuilder(\n    column: $table.id,\n    builder: (column) => ColumnFilters(column),\n  );\n\n  ColumnFilters<String> get label => $composableBuilder(\n    column: $table.label,\n    builder: (column) => ColumnFilters(column),\n  );\n\n  ColumnFilters<DateTime> get lastUpdateTime => $composableBuilder(\n    column: $table.lastUpdateTime,\n    builder: (column) => ColumnFilters(column),\n  );\n}\n\nclass $$ScriptsTableOrderingComposer\n    extends Composer<_$Database, $ScriptsTable> {\n  $$ScriptsTableOrderingComposer({\n    required super.$db,\n    required super.$table,\n    super.joinBuilder,\n    super.$addJoinBuilderToRootComposer,\n    super.$removeJoinBuilderFromRootComposer,\n  });\n  ColumnOrderings<int> get id => $composableBuilder(\n    column: $table.id,\n    builder: (column) => ColumnOrderings(column),\n  );\n\n  ColumnOrderings<String> get label => $composableBuilder(\n    column: $table.label,\n    builder: (column) => ColumnOrderings(column),\n  );\n\n  ColumnOrderings<DateTime> get lastUpdateTime => $composableBuilder(\n    column: $table.lastUpdateTime,\n    builder: (column) => ColumnOrderings(column),\n  );\n}\n\nclass $$ScriptsTableAnnotationComposer\n    extends Composer<_$Database, $ScriptsTable> {\n  $$ScriptsTableAnnotationComposer({\n    required super.$db,\n    required super.$table,\n    super.joinBuilder,\n    super.$addJoinBuilderToRootComposer,\n    super.$removeJoinBuilderFromRootComposer,\n  });\n  GeneratedColumn<int> get id =>\n      $composableBuilder(column: $table.id, builder: (column) => column);\n\n  GeneratedColumn<String> get label =>\n      $composableBuilder(column: $table.label, builder: (column) => column);\n\n  GeneratedColumn<DateTime> get lastUpdateTime => $composableBuilder(\n    column: $table.lastUpdateTime,\n    builder: (column) => column,\n  );\n}\n\nclass $$ScriptsTableTableManager\n    extends\n        RootTableManager<\n          _$Database,\n          $ScriptsTable,\n          RawScript,\n          $$ScriptsTableFilterComposer,\n          $$ScriptsTableOrderingComposer,\n          $$ScriptsTableAnnotationComposer,\n          $$ScriptsTableCreateCompanionBuilder,\n          $$ScriptsTableUpdateCompanionBuilder,\n          (RawScript, BaseReferences<_$Database, $ScriptsTable, RawScript>),\n          RawScript,\n          PrefetchHooks Function()\n        > {\n  $$ScriptsTableTableManager(_$Database db, $ScriptsTable table)\n    : super(\n        TableManagerState(\n          db: db,\n          table: table,\n          createFilteringComposer: () =>\n              $$ScriptsTableFilterComposer($db: db, $table: table),\n          createOrderingComposer: () =>\n              $$ScriptsTableOrderingComposer($db: db, $table: table),\n          createComputedFieldComposer: () =>\n              $$ScriptsTableAnnotationComposer($db: db, $table: table),\n          updateCompanionCallback:\n              ({\n                Value<int> id = const Value.absent(),\n                Value<String> label = const Value.absent(),\n                Value<DateTime> lastUpdateTime = const Value.absent(),\n              }) => ScriptsCompanion(\n                id: id,\n                label: label,\n                lastUpdateTime: lastUpdateTime,\n              ),\n          createCompanionCallback:\n              ({\n                Value<int> id = const Value.absent(),\n                required String label,\n                required DateTime lastUpdateTime,\n              }) => ScriptsCompanion.insert(\n                id: id,\n                label: label,\n                lastUpdateTime: lastUpdateTime,\n              ),\n          withReferenceMapper: (p0) => p0\n              .map((e) => (e.readTable(table), BaseReferences(db, table, e)))\n              .toList(),\n          prefetchHooksCallback: null,\n        ),\n      );\n}\n\ntypedef $$ScriptsTableProcessedTableManager =\n    ProcessedTableManager<\n      _$Database,\n      $ScriptsTable,\n      RawScript,\n      $$ScriptsTableFilterComposer,\n      $$ScriptsTableOrderingComposer,\n      $$ScriptsTableAnnotationComposer,\n      $$ScriptsTableCreateCompanionBuilder,\n      $$ScriptsTableUpdateCompanionBuilder,\n      (RawScript, BaseReferences<_$Database, $ScriptsTable, RawScript>),\n      RawScript,\n      PrefetchHooks Function()\n    >;\ntypedef $$RulesTableCreateCompanionBuilder =\n    RulesCompanion Function({Value<int> id, required String value});\ntypedef $$RulesTableUpdateCompanionBuilder =\n    RulesCompanion Function({Value<int> id, Value<String> value});\n\nfinal class $$RulesTableReferences\n    extends BaseReferences<_$Database, $RulesTable, RawRule> {\n  $$RulesTableReferences(super.$_db, super.$_table, super.$_typedResult);\n\n  static MultiTypedResultKey<$ProfileRuleLinksTable, List<RawProfileRuleLink>>\n  _profileRuleLinksRefsTable(_$Database db) => MultiTypedResultKey.fromTable(\n    db.profileRuleLinks,\n    aliasName: $_aliasNameGenerator(db.rules.id, db.profileRuleLinks.ruleId),\n  );\n\n  $$ProfileRuleLinksTableProcessedTableManager get profileRuleLinksRefs {\n    final manager = $$ProfileRuleLinksTableTableManager(\n      $_db,\n      $_db.profileRuleLinks,\n    ).filter((f) => f.ruleId.id.sqlEquals($_itemColumn<int>('id')!));\n\n    final cache = $_typedResult.readTableOrNull(\n      _profileRuleLinksRefsTable($_db),\n    );\n    return ProcessedTableManager(\n      manager.$state.copyWith(prefetchedData: cache),\n    );\n  }\n}\n\nclass $$RulesTableFilterComposer extends Composer<_$Database, $RulesTable> {\n  $$RulesTableFilterComposer({\n    required super.$db,\n    required super.$table,\n    super.joinBuilder,\n    super.$addJoinBuilderToRootComposer,\n    super.$removeJoinBuilderFromRootComposer,\n  });\n  ColumnFilters<int> get id => $composableBuilder(\n    column: $table.id,\n    builder: (column) => ColumnFilters(column),\n  );\n\n  ColumnFilters<String> get value => $composableBuilder(\n    column: $table.value,\n    builder: (column) => ColumnFilters(column),\n  );\n\n  Expression<bool> profileRuleLinksRefs(\n    Expression<bool> Function($$ProfileRuleLinksTableFilterComposer f) f,\n  ) {\n    final $$ProfileRuleLinksTableFilterComposer composer = $composerBuilder(\n      composer: this,\n      getCurrentColumn: (t) => t.id,\n      referencedTable: $db.profileRuleLinks,\n      getReferencedColumn: (t) => t.ruleId,\n      builder:\n          (\n            joinBuilder, {\n            $addJoinBuilderToRootComposer,\n            $removeJoinBuilderFromRootComposer,\n          }) => $$ProfileRuleLinksTableFilterComposer(\n            $db: $db,\n            $table: $db.profileRuleLinks,\n            $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,\n            joinBuilder: joinBuilder,\n            $removeJoinBuilderFromRootComposer:\n                $removeJoinBuilderFromRootComposer,\n          ),\n    );\n    return f(composer);\n  }\n}\n\nclass $$RulesTableOrderingComposer extends Composer<_$Database, $RulesTable> {\n  $$RulesTableOrderingComposer({\n    required super.$db,\n    required super.$table,\n    super.joinBuilder,\n    super.$addJoinBuilderToRootComposer,\n    super.$removeJoinBuilderFromRootComposer,\n  });\n  ColumnOrderings<int> get id => $composableBuilder(\n    column: $table.id,\n    builder: (column) => ColumnOrderings(column),\n  );\n\n  ColumnOrderings<String> get value => $composableBuilder(\n    column: $table.value,\n    builder: (column) => ColumnOrderings(column),\n  );\n}\n\nclass $$RulesTableAnnotationComposer extends Composer<_$Database, $RulesTable> {\n  $$RulesTableAnnotationComposer({\n    required super.$db,\n    required super.$table,\n    super.joinBuilder,\n    super.$addJoinBuilderToRootComposer,\n    super.$removeJoinBuilderFromRootComposer,\n  });\n  GeneratedColumn<int> get id =>\n      $composableBuilder(column: $table.id, builder: (column) => column);\n\n  GeneratedColumn<String> get value =>\n      $composableBuilder(column: $table.value, builder: (column) => column);\n\n  Expression<T> profileRuleLinksRefs<T extends Object>(\n    Expression<T> Function($$ProfileRuleLinksTableAnnotationComposer a) f,\n  ) {\n    final $$ProfileRuleLinksTableAnnotationComposer composer = $composerBuilder(\n      composer: this,\n      getCurrentColumn: (t) => t.id,\n      referencedTable: $db.profileRuleLinks,\n      getReferencedColumn: (t) => t.ruleId,\n      builder:\n          (\n            joinBuilder, {\n            $addJoinBuilderToRootComposer,\n            $removeJoinBuilderFromRootComposer,\n          }) => $$ProfileRuleLinksTableAnnotationComposer(\n            $db: $db,\n            $table: $db.profileRuleLinks,\n            $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,\n            joinBuilder: joinBuilder,\n            $removeJoinBuilderFromRootComposer:\n                $removeJoinBuilderFromRootComposer,\n          ),\n    );\n    return f(composer);\n  }\n}\n\nclass $$RulesTableTableManager\n    extends\n        RootTableManager<\n          _$Database,\n          $RulesTable,\n          RawRule,\n          $$RulesTableFilterComposer,\n          $$RulesTableOrderingComposer,\n          $$RulesTableAnnotationComposer,\n          $$RulesTableCreateCompanionBuilder,\n          $$RulesTableUpdateCompanionBuilder,\n          (RawRule, $$RulesTableReferences),\n          RawRule,\n          PrefetchHooks Function({bool profileRuleLinksRefs})\n        > {\n  $$RulesTableTableManager(_$Database db, $RulesTable table)\n    : super(\n        TableManagerState(\n          db: db,\n          table: table,\n          createFilteringComposer: () =>\n              $$RulesTableFilterComposer($db: db, $table: table),\n          createOrderingComposer: () =>\n              $$RulesTableOrderingComposer($db: db, $table: table),\n          createComputedFieldComposer: () =>\n              $$RulesTableAnnotationComposer($db: db, $table: table),\n          updateCompanionCallback:\n              ({\n                Value<int> id = const Value.absent(),\n                Value<String> value = const Value.absent(),\n              }) => RulesCompanion(id: id, value: value),\n          createCompanionCallback:\n              ({Value<int> id = const Value.absent(), required String value}) =>\n                  RulesCompanion.insert(id: id, value: value),\n          withReferenceMapper: (p0) => p0\n              .map(\n                (e) =>\n                    (e.readTable(table), $$RulesTableReferences(db, table, e)),\n              )\n              .toList(),\n          prefetchHooksCallback: ({profileRuleLinksRefs = false}) {\n            return PrefetchHooks(\n              db: db,\n              explicitlyWatchedTables: [\n                if (profileRuleLinksRefs) db.profileRuleLinks,\n              ],\n              addJoins: null,\n              getPrefetchedDataCallback: (items) async {\n                return [\n                  if (profileRuleLinksRefs)\n                    await $_getPrefetchedData<\n                      RawRule,\n                      $RulesTable,\n                      RawProfileRuleLink\n                    >(\n                      currentTable: table,\n                      referencedTable: $$RulesTableReferences\n                          ._profileRuleLinksRefsTable(db),\n                      managerFromTypedResult: (p0) => $$RulesTableReferences(\n                        db,\n                        table,\n                        p0,\n                      ).profileRuleLinksRefs,\n                      referencedItemsForCurrentItem: (item, referencedItems) =>\n                          referencedItems.where((e) => e.ruleId == item.id),\n                      typedResults: items,\n                    ),\n                ];\n              },\n            );\n          },\n        ),\n      );\n}\n\ntypedef $$RulesTableProcessedTableManager =\n    ProcessedTableManager<\n      _$Database,\n      $RulesTable,\n      RawRule,\n      $$RulesTableFilterComposer,\n      $$RulesTableOrderingComposer,\n      $$RulesTableAnnotationComposer,\n      $$RulesTableCreateCompanionBuilder,\n      $$RulesTableUpdateCompanionBuilder,\n      (RawRule, $$RulesTableReferences),\n      RawRule,\n      PrefetchHooks Function({bool profileRuleLinksRefs})\n    >;\ntypedef $$ProfileRuleLinksTableCreateCompanionBuilder =\n    ProfileRuleLinksCompanion Function({\n      required String id,\n      Value<int?> profileId,\n      required int ruleId,\n      Value<RuleScene?> scene,\n      Value<String?> order,\n      Value<int> rowid,\n    });\ntypedef $$ProfileRuleLinksTableUpdateCompanionBuilder =\n    ProfileRuleLinksCompanion Function({\n      Value<String> id,\n      Value<int?> profileId,\n      Value<int> ruleId,\n      Value<RuleScene?> scene,\n      Value<String?> order,\n      Value<int> rowid,\n    });\n\nfinal class $$ProfileRuleLinksTableReferences\n    extends\n        BaseReferences<_$Database, $ProfileRuleLinksTable, RawProfileRuleLink> {\n  $$ProfileRuleLinksTableReferences(\n    super.$_db,\n    super.$_table,\n    super.$_typedResult,\n  );\n\n  static $ProfilesTable _profileIdTable(_$Database db) =>\n      db.profiles.createAlias(\n        $_aliasNameGenerator(db.profileRuleLinks.profileId, db.profiles.id),\n      );\n\n  $$ProfilesTableProcessedTableManager? get profileId {\n    final $_column = $_itemColumn<int>('profile_id');\n    if ($_column == null) return null;\n    final manager = $$ProfilesTableTableManager(\n      $_db,\n      $_db.profiles,\n    ).filter((f) => f.id.sqlEquals($_column));\n    final item = $_typedResult.readTableOrNull(_profileIdTable($_db));\n    if (item == null) return manager;\n    return ProcessedTableManager(\n      manager.$state.copyWith(prefetchedData: [item]),\n    );\n  }\n\n  static $RulesTable _ruleIdTable(_$Database db) => db.rules.createAlias(\n    $_aliasNameGenerator(db.profileRuleLinks.ruleId, db.rules.id),\n  );\n\n  $$RulesTableProcessedTableManager get ruleId {\n    final $_column = $_itemColumn<int>('rule_id')!;\n\n    final manager = $$RulesTableTableManager(\n      $_db,\n      $_db.rules,\n    ).filter((f) => f.id.sqlEquals($_column));\n    final item = $_typedResult.readTableOrNull(_ruleIdTable($_db));\n    if (item == null) return manager;\n    return ProcessedTableManager(\n      manager.$state.copyWith(prefetchedData: [item]),\n    );\n  }\n}\n\nclass $$ProfileRuleLinksTableFilterComposer\n    extends Composer<_$Database, $ProfileRuleLinksTable> {\n  $$ProfileRuleLinksTableFilterComposer({\n    required super.$db,\n    required super.$table,\n    super.joinBuilder,\n    super.$addJoinBuilderToRootComposer,\n    super.$removeJoinBuilderFromRootComposer,\n  });\n  ColumnFilters<String> get id => $composableBuilder(\n    column: $table.id,\n    builder: (column) => ColumnFilters(column),\n  );\n\n  ColumnWithTypeConverterFilters<RuleScene?, RuleScene, String> get scene =>\n      $composableBuilder(\n        column: $table.scene,\n        builder: (column) => ColumnWithTypeConverterFilters(column),\n      );\n\n  ColumnFilters<String> get order => $composableBuilder(\n    column: $table.order,\n    builder: (column) => ColumnFilters(column),\n  );\n\n  $$ProfilesTableFilterComposer get profileId {\n    final $$ProfilesTableFilterComposer composer = $composerBuilder(\n      composer: this,\n      getCurrentColumn: (t) => t.profileId,\n      referencedTable: $db.profiles,\n      getReferencedColumn: (t) => t.id,\n      builder:\n          (\n            joinBuilder, {\n            $addJoinBuilderToRootComposer,\n            $removeJoinBuilderFromRootComposer,\n          }) => $$ProfilesTableFilterComposer(\n            $db: $db,\n            $table: $db.profiles,\n            $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,\n            joinBuilder: joinBuilder,\n            $removeJoinBuilderFromRootComposer:\n                $removeJoinBuilderFromRootComposer,\n          ),\n    );\n    return composer;\n  }\n\n  $$RulesTableFilterComposer get ruleId {\n    final $$RulesTableFilterComposer composer = $composerBuilder(\n      composer: this,\n      getCurrentColumn: (t) => t.ruleId,\n      referencedTable: $db.rules,\n      getReferencedColumn: (t) => t.id,\n      builder:\n          (\n            joinBuilder, {\n            $addJoinBuilderToRootComposer,\n            $removeJoinBuilderFromRootComposer,\n          }) => $$RulesTableFilterComposer(\n            $db: $db,\n            $table: $db.rules,\n            $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,\n            joinBuilder: joinBuilder,\n            $removeJoinBuilderFromRootComposer:\n                $removeJoinBuilderFromRootComposer,\n          ),\n    );\n    return composer;\n  }\n}\n\nclass $$ProfileRuleLinksTableOrderingComposer\n    extends Composer<_$Database, $ProfileRuleLinksTable> {\n  $$ProfileRuleLinksTableOrderingComposer({\n    required super.$db,\n    required super.$table,\n    super.joinBuilder,\n    super.$addJoinBuilderToRootComposer,\n    super.$removeJoinBuilderFromRootComposer,\n  });\n  ColumnOrderings<String> get id => $composableBuilder(\n    column: $table.id,\n    builder: (column) => ColumnOrderings(column),\n  );\n\n  ColumnOrderings<String> get scene => $composableBuilder(\n    column: $table.scene,\n    builder: (column) => ColumnOrderings(column),\n  );\n\n  ColumnOrderings<String> get order => $composableBuilder(\n    column: $table.order,\n    builder: (column) => ColumnOrderings(column),\n  );\n\n  $$ProfilesTableOrderingComposer get profileId {\n    final $$ProfilesTableOrderingComposer composer = $composerBuilder(\n      composer: this,\n      getCurrentColumn: (t) => t.profileId,\n      referencedTable: $db.profiles,\n      getReferencedColumn: (t) => t.id,\n      builder:\n          (\n            joinBuilder, {\n            $addJoinBuilderToRootComposer,\n            $removeJoinBuilderFromRootComposer,\n          }) => $$ProfilesTableOrderingComposer(\n            $db: $db,\n            $table: $db.profiles,\n            $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,\n            joinBuilder: joinBuilder,\n            $removeJoinBuilderFromRootComposer:\n                $removeJoinBuilderFromRootComposer,\n          ),\n    );\n    return composer;\n  }\n\n  $$RulesTableOrderingComposer get ruleId {\n    final $$RulesTableOrderingComposer composer = $composerBuilder(\n      composer: this,\n      getCurrentColumn: (t) => t.ruleId,\n      referencedTable: $db.rules,\n      getReferencedColumn: (t) => t.id,\n      builder:\n          (\n            joinBuilder, {\n            $addJoinBuilderToRootComposer,\n            $removeJoinBuilderFromRootComposer,\n          }) => $$RulesTableOrderingComposer(\n            $db: $db,\n            $table: $db.rules,\n            $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,\n            joinBuilder: joinBuilder,\n            $removeJoinBuilderFromRootComposer:\n                $removeJoinBuilderFromRootComposer,\n          ),\n    );\n    return composer;\n  }\n}\n\nclass $$ProfileRuleLinksTableAnnotationComposer\n    extends Composer<_$Database, $ProfileRuleLinksTable> {\n  $$ProfileRuleLinksTableAnnotationComposer({\n    required super.$db,\n    required super.$table,\n    super.joinBuilder,\n    super.$addJoinBuilderToRootComposer,\n    super.$removeJoinBuilderFromRootComposer,\n  });\n  GeneratedColumn<String> get id =>\n      $composableBuilder(column: $table.id, builder: (column) => column);\n\n  GeneratedColumnWithTypeConverter<RuleScene?, String> get scene =>\n      $composableBuilder(column: $table.scene, builder: (column) => column);\n\n  GeneratedColumn<String> get order =>\n      $composableBuilder(column: $table.order, builder: (column) => column);\n\n  $$ProfilesTableAnnotationComposer get profileId {\n    final $$ProfilesTableAnnotationComposer composer = $composerBuilder(\n      composer: this,\n      getCurrentColumn: (t) => t.profileId,\n      referencedTable: $db.profiles,\n      getReferencedColumn: (t) => t.id,\n      builder:\n          (\n            joinBuilder, {\n            $addJoinBuilderToRootComposer,\n            $removeJoinBuilderFromRootComposer,\n          }) => $$ProfilesTableAnnotationComposer(\n            $db: $db,\n            $table: $db.profiles,\n            $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,\n            joinBuilder: joinBuilder,\n            $removeJoinBuilderFromRootComposer:\n                $removeJoinBuilderFromRootComposer,\n          ),\n    );\n    return composer;\n  }\n\n  $$RulesTableAnnotationComposer get ruleId {\n    final $$RulesTableAnnotationComposer composer = $composerBuilder(\n      composer: this,\n      getCurrentColumn: (t) => t.ruleId,\n      referencedTable: $db.rules,\n      getReferencedColumn: (t) => t.id,\n      builder:\n          (\n            joinBuilder, {\n            $addJoinBuilderToRootComposer,\n            $removeJoinBuilderFromRootComposer,\n          }) => $$RulesTableAnnotationComposer(\n            $db: $db,\n            $table: $db.rules,\n            $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer,\n            joinBuilder: joinBuilder,\n            $removeJoinBuilderFromRootComposer:\n                $removeJoinBuilderFromRootComposer,\n          ),\n    );\n    return composer;\n  }\n}\n\nclass $$ProfileRuleLinksTableTableManager\n    extends\n        RootTableManager<\n          _$Database,\n          $ProfileRuleLinksTable,\n          RawProfileRuleLink,\n          $$ProfileRuleLinksTableFilterComposer,\n          $$ProfileRuleLinksTableOrderingComposer,\n          $$ProfileRuleLinksTableAnnotationComposer,\n          $$ProfileRuleLinksTableCreateCompanionBuilder,\n          $$ProfileRuleLinksTableUpdateCompanionBuilder,\n          (RawProfileRuleLink, $$ProfileRuleLinksTableReferences),\n          RawProfileRuleLink,\n          PrefetchHooks Function({bool profileId, bool ruleId})\n        > {\n  $$ProfileRuleLinksTableTableManager(\n    _$Database db,\n    $ProfileRuleLinksTable table,\n  ) : super(\n        TableManagerState(\n          db: db,\n          table: table,\n          createFilteringComposer: () =>\n              $$ProfileRuleLinksTableFilterComposer($db: db, $table: table),\n          createOrderingComposer: () =>\n              $$ProfileRuleLinksTableOrderingComposer($db: db, $table: table),\n          createComputedFieldComposer: () =>\n              $$ProfileRuleLinksTableAnnotationComposer($db: db, $table: table),\n          updateCompanionCallback:\n              ({\n                Value<String> id = const Value.absent(),\n                Value<int?> profileId = const Value.absent(),\n                Value<int> ruleId = const Value.absent(),\n                Value<RuleScene?> scene = const Value.absent(),\n                Value<String?> order = const Value.absent(),\n                Value<int> rowid = const Value.absent(),\n              }) => ProfileRuleLinksCompanion(\n                id: id,\n                profileId: profileId,\n                ruleId: ruleId,\n                scene: scene,\n                order: order,\n                rowid: rowid,\n              ),\n          createCompanionCallback:\n              ({\n                required String id,\n                Value<int?> profileId = const Value.absent(),\n                required int ruleId,\n                Value<RuleScene?> scene = const Value.absent(),\n                Value<String?> order = const Value.absent(),\n                Value<int> rowid = const Value.absent(),\n              }) => ProfileRuleLinksCompanion.insert(\n                id: id,\n                profileId: profileId,\n                ruleId: ruleId,\n                scene: scene,\n                order: order,\n                rowid: rowid,\n              ),\n          withReferenceMapper: (p0) => p0\n              .map(\n                (e) => (\n                  e.readTable(table),\n                  $$ProfileRuleLinksTableReferences(db, table, e),\n                ),\n              )\n              .toList(),\n          prefetchHooksCallback: ({profileId = false, ruleId = false}) {\n            return PrefetchHooks(\n              db: db,\n              explicitlyWatchedTables: [],\n              addJoins:\n                  <\n                    T extends TableManagerState<\n                      dynamic,\n                      dynamic,\n                      dynamic,\n                      dynamic,\n                      dynamic,\n                      dynamic,\n                      dynamic,\n                      dynamic,\n                      dynamic,\n                      dynamic,\n                      dynamic\n                    >\n                  >(state) {\n                    if (profileId) {\n                      state =\n                          state.withJoin(\n                                currentTable: table,\n                                currentColumn: table.profileId,\n                                referencedTable:\n                                    $$ProfileRuleLinksTableReferences\n                                        ._profileIdTable(db),\n                                referencedColumn:\n                                    $$ProfileRuleLinksTableReferences\n                                        ._profileIdTable(db)\n                                        .id,\n                              )\n                              as T;\n                    }\n                    if (ruleId) {\n                      state =\n                          state.withJoin(\n                                currentTable: table,\n                                currentColumn: table.ruleId,\n                                referencedTable:\n                                    $$ProfileRuleLinksTableReferences\n                                        ._ruleIdTable(db),\n                                referencedColumn:\n                                    $$ProfileRuleLinksTableReferences\n                                        ._ruleIdTable(db)\n                                        .id,\n                              )\n                              as T;\n                    }\n\n                    return state;\n                  },\n              getPrefetchedDataCallback: (items) async {\n                return [];\n              },\n            );\n          },\n        ),\n      );\n}\n\ntypedef $$ProfileRuleLinksTableProcessedTableManager =\n    ProcessedTableManager<\n      _$Database,\n      $ProfileRuleLinksTable,\n      RawProfileRuleLink,\n      $$ProfileRuleLinksTableFilterComposer,\n      $$ProfileRuleLinksTableOrderingComposer,\n      $$ProfileRuleLinksTableAnnotationComposer,\n      $$ProfileRuleLinksTableCreateCompanionBuilder,\n      $$ProfileRuleLinksTableUpdateCompanionBuilder,\n      (RawProfileRuleLink, $$ProfileRuleLinksTableReferences),\n      RawProfileRuleLink,\n      PrefetchHooks Function({bool profileId, bool ruleId})\n    >;\n\nclass $DatabaseManager {\n  final _$Database _db;\n  $DatabaseManager(this._db);\n  $$ProfilesTableTableManager get profiles =>\n      $$ProfilesTableTableManager(_db, _db.profiles);\n  $$ScriptsTableTableManager get scripts =>\n      $$ScriptsTableTableManager(_db, _db.scripts);\n  $$RulesTableTableManager get rules =>\n      $$RulesTableTableManager(_db, _db.rules);\n  $$ProfileRuleLinksTableTableManager get profileRuleLinks =>\n      $$ProfileRuleLinksTableTableManager(_db, _db.profileRuleLinks);\n}\n\nmixin _$ProfilesDaoMixin on DatabaseAccessor<Database> {\n  $ProfilesTable get profiles => attachedDatabase.profiles;\n}\nmixin _$ScriptsDaoMixin on DatabaseAccessor<Database> {\n  $ScriptsTable get scripts => attachedDatabase.scripts;\n}\nmixin _$RulesDaoMixin on DatabaseAccessor<Database> {\n  $RulesTable get rules => attachedDatabase.rules;\n  $ProfilesTable get profiles => attachedDatabase.profiles;\n  $ProfileRuleLinksTable get profileRuleLinks =>\n      attachedDatabase.profileRuleLinks;\n}\n"
  },
  {
    "path": "lib/database/links.dart",
    "content": "part of 'database.dart';\n\n@DataClassName('RawProfileRuleLink')\n@TableIndex(\n  name: 'idx_profile_scene_order',\n  columns: {#profileId, #scene, #order},\n)\nclass ProfileRuleLinks extends Table {\n  @override\n  String get tableName => 'profile_rule_mapping';\n\n  TextColumn get id => text()();\n\n  IntColumn get profileId => integer().nullable().references(\n    Profiles,\n    #id,\n    onDelete: KeyAction.cascade,\n  )();\n\n  IntColumn get ruleId =>\n      integer().references(Rules, #id, onDelete: KeyAction.cascade)();\n\n  TextColumn get scene => textEnum<RuleScene>().nullable()();\n\n  TextColumn get order => text().nullable()();\n\n  @override\n  Set<Column> get primaryKey => {id};\n}\n\nextension RawProfileRuleLinkExt on RawProfileRuleLink {\n  ProfileRuleLink toLink() {\n    return ProfileRuleLink(\n      profileId: profileId,\n      ruleId: ruleId,\n      scene: scene,\n      order: order,\n    );\n  }\n}\n\nextension ProfileRuleLinksCompanionExt on ProfileRuleLink {\n  ProfileRuleLinksCompanion toCompanion() {\n    return ProfileRuleLinksCompanion.insert(\n      id: key,\n      ruleId: ruleId,\n      scene: Value(scene),\n      profileId: Value(profileId),\n      order: Value(order),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/database/profiles.dart",
    "content": "part of 'database.dart';\n\n@DataClassName('RawProfile')\nclass Profiles extends Table {\n  @override\n  String get tableName => 'profiles';\n\n  IntColumn get id => integer()();\n\n  TextColumn get label => text()();\n\n  TextColumn get currentGroupName => text().nullable()();\n\n  TextColumn get url => text()();\n\n  DateTimeColumn get lastUpdateDate => dateTime().nullable()();\n\n  TextColumn get overwriteType => textEnum<OverwriteType>()();\n\n  IntColumn get scriptId => integer().nullable()();\n\n  IntColumn get autoUpdateDurationMillis => integer()();\n\n  TextColumn get subscriptionInfo =>\n      text().map(const SubscriptionInfoConverter()).nullable()();\n\n  BoolColumn get autoUpdate => boolean()();\n\n  TextColumn get selectedMap => text().map(const StringMapConverter())();\n\n  TextColumn get unfoldSet => text().map(const StringSetConverter())();\n\n  IntColumn get order => integer().nullable()();\n\n  @override\n  Set<Column> get primaryKey => {id};\n}\n\nclass SubscriptionInfoConverter\n    extends TypeConverter<SubscriptionInfo?, String?> {\n  const SubscriptionInfoConverter();\n\n  @override\n  SubscriptionInfo? fromSql(String? fromDb) {\n    if (fromDb == null) return null;\n    return SubscriptionInfo.fromJson(json.decode(fromDb));\n  }\n\n  @override\n  String? toSql(SubscriptionInfo? value) {\n    if (value == null) return null;\n    return json.encode(value.toJson());\n  }\n}\n\n@DriftAccessor(tables: [Profiles])\nclass ProfilesDao extends DatabaseAccessor<Database> with _$ProfilesDaoMixin {\n  ProfilesDao(super.attachedDatabase);\n\n  Selectable<Profile> all() {\n    final stmt = profiles.select();\n    stmt.orderBy([\n      (t) => OrderingTerm(expression: t.order, nulls: NullsOrder.last),\n      (t) => OrderingTerm.asc(t.id),\n    ]);\n    return stmt.map((item) => item.toProfile());\n  }\n\n  Future<void> setAll(Iterable<Profile> profiles) async {\n    await batch((b) async {\n      setAllWithBatch(b, profiles);\n    });\n  }\n\n  Future<void> putAll<T extends Table, D extends DataClass>(\n    Iterable<Insertable<D>> items,\n  ) async {\n    await batch((b) async {\n      putAllWithBatch(b, items);\n    });\n  }\n\n  void putAllWithBatch<T extends Table, D extends DataClass>(\n    Batch batch,\n    Iterable<Insertable<D>> items,\n  ) {\n    batch.insertAllOnConflictUpdate(profiles, items);\n  }\n\n  void setAllWithBatch(Batch batch, Iterable<Profile> profiles) {\n    final List<ProfilesCompanion> items = [];\n    final List<int> ids = [];\n    profiles.forEachIndexed((index, profile) {\n      ids.add(profile.id);\n      items.add(profile.toCompanion(index));\n    });\n\n    this.profiles.setAll(batch, items, deleteFilter: (t) => t.id.isNotIn(ids));\n  }\n}\n\nclass StringMapConverter extends TypeConverter<Map<String, String>, String> {\n  const StringMapConverter();\n\n  @override\n  Map<String, String> fromSql(String fromDb) {\n    return Map<String, String>.from(json.decode(fromDb));\n  }\n\n  @override\n  String toSql(Map<String, String> value) {\n    return json.encode(value);\n  }\n}\n\nclass StringSetConverter extends TypeConverter<Set<String>, String> {\n  const StringSetConverter();\n\n  @override\n  Set<String> fromSql(String fromDb) {\n    return Set<String>.from(json.decode(fromDb));\n  }\n\n  @override\n  String toSql(Set<String> value) {\n    return json.encode(value.toList());\n  }\n}\n\nextension RawProfilExt on RawProfile {\n  Profile toProfile() {\n    return Profile(\n      id: id,\n      label: label,\n      currentGroupName: currentGroupName,\n      url: url,\n      lastUpdateDate: lastUpdateDate,\n      autoUpdateDuration: Duration(milliseconds: autoUpdateDurationMillis),\n      subscriptionInfo: subscriptionInfo,\n      autoUpdate: autoUpdate,\n      selectedMap: selectedMap,\n      unfoldSet: unfoldSet,\n      overwriteType: overwriteType,\n      scriptId: scriptId,\n      order: order,\n    );\n  }\n}\n\nextension ProfilesCompanionExt on Profile {\n  ProfilesCompanion toCompanion([int? order]) {\n    return ProfilesCompanion.insert(\n      id: Value(id),\n      label: label,\n      currentGroupName: Value(currentGroupName),\n      url: url,\n      lastUpdateDate: Value(lastUpdateDate),\n      autoUpdateDurationMillis: autoUpdateDuration.inMilliseconds,\n      subscriptionInfo: Value(subscriptionInfo),\n      autoUpdate: autoUpdate,\n      selectedMap: selectedMap,\n      unfoldSet: unfoldSet,\n      overwriteType: overwriteType,\n      scriptId: Value(scriptId),\n      order: Value(order ?? this.order),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/database/rules.dart",
    "content": "part of 'database.dart';\n\n@DataClassName('RawRule')\nclass Rules extends Table {\n  @override\n  String get tableName => 'rules';\n\n  IntColumn get id => integer()();\n\n  TextColumn get value => text()();\n\n  @override\n  Set<Column> get primaryKey => {id};\n}\n\n@DriftAccessor(tables: [Rules, ProfileRuleLinks])\nclass RulesDao extends DatabaseAccessor<Database> with _$RulesDaoMixin {\n  RulesDao(super.attachedDatabase);\n\n  Selectable<Rule> allGlobalAddedRules() {\n    return _get();\n  }\n\n  Selectable<Rule> allProfileAddedRules(int profileId) {\n    return _get(profileId: profileId, scene: RuleScene.added);\n  }\n\n  Selectable<Rule> allProfileDisabledRules(int profileId) {\n    return _get(profileId: profileId, scene: RuleScene.disabled);\n  }\n\n  Selectable<Rule> allAddedRules(int profileId) {\n    final disabledIdsQuery = selectOnly(profileRuleLinks)\n      ..addColumns([profileRuleLinks.ruleId])\n      ..where(\n        profileRuleLinks.profileId.equals(profileId) &\n            profileRuleLinks.scene.equalsValue(RuleScene.disabled),\n      );\n\n    final query = select(rules).join([\n      innerJoin(profileRuleLinks, profileRuleLinks.ruleId.equalsExp(rules.id)),\n    ]);\n\n    query.where(\n      (profileRuleLinks.profileId.isNull() |\n              (profileRuleLinks.profileId.equals(profileId) &\n                  profileRuleLinks.scene.equalsValue(RuleScene.added))) &\n          profileRuleLinks.ruleId.isNotInQuery(disabledIdsQuery),\n    );\n\n    query.orderBy([\n      OrderingTerm.desc(\n        profileRuleLinks.profileId.isNull().caseMatch<int>(\n          when: {const Constant(true): const Constant(1)},\n          orElse: const Constant(0),\n        ),\n      ),\n      OrderingTerm.desc(profileRuleLinks.order),\n    ]);\n\n    return query.map((row) {\n      final ruleData = row.readTable(rules);\n      final order = row.read(profileRuleLinks.order);\n      return ruleData.toRule(order);\n    });\n  }\n\n  void restoreWithBatch(\n    Batch batch,\n    Iterable<Rule> rules,\n    Iterable<ProfileRuleLink> links,\n  ) {\n    batch.insertAllOnConflictUpdate(\n      this.rules,\n      rules.map((item) => item.toCompanion()),\n    );\n    final ruleIds = rules.map((item) => item.id);\n    batch.deleteWhere(this.rules, (t) => t.id.isNotIn(ruleIds));\n    batch.insertAllOnConflictUpdate(\n      profileRuleLinks,\n      links.map((item) => item.toCompanion()),\n    );\n    final linkKeys = links.map((item) => item.key);\n    batch.deleteWhere(profileRuleLinks, (t) => t.id.isNotIn(linkKeys));\n  }\n\n  Future<void> delRules(Iterable<int> ruleIds) {\n    return _delAll(ruleIds);\n  }\n\n  Future<void> putGlobalRule(Rule rule) {\n    return _put(rule);\n  }\n\n  Future<void> putProfileAddedRule(int profileId, Rule rule) {\n    return _put(rule, profileId: profileId, scene: RuleScene.added);\n  }\n\n  Future<void> putProfileDisabledRule(int profileId, Rule rule) {\n    return _put(rule, profileId: profileId, scene: RuleScene.added);\n  }\n\n  Future<void> putGlobalRules(Iterable<Rule> rules) {\n    return _putAll(rules);\n  }\n\n  Future<void> setGlobalRules(Iterable<Rule> rules) {\n    return _set(rules);\n  }\n\n  Future<int> putDisabledLink(int profileId, int ruleId) async {\n    return await profileRuleLinks.insertOnConflictUpdate(\n      ProfileRuleLink(\n        ruleId: ruleId,\n        profileId: profileId,\n        scene: RuleScene.disabled,\n      ).toCompanion(),\n    );\n  }\n\n  Future<bool> delDisabledLink(int profileId, int ruleId) async {\n    return await profileRuleLinks.deleteOne(\n      ProfileRuleLink(\n        profileId: profileId,\n        ruleId: ruleId,\n        scene: RuleScene.disabled,\n      ).toCompanion(),\n    );\n  }\n\n  Future<int> orderGlobalRule({\n    required int ruleId,\n    required String order,\n  }) async {\n    return await _order(ruleId: ruleId, order: order);\n  }\n\n  Future<int> orderProfileAddedRule(\n    int profileId, {\n    required int ruleId,\n    required String order,\n  }) async {\n    return await _order(\n      ruleId: ruleId,\n      order: order,\n      profileId: profileId,\n      scene: RuleScene.added,\n    );\n  }\n\n  Selectable<Rule> _get({int? profileId, RuleScene? scene}) {\n    final query = select(rules).join([\n      innerJoin(profileRuleLinks, profileRuleLinks.ruleId.equalsExp(rules.id)),\n    ]);\n\n    query.where(\n      profileId == null\n          ? profileRuleLinks.profileId.isNull()\n          : profileRuleLinks.profileId.equals(profileId) &\n                profileRuleLinks.scene.equalsValue(scene),\n    );\n\n    query.orderBy([\n      OrderingTerm.desc(profileRuleLinks.order),\n      OrderingTerm.desc(profileRuleLinks.id),\n    ]);\n\n    return query.map((row) {\n      return row.readTable(rules).toRule(row.read(profileRuleLinks.order));\n    });\n  }\n\n  Future<int> _order({\n    required int ruleId,\n    required String order,\n    int? profileId,\n    RuleScene? scene,\n  }) async {\n    final stmt = profileRuleLinks.update();\n    stmt.where((t) {\n      return (profileId == null\n              ? t.profileId.isNull()\n              : t.profileId.equals(profileId)) &\n          t.ruleId.equals(ruleId) &\n          t.scene.equalsValue(scene);\n    });\n    return await stmt.write(ProfileRuleLinksCompanion(order: Value(order)));\n  }\n\n  Future<int> _put(Rule rule, {int? profileId, RuleScene? scene}) async {\n    return transaction(() async {\n      final row = await rules.insertOnConflictUpdate(rule.toCompanion());\n      if (row == 0) {\n        return 0;\n      }\n      return await profileRuleLinks.insertOnConflictUpdate(\n        ProfileRuleLink(\n          ruleId: rule.id,\n          profileId: profileId,\n          scene: scene,\n        ).toCompanion(),\n      );\n    });\n  }\n\n  Future<void> _delAll(Iterable<int> ruleIds) async {\n    await rules.deleteWhere((t) => t.id.isIn(ruleIds));\n  }\n\n  Future<void> _putAll(\n    Iterable<Rule> rules, {\n    int? profileId,\n    RuleScene? scene,\n  }) async {\n    await batch((b) {\n      b.insertAllOnConflictUpdate(\n        this.rules,\n        rules.map((item) => item.toCompanion()),\n      );\n      b.insertAllOnConflictUpdate(\n        profileRuleLinks,\n        rules.map(\n          (item) => ProfileRuleLink(\n            ruleId: item.id,\n            profileId: profileId,\n            scene: scene,\n          ).toCompanion(),\n        ),\n      );\n    });\n  }\n\n  Future<void> _set(\n    Iterable<Rule> rules, {\n    int? profileId,\n    RuleScene? scene,\n  }) async {\n    await batch((b) {\n      b.insertAllOnConflictUpdate(\n        this.rules,\n        rules.map((item) => item.toCompanion()),\n      );\n\n      b.deleteWhere(\n        profileRuleLinks,\n        (t) =>\n            (profileId == null\n                ? t.profileId.isNull()\n                : t.profileId.equals(profileId)) &\n            (scene == null ? const Constant(true) : t.scene.equalsValue(scene)),\n      );\n\n      b.insertAllOnConflictUpdate(\n        profileRuleLinks,\n        rules.map(\n          (item) => ProfileRuleLink(\n            ruleId: item.id,\n            profileId: profileId,\n            scene: scene,\n          ).toCompanion(),\n        ),\n      );\n\n      b.deleteWhere(this.rules, (r) {\n        final linkedIds = selectOnly(profileRuleLinks);\n        linkedIds.addColumns([profileRuleLinks.ruleId]);\n        return r.id.isNotInQuery(linkedIds);\n      });\n    });\n  }\n}\n\nextension RawRuleExt on RawRule {\n  Rule toRule([String? order]) {\n    return Rule(id: id, value: value, order: order);\n  }\n}\n\nextension RulesCompanionExt on Rule {\n  RulesCompanion toCompanion() {\n    return RulesCompanion.insert(id: Value(id), value: value);\n  }\n}\n"
  },
  {
    "path": "lib/database/scripts.dart",
    "content": "part of 'database.dart';\n\n@DataClassName('RawScript')\nclass Scripts extends Table {\n  @override\n  String get tableName => 'scripts';\n\n  IntColumn get id => integer()();\n\n  TextColumn get label => text()();\n\n  DateTimeColumn get lastUpdateTime => dateTime()();\n\n  @override\n  Set<Column> get primaryKey => {id};\n}\n\n@DriftAccessor(tables: [Scripts])\nclass ScriptsDao extends DatabaseAccessor<Database> with _$ScriptsDaoMixin {\n  ScriptsDao(super.attachedDatabase);\n\n  Selectable<Script> all() {\n    return scripts.select().map((item) => item.toScript());\n  }\n\n  Selectable<Script> get(int scriptId) {\n    final stmt = scripts.select();\n    stmt.where((t) => t.id.equals(scriptId));\n    return stmt.map((it) => it.toScript());\n  }\n\n  Future<void> setAll(Iterable<Script> scripts) async {\n    await batch((b) async {\n      await setAllWithBatch(b, scripts);\n    });\n  }\n\n  Future<void> setAllWithBatch(Batch batch, Iterable<Script> scripts) async {\n    final List<ScriptsCompanion> items = [];\n    final List<int> ids = [];\n    for (final script in scripts) {\n      ids.add(script.id);\n      items.add(script.toCompanion());\n    }\n    this.scripts.setAll(batch, items, deleteFilter: (t) => t.id.isNotIn(ids));\n  }\n}\n\nextension RawScriptExt on RawScript {\n  Script toScript() {\n    return Script(id: id, label: label, lastUpdateTime: lastUpdateTime);\n  }\n}\n\nextension ScriptsCompanionExt on Script {\n  ScriptsCompanion toCompanion() {\n    return ScriptsCompanion.insert(\n      id: Value(id),\n      label: label,\n      lastUpdateTime: lastUpdateTime,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/enum/enum.dart",
    "content": "// ignore_for_file: constant_identifier_names\n\nimport 'dart:io';\n\nimport 'package:fl_clash/common/color.dart';\nimport 'package:fl_clash/common/system.dart';\nimport 'package:fl_clash/views/dashboard/widgets/widgets.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/services.dart';\nimport 'package:freezed_annotation/freezed_annotation.dart';\nimport 'package:hotkey_manager/hotkey_manager.dart';\n\nenum SupportPlatform {\n  Windows,\n  MacOS,\n  Linux,\n  Android;\n\n  static SupportPlatform get currentPlatform {\n    if (system.isWindows) {\n      return SupportPlatform.Windows;\n    } else if (system.isMacOS) {\n      return SupportPlatform.MacOS;\n    } else if (Platform.isLinux) {\n      return SupportPlatform.Linux;\n    } else if (system.isAndroid) {\n      return SupportPlatform.Android;\n    }\n    throw 'invalid platform';\n  }\n}\n\nconst desktopPlatforms = [\n  SupportPlatform.Linux,\n  SupportPlatform.MacOS,\n  SupportPlatform.Windows,\n];\n\nenum GroupType {\n  Selector,\n  URLTest,\n  Fallback,\n  LoadBalance,\n  Relay;\n\n  static GroupType parseProfileType(String type) {\n    return switch (type) {\n      'url-test' => URLTest,\n      'select' => Selector,\n      'fallback' => Fallback,\n      'load-balance' => LoadBalance,\n      'relay' => Relay,\n      String() => throw UnimplementedError(),\n    };\n  }\n}\n\nenum GroupName { GLOBAL, Proxy, Auto, Fallback }\n\nextension GroupTypeExtension on GroupType {\n  static List<String> get valueList =>\n      GroupType.values.map((e) => e.toString().split('.').last).toList();\n\n  bool get isComputedSelected {\n    return [GroupType.URLTest, GroupType.Fallback].contains(this);\n  }\n\n  static GroupType? getGroupType(String value) {\n    final index = GroupTypeExtension.valueList.indexOf(value);\n    if (index == -1) return null;\n    return GroupType.values[index];\n  }\n\n  String get value => GroupTypeExtension.valueList[index];\n}\n\nenum UsedProxy { GLOBAL, DIRECT, REJECT }\n\nextension UsedProxyExtension on UsedProxy {\n  static List<String> get valueList =>\n      UsedProxy.values.map((e) => e.toString().split('.').last).toList();\n\n  String get value => UsedProxyExtension.valueList[index];\n}\n\nenum Mode { rule, global, direct }\n\nenum ViewMode { mobile, laptop, desktop }\n\nenum LogLevel { debug, info, warning, error, silent }\n\nextension LogLevelExt on LogLevel {\n  Color? get color {\n    return switch (this) {\n      LogLevel.silent => Colors.grey.shade700,\n      LogLevel.debug => Colors.grey.shade400,\n      LogLevel.info => null,\n      LogLevel.warning => Colors.orangeAccent.darken(),\n      LogLevel.error => Colors.redAccent,\n    };\n  }\n}\n\nenum TransportProtocol { udp, tcp }\n\nenum TrafficUnit { B, KB, MB, GB, TB }\n\nenum NavigationItemMode { mobile, desktop, more }\n\nenum Network { tcp, udp }\n\nenum ProxiesSortType { none, delay, name }\n\nenum TunStack { gvisor, system, mixed }\n\nenum AccessControlMode { acceptSelected, rejectSelected }\n\nenum AccessSortType { none, name, time }\n\nenum ProfileType { file, url }\n\nenum ResultType {\n  @JsonValue(0)\n  success,\n  @JsonValue(-1)\n  error,\n}\n\nenum CoreEventType { log, delay, request, loaded, crash }\n\nenum InvokeMessageType { protect, process }\n\nenum FindProcessMode { always, off }\n\nenum RestoreOption { all, onlyProfiles }\n\nenum ChipType { action, delete }\n\nenum CommonCardType { plain, filled }\n//\n// extension CommonCardTypeExt on CommonCardType {\n//   CommonCardType get variant => CommonCardType.plain;\n// }\n\nenum ProxiesType { tab, list }\n\nenum ProxiesLayout { loose, standard, tight }\n\nenum ProxyCardType { expand, shrink, min }\n\nenum DnsMode {\n  normal,\n  @JsonValue('fake-ip')\n  fakeIp,\n  @JsonValue('redir-host')\n  redirHost,\n  hosts,\n}\n\nenum ExternalControllerStatus {\n  @JsonValue('')\n  close(''),\n  @JsonValue('127.0.0.1:9090')\n  open('127.0.0.1:9090');\n\n  final String value;\n\n  const ExternalControllerStatus(this.value);\n}\n\nenum KeyboardModifier {\n  alt([PhysicalKeyboardKey.altLeft, PhysicalKeyboardKey.altRight]),\n  capsLock([PhysicalKeyboardKey.capsLock]),\n  control([PhysicalKeyboardKey.controlLeft, PhysicalKeyboardKey.controlRight]),\n  fn([PhysicalKeyboardKey.fn]),\n  meta([PhysicalKeyboardKey.metaLeft, PhysicalKeyboardKey.metaRight]),\n  shift([PhysicalKeyboardKey.shiftLeft, PhysicalKeyboardKey.shiftRight]);\n\n  final List<PhysicalKeyboardKey> physicalKeys;\n\n  const KeyboardModifier(this.physicalKeys);\n}\n\nextension KeyboardModifierExt on KeyboardModifier {\n  HotKeyModifier toHotKeyModifier() {\n    return switch (this) {\n      KeyboardModifier.alt => HotKeyModifier.alt,\n      KeyboardModifier.capsLock => HotKeyModifier.capsLock,\n      KeyboardModifier.control => HotKeyModifier.control,\n      KeyboardModifier.fn => HotKeyModifier.fn,\n      KeyboardModifier.meta => HotKeyModifier.meta,\n      KeyboardModifier.shift => HotKeyModifier.shift,\n    };\n  }\n}\n\nenum HotAction { start, view, mode, proxy, tun }\n\nenum ProxiesIconStyle { none, standard, icon }\n\nenum FontFamily {\n  twEmoji('Twemoji'),\n  jetBrainsMono('JetBrainsMono'),\n  icon('Icons');\n\n  final String value;\n\n  const FontFamily(this.value);\n}\n\nenum RouteMode { bypassPrivate, config }\n\nenum ActionMethod {\n  message,\n  initClash,\n  getIsInit,\n  forceGc,\n  shutdown,\n  validateConfig,\n  updateConfig,\n  getConfig,\n  getProxies,\n  changeProxy,\n  getTraffic,\n  getTotalTraffic,\n  resetTraffic,\n  asyncTestDelay,\n  getConnections,\n  closeConnections,\n  resetConnections,\n  closeConnection,\n  getExternalProviders,\n  getExternalProvider,\n  updateGeoData,\n  updateExternalProvider,\n  sideLoadExternalProvider,\n  startLog,\n  stopLog,\n  startListener,\n  stopListener,\n  getCountryCode,\n  getMemory,\n  crash,\n  setupConfig,\n  deleteFile,\n\n  ///Android,\n  setState,\n  startTun,\n  stopTun,\n  getRunTime,\n  updateDns,\n  getAndroidVpnOptions,\n  getCurrentProfileName,\n}\n\nenum AuthorizeCode { none, success, error }\n\nenum WindowsHelperServiceStatus { none, presence, running }\n\nenum FunctionTag {\n  updateConfig,\n  setupConfig,\n  updateStatus,\n  updateGroups,\n  addCheckIpNum,\n  applyProfile,\n  savePreferences,\n  changeProxy,\n  checkIp,\n  handleWill,\n  updateDelay,\n  vpnTip,\n  autoLaunch,\n  renderPause,\n  updatePageIndex,\n  pageChange,\n  proxiesTabChange,\n  logs,\n  requests,\n  autoScrollToEnd,\n  loadedProvider,\n  saveSharedFile,\n}\n\nenum DashboardWidget {\n  networkSpeed(GridItem(crossAxisCellCount: 8, child: NetworkSpeed())),\n  outboundModeV2(GridItem(crossAxisCellCount: 8, child: OutboundModeV2())),\n  outboundMode(GridItem(crossAxisCellCount: 4, child: OutboundMode())),\n  trafficUsage(GridItem(crossAxisCellCount: 4, child: TrafficUsage())),\n  networkDetection(GridItem(crossAxisCellCount: 4, child: NetworkDetection())),\n  tunButton(\n    GridItem(crossAxisCellCount: 4, child: TUNButton()),\n    platforms: desktopPlatforms,\n  ),\n  vpnButton(\n    GridItem(crossAxisCellCount: 4, child: VpnButton()),\n    platforms: [SupportPlatform.Android],\n  ),\n  systemProxyButton(\n    GridItem(crossAxisCellCount: 4, child: SystemProxyButton()),\n    platforms: desktopPlatforms,\n  ),\n  intranetIp(GridItem(crossAxisCellCount: 4, child: IntranetIP())),\n  memoryInfo(GridItem(crossAxisCellCount: 4, child: MemoryInfo()));\n\n  final GridItem widget;\n  final List<SupportPlatform> platforms;\n\n  const DashboardWidget(this.widget, {this.platforms = SupportPlatform.values});\n\n  static DashboardWidget getDashboardWidget(GridItem gridItem) {\n    final dashboardWidgets = DashboardWidget.values;\n    final index = dashboardWidgets.indexWhere(\n      (item) => item.widget == gridItem,\n    );\n    return dashboardWidgets[index];\n  }\n}\n\nenum GeodataLoader { standard, memconservative }\n\nenum PageLabel {\n  dashboard,\n  proxies,\n  profiles,\n  tools,\n  logs,\n  requests,\n  resources,\n  connections,\n}\n\nenum RuleAction {\n  DOMAIN('DOMAIN'),\n  DOMAIN_SUFFIX('DOMAIN-SUFFIX'),\n  DOMAIN_KEYWORD('DOMAIN-KEYWORD'),\n  DOMAIN_REGEX('DOMAIN-REGEX'),\n  GEOSITE('GEOSITE'),\n  IP_CIDR('IP-CIDR'),\n  IP_CIDR6('IP-CIDR6'),\n  IP_SUFFIX('IP-SUFFIX'),\n  IP_ASN('IP-ASN'),\n  GEOIP('GEOIP'),\n  SRC_GEOIP('SRC-GEOIP'),\n  SRC_IP_ASN('SRC-IP-ASN'),\n  SRC_IP_CIDR('SRC-IP-CIDR'),\n  SRC_IP_SUFFIX('SRC-IP-SUFFIX'),\n  DST_PORT('DST-PORT'),\n  SRC_PORT('SRC-PORT'),\n  IN_PORT('IN-PORT'),\n  IN_TYPE('IN-TYPE'),\n  IN_USER('IN-USER'),\n  IN_NAME('IN-NAME'),\n  PROCESS_PATH('PROCESS-PATH'),\n  PROCESS_PATH_REGEX('PROCESS-PATH-REGEX'),\n  PROCESS_NAME('PROCESS-NAME'),\n  PROCESS_NAME_REGEX('PROCESS-NAME-REGEX'),\n  UID('UID'),\n  NETWORK('NETWORK'),\n  DSCP('DSCP'),\n  RULE_SET('RULE-SET'),\n  AND('AND'),\n  OR('OR'),\n  NOT('NOT'),\n  SUB_RULE('SUB-RULE'),\n  MATCH('MATCH');\n\n  final String value;\n\n  const RuleAction(this.value);\n\n  static List<RuleAction> get addedRuleActions {\n    return RuleAction.values\n        .where(\n          (item) => ![\n            RuleAction.MATCH,\n            RuleAction.RULE_SET,\n            RuleAction.SUB_RULE,\n          ].contains(item),\n        )\n        .toList();\n  }\n}\n\nextension RuleActionExt on RuleAction {\n  bool get hasParams => [\n    RuleAction.GEOIP,\n    RuleAction.IP_ASN,\n    RuleAction.SRC_IP_ASN,\n    RuleAction.IP_CIDR,\n    RuleAction.IP_CIDR6,\n    RuleAction.IP_SUFFIX,\n    RuleAction.RULE_SET,\n  ].contains(this);\n}\n\nenum OverrideRuleType { override, added }\n\nenum OverwriteType {\n  // none,\n  standard,\n  script,\n  // custom,\n}\n\nenum RuleTarget { DIRECT, REJECT, MATCH }\n\nenum RestoreStrategy { compatible, override }\n\nenum CacheTag { logs, rules, requests, proxiesList }\n\nenum Language { yaml, javaScript, json }\n\nenum ImportOption { file, url }\n\nenum ScrollPositionCacheKey { tools, profiles, proxiesList, proxiesTabList }\n\nenum QueryTag { proxies, access }\n\nenum LoadingTag { profiles, backup_restore, access, proxies }\n\nenum CoreStatus { connecting, connected, disconnected }\n\nenum RuleScene { added, disabled, custom }\n"
  },
  {
    "path": "lib/features/features.dart",
    "content": "export 'overwrite/overwrite.dart';\n"
  },
  {
    "path": "lib/features/overwrite/overwrite.dart",
    "content": "export 'rule.dart';\n"
  },
  {
    "path": "lib/features/overwrite/rule.dart",
    "content": "library;\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/clash_config.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/card.dart';\nimport 'package:fl_clash/widgets/dialog.dart';\nimport 'package:fl_clash/widgets/input.dart';\nimport 'package:fl_clash/widgets/list.dart';\nimport 'package:flutter/material.dart';\n\nclass RuleItem extends StatelessWidget {\n  final bool isSelected;\n  final bool isEditing;\n  final Rule rule;\n  final void Function() onSelected;\n  final void Function(Rule rule) onEdit;\n\n  const RuleItem({\n    super.key,\n    required this.isSelected,\n    required this.rule,\n    required this.onSelected,\n    required this.onEdit,\n    this.isEditing = false,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonSelectedListItem(\n      isSelected: isSelected,\n      onSelected: () {\n        onSelected();\n      },\n      title: Text(\n        rule.value,\n        style: context.textTheme.bodyMedium?.toJetBrainsMono,\n      ),\n      onPressed: () {\n        onEdit(rule);\n      },\n    );\n  }\n}\n\nclass RuleStatusItem extends StatelessWidget {\n  final bool status;\n  final Rule rule;\n  final void Function(bool) onChange;\n\n  const RuleStatusItem({\n    super.key,\n    required this.status,\n    required this.rule,\n    required this.onChange,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return Material(\n      color: Colors.transparent,\n      child: Container(\n        margin: EdgeInsets.symmetric(vertical: 4),\n        child: CommonCard(\n          padding: EdgeInsets.zero,\n          radius: 18,\n          type: CommonCardType.filled,\n          onPressed: () {\n            onChange(!status);\n          },\n          child: ListTile(\n            minTileHeight: 0,\n            minVerticalPadding: 0,\n            titleTextStyle: context.textTheme.bodyMedium?.toJetBrainsMono,\n            contentPadding: const EdgeInsets.symmetric(\n              horizontal: 16,\n              vertical: 16,\n            ),\n            trailing: Switch(value: status, onChanged: onChange),\n            title: Text(rule.value),\n          ),\n        ),\n      ),\n    );\n  }\n}\n\nclass AddOrEditRuleDialog extends StatefulWidget {\n  final Rule? rule;\n\n  const AddOrEditRuleDialog({super.key, this.rule});\n\n  @override\n  State<AddOrEditRuleDialog> createState() => _AddOrEditRuleDialogState();\n}\n\nclass _AddOrEditRuleDialogState extends State<AddOrEditRuleDialog> {\n  late RuleAction _ruleAction;\n  final _ruleTargetController = TextEditingController();\n  final _contentController = TextEditingController();\n  bool _noResolve = false;\n  bool _src = false;\n  List<DropdownMenuEntry> _targetItems = [];\n  final _formKey = GlobalKey<FormState>();\n\n  @override\n  void initState() {\n    _initState();\n    super.initState();\n  }\n\n  void _initState() {\n    _targetItems = [\n      ...RuleTarget.values.map(\n        (item) => DropdownMenuEntry(value: item.name, label: item.name),\n      ),\n    ];\n    if (widget.rule != null) {\n      final parsedRule = ParsedRule.parseString(widget.rule!.value);\n      _ruleAction = parsedRule.ruleAction;\n      _contentController.text = parsedRule.content ?? '';\n      _ruleTargetController.text = parsedRule.ruleTarget ?? '';\n      _noResolve = parsedRule.noResolve;\n      _src = parsedRule.src;\n      return;\n    }\n    _ruleAction = RuleAction.addedRuleActions.first;\n    if (_targetItems.isNotEmpty) {\n      _ruleTargetController.text = _targetItems.first.value;\n    }\n  }\n\n  @override\n  void didUpdateWidget(AddOrEditRuleDialog oldWidget) {\n    super.didUpdateWidget(oldWidget);\n    if (oldWidget.rule != widget.rule) {\n      _initState();\n    }\n  }\n\n  void _handleSubmit() {\n    final res = _formKey.currentState?.validate();\n    if (res == false) {\n      return;\n    }\n    final parsedRule = ParsedRule(\n      ruleAction: _ruleAction,\n      content: _contentController.text,\n      ruleTarget: _ruleTargetController.text,\n      noResolve: _noResolve,\n      src: _src,\n    );\n    final rule = widget.rule != null\n        ? widget.rule!.copyWith(value: parsedRule.value)\n        : Rule.value(parsedRule.value);\n    Navigator.of(context).pop(rule);\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonDialog(\n      title: widget.rule != null\n          ? appLocalizations.editRule\n          : appLocalizations.addRule,\n      actions: [\n        TextButton(\n          onPressed: _handleSubmit,\n          child: Text(appLocalizations.confirm),\n        ),\n      ],\n      child: DropdownMenuTheme(\n        data: DropdownMenuThemeData(\n          inputDecorationTheme: InputDecorationTheme(\n            border: OutlineInputBorder(),\n            labelStyle: context.textTheme.bodyLarge?.copyWith(\n              overflow: TextOverflow.ellipsis,\n            ),\n          ),\n        ),\n        child: Form(\n          key: _formKey,\n          child: LayoutBuilder(\n            builder: (_, constraints) {\n              return Column(\n                crossAxisAlignment: CrossAxisAlignment.start,\n                children: [\n                  FilledButton.tonal(\n                    onPressed: () async {\n                      _ruleAction =\n                          await globalState.showCommonDialog<RuleAction>(\n                            filter: false,\n                            child: OptionsDialog<RuleAction>(\n                              title: appLocalizations.ruleName,\n                              options: RuleAction.addedRuleActions,\n                              textBuilder: (item) => item.value,\n                              value: _ruleAction,\n                            ),\n                          ) ??\n                          _ruleAction;\n                      setState(() {});\n                    },\n                    child: Text(_ruleAction.value),\n                  ),\n                  SizedBox(height: 24),\n                  TextFormField(\n                    keyboardType: TextInputType.text,\n                    onFieldSubmitted: (_) {\n                      _handleSubmit();\n                    },\n                    controller: _contentController,\n                    decoration: InputDecoration(\n                      border: const OutlineInputBorder(),\n                      labelText: appLocalizations.content,\n                    ),\n                    validator: (_) {\n                      if (_contentController.text.isEmpty) {\n                        return appLocalizations.emptyTip(\n                          appLocalizations.content,\n                        );\n                      }\n                      return null;\n                    },\n                  ),\n                  SizedBox(height: 24),\n                  FormField<String>(\n                    validator: (_) {\n                      if (_ruleTargetController.text.isEmpty) {\n                        return appLocalizations.emptyTip(\n                          appLocalizations.ruleTarget,\n                        );\n                      }\n                      return null;\n                    },\n                    builder: (filed) {\n                      return DropdownMenu(\n                        controller: _ruleTargetController,\n                        label: Text(appLocalizations.ruleTarget),\n                        width: 200,\n                        menuHeight: 250,\n                        enableFilter: false,\n                        enableSearch: false,\n                        dropdownMenuEntries: _targetItems,\n                        errorText: filed.errorText,\n                      );\n                    },\n                  ),\n                  if (_ruleAction.hasParams) ...[\n                    SizedBox(height: 20),\n                    Wrap(\n                      spacing: 8,\n                      children: [\n                        CommonCard(\n                          radius: 8,\n                          isSelected: _src,\n                          child: Padding(\n                            padding: EdgeInsets.symmetric(\n                              horizontal: 8,\n                              vertical: 8,\n                            ),\n                            child: Text(\n                              appLocalizations.sourceIp,\n                              style: context.textTheme.bodyMedium,\n                            ),\n                          ),\n                          onPressed: () {\n                            setState(() {\n                              _src = !_src;\n                            });\n                          },\n                        ),\n                        CommonCard(\n                          radius: 8,\n                          isSelected: _noResolve,\n                          child: Padding(\n                            padding: EdgeInsets.symmetric(\n                              horizontal: 8,\n                              vertical: 8,\n                            ),\n                            child: Text(\n                              appLocalizations.noResolve,\n                              style: context.textTheme.bodyMedium,\n                            ),\n                          ),\n                          onPressed: () {\n                            setState(() {\n                              _noResolve = !_noResolve;\n                            });\n                          },\n                        ),\n                      ],\n                    ),\n                  ],\n                  SizedBox(height: 20),\n                ],\n              );\n            },\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/l10n/intl/messages_all.dart",
    "content": "// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart\n// This is a library that looks up messages for specific locales by\n// delegating to the appropriate library.\n\n// Ignore issues from commonly used lints in this file.\n// ignore_for_file:implementation_imports, file_names, unnecessary_new\n// ignore_for_file:unnecessary_brace_in_string_interps, directives_ordering\n// ignore_for_file:argument_type_not_assignable, invalid_assignment\n// ignore_for_file:prefer_single_quotes, prefer_generic_function_type_aliases\n// ignore_for_file:comment_references\n\nimport 'dart:async';\n\nimport 'package:flutter/foundation.dart';\nimport 'package:intl/intl.dart';\nimport 'package:intl/message_lookup_by_library.dart';\nimport 'package:intl/src/intl_helpers.dart';\n\nimport 'messages_en.dart' as messages_en;\nimport 'messages_ja.dart' as messages_ja;\nimport 'messages_ru.dart' as messages_ru;\nimport 'messages_zh_CN.dart' as messages_zh_cn;\n\ntypedef Future<dynamic> LibraryLoader();\nMap<String, LibraryLoader> _deferredLibraries = {\n  'en': () => new SynchronousFuture(null),\n  'ja': () => new SynchronousFuture(null),\n  'ru': () => new SynchronousFuture(null),\n  'zh_CN': () => new SynchronousFuture(null),\n};\n\nMessageLookupByLibrary? _findExact(String localeName) {\n  switch (localeName) {\n    case 'en':\n      return messages_en.messages;\n    case 'ja':\n      return messages_ja.messages;\n    case 'ru':\n      return messages_ru.messages;\n    case 'zh_CN':\n      return messages_zh_cn.messages;\n    default:\n      return null;\n  }\n}\n\n/// User programs should call this before using [localeName] for messages.\nFuture<bool> initializeMessages(String localeName) {\n  var availableLocale = Intl.verifiedLocale(\n    localeName,\n    (locale) => _deferredLibraries[locale] != null,\n    onFailure: (_) => null,\n  );\n  if (availableLocale == null) {\n    return new SynchronousFuture(false);\n  }\n  var lib = _deferredLibraries[availableLocale];\n  lib == null ? new SynchronousFuture(false) : lib();\n  initializeInternalMessageLookup(() => new CompositeMessageLookup());\n  messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor);\n  return new SynchronousFuture(true);\n}\n\nbool _messagesExistFor(String locale) {\n  try {\n    return _findExact(locale) != null;\n  } catch (e) {\n    return false;\n  }\n}\n\nMessageLookupByLibrary? _findGeneratedMessagesFor(String locale) {\n  var actualLocale = Intl.verifiedLocale(\n    locale,\n    _messagesExistFor,\n    onFailure: (_) => null,\n  );\n  if (actualLocale == null) return null;\n  return _findExact(actualLocale);\n}\n"
  },
  {
    "path": "lib/l10n/intl/messages_en.dart",
    "content": "// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart\n// This is a library that provides messages for a en locale. All the\n// messages from the main program should be duplicated here with the same\n// function name.\n\n// Ignore issues from commonly used lints in this file.\n// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new\n// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering\n// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases\n// ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes\n// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes\n\nimport 'package:intl/intl.dart';\nimport 'package:intl/message_lookup_by_library.dart';\n\nfinal messages = new MessageLookup();\n\ntypedef String MessageIfAbsent(String messageStr, List<dynamic> args);\n\nclass MessageLookup extends MessageLookupByLibrary {\n  String get localeName => 'en';\n\n  static String m0(count) =>\n      \"${Intl.plural(count, one: '1 day ago', other: '${count} days ago')}\";\n\n  static String m1(label) =>\n      \"Are you sure you want to delete the selected ${label}?\";\n\n  static String m2(label) =>\n      \"Are you sure you want to delete the current ${label}?\";\n\n  static String m3(label) => \"${label} details\";\n\n  static String m4(label) => \"${label} cannot be empty\";\n\n  static String m5(label) => \"Current ${label} already exists\";\n\n  static String m6(count) =>\n      \"${Intl.plural(count, one: '1 hour ago', other: '${count} hours ago')}\";\n\n  static String m7(count) =>\n      \"${Intl.plural(count, one: '1 minute ago', other: '${count} minutes ago')}\";\n\n  static String m8(count) =>\n      \"${Intl.plural(count, one: '1 month ago', other: '${count} months ago')}\";\n\n  static String m9(label) => \"No ${label} yet\";\n\n  static String m10(label) => \"${label} must be a number\";\n\n  static String m11(label) => \"${label} must be between 1024 and 49151\";\n\n  static String m12(count) => \"${count} items have been selected\";\n\n  static String m13(label) => \"${label} must be a url\";\n\n  static String m14(count) =>\n      \"${Intl.plural(count, one: '1 year ago', other: '${count} years ago')}\";\n\n  final messages = _notInlinedMessages(_notInlinedMessages);\n  static Map<String, Function> _notInlinedMessages(_) => <String, Function>{\n    \"about\": MessageLookupByLibrary.simpleMessage(\"About\"),\n    \"accessControl\": MessageLookupByLibrary.simpleMessage(\"AccessControl\"),\n    \"accessControlAllowDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Only allow selected app to enter VPN\",\n    ),\n    \"accessControlDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Configure application access proxy\",\n    ),\n    \"accessControlNotAllowDesc\": MessageLookupByLibrary.simpleMessage(\n      \"The selected application will be excluded from VPN\",\n    ),\n    \"accessControlSettings\": MessageLookupByLibrary.simpleMessage(\n      \"Access Control Settings\",\n    ),\n    \"account\": MessageLookupByLibrary.simpleMessage(\"Account\"),\n    \"action\": MessageLookupByLibrary.simpleMessage(\"Action\"),\n    \"action_mode\": MessageLookupByLibrary.simpleMessage(\"Switch mode\"),\n    \"action_proxy\": MessageLookupByLibrary.simpleMessage(\"System proxy\"),\n    \"action_start\": MessageLookupByLibrary.simpleMessage(\"Start/Stop\"),\n    \"action_tun\": MessageLookupByLibrary.simpleMessage(\"TUN\"),\n    \"action_view\": MessageLookupByLibrary.simpleMessage(\"Show/Hide\"),\n    \"add\": MessageLookupByLibrary.simpleMessage(\"Add\"),\n    \"addProfile\": MessageLookupByLibrary.simpleMessage(\"Add Profile\"),\n    \"addRule\": MessageLookupByLibrary.simpleMessage(\"Add rule\"),\n    \"addedOriginRules\": MessageLookupByLibrary.simpleMessage(\n      \"Attach on the original rules\",\n    ),\n    \"addedRules\": MessageLookupByLibrary.simpleMessage(\"Added rules\"),\n    \"address\": MessageLookupByLibrary.simpleMessage(\"Address\"),\n    \"addressHelp\": MessageLookupByLibrary.simpleMessage(\n      \"WebDAV server address\",\n    ),\n    \"addressTip\": MessageLookupByLibrary.simpleMessage(\n      \"Please enter a valid WebDAV address\",\n    ),\n    \"adminAutoLaunch\": MessageLookupByLibrary.simpleMessage(\n      \"Admin auto launch\",\n    ),\n    \"adminAutoLaunchDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Boot up by using admin mode\",\n    ),\n    \"advancedConfig\": MessageLookupByLibrary.simpleMessage(\n      \"Advanced configuration\",\n    ),\n    \"advancedConfigDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Provide diverse configuration options\",\n    ),\n    \"ago\": MessageLookupByLibrary.simpleMessage(\" Ago\"),\n    \"agree\": MessageLookupByLibrary.simpleMessage(\"Agree\"),\n    \"allApps\": MessageLookupByLibrary.simpleMessage(\"All apps\"),\n    \"allowBypass\": MessageLookupByLibrary.simpleMessage(\n      \"Allow applications to bypass VPN\",\n    ),\n    \"allowBypassDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Some apps can bypass VPN when turned on\",\n    ),\n    \"allowLan\": MessageLookupByLibrary.simpleMessage(\"AllowLan\"),\n    \"allowLanDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Allow access proxy through the LAN\",\n    ),\n    \"app\": MessageLookupByLibrary.simpleMessage(\"App\"),\n    \"appAccessControl\": MessageLookupByLibrary.simpleMessage(\n      \"App access control\",\n    ),\n    \"appDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Processing app related settings\",\n    ),\n    \"appendSystemDns\": MessageLookupByLibrary.simpleMessage(\n      \"Append System DNS\",\n    ),\n    \"appendSystemDnsTip\": MessageLookupByLibrary.simpleMessage(\n      \"Forcefully append system DNS to the configuration\",\n    ),\n    \"application\": MessageLookupByLibrary.simpleMessage(\"Application\"),\n    \"applicationDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Modify application related settings\",\n    ),\n    \"auto\": MessageLookupByLibrary.simpleMessage(\"Auto\"),\n    \"autoCheckUpdate\": MessageLookupByLibrary.simpleMessage(\n      \"Auto check updates\",\n    ),\n    \"autoCheckUpdateDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Auto check for updates when the app starts\",\n    ),\n    \"autoCloseConnections\": MessageLookupByLibrary.simpleMessage(\n      \"Auto close connections\",\n    ),\n    \"autoCloseConnectionsDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Auto close connections after change node\",\n    ),\n    \"autoLaunch\": MessageLookupByLibrary.simpleMessage(\"Auto launch\"),\n    \"autoLaunchDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Follow the system self startup\",\n    ),\n    \"autoRun\": MessageLookupByLibrary.simpleMessage(\"AutoRun\"),\n    \"autoRunDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Auto run when the application is opened\",\n    ),\n    \"autoSetSystemDns\": MessageLookupByLibrary.simpleMessage(\n      \"Auto set system DNS\",\n    ),\n    \"autoUpdate\": MessageLookupByLibrary.simpleMessage(\"Auto update\"),\n    \"autoUpdateInterval\": MessageLookupByLibrary.simpleMessage(\n      \"Auto update interval (minutes)\",\n    ),\n    \"backup\": MessageLookupByLibrary.simpleMessage(\"Backup\"),\n    \"backupAndRestore\": MessageLookupByLibrary.simpleMessage(\n      \"Backup and Restore\",\n    ),\n    \"backupAndRestoreDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Sync data via WebDAV or files\",\n    ),\n    \"backupSuccess\": MessageLookupByLibrary.simpleMessage(\"Backup success\"),\n    \"basicConfig\": MessageLookupByLibrary.simpleMessage(\"Basic configuration\"),\n    \"basicConfigDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Modify the basic configuration globally\",\n    ),\n    \"bind\": MessageLookupByLibrary.simpleMessage(\"Bind\"),\n    \"blacklistMode\": MessageLookupByLibrary.simpleMessage(\"Blacklist mode\"),\n    \"bypassDomain\": MessageLookupByLibrary.simpleMessage(\"Bypass domain\"),\n    \"bypassDomainDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Only takes effect when the system proxy is enabled\",\n    ),\n    \"cacheCorrupt\": MessageLookupByLibrary.simpleMessage(\n      \"The cache is corrupt. Do you want to clear it?\",\n    ),\n    \"cancel\": MessageLookupByLibrary.simpleMessage(\"Cancel\"),\n    \"cancelFilterSystemApp\": MessageLookupByLibrary.simpleMessage(\n      \"Cancel filter system app\",\n    ),\n    \"cancelSelectAll\": MessageLookupByLibrary.simpleMessage(\n      \"Cancel select all\",\n    ),\n    \"checkError\": MessageLookupByLibrary.simpleMessage(\"Check error\"),\n    \"checkUpdate\": MessageLookupByLibrary.simpleMessage(\"Check for updates\"),\n    \"checkUpdateError\": MessageLookupByLibrary.simpleMessage(\n      \"The current application is already the latest version\",\n    ),\n    \"checking\": MessageLookupByLibrary.simpleMessage(\"Checking...\"),\n    \"clearData\": MessageLookupByLibrary.simpleMessage(\"Clear Data\"),\n    \"clipboardExport\": MessageLookupByLibrary.simpleMessage(\"Export clipboard\"),\n    \"clipboardImport\": MessageLookupByLibrary.simpleMessage(\"Clipboard import\"),\n    \"color\": MessageLookupByLibrary.simpleMessage(\"Color\"),\n    \"colorSchemes\": MessageLookupByLibrary.simpleMessage(\"Color schemes\"),\n    \"columns\": MessageLookupByLibrary.simpleMessage(\"Columns\"),\n    \"compatible\": MessageLookupByLibrary.simpleMessage(\"Compatibility mode\"),\n    \"compatibleDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Opening it will lose part of its application ability and gain the support of full amount of Clash.\",\n    ),\n    \"confirm\": MessageLookupByLibrary.simpleMessage(\"Confirm\"),\n    \"confirmClearAllData\": MessageLookupByLibrary.simpleMessage(\n      \"Are you sure you want to clear all data?\",\n    ),\n    \"confirmForceCrashCore\": MessageLookupByLibrary.simpleMessage(\n      \"Are you sure you want to force crash the core?\",\n    ),\n    \"connected\": MessageLookupByLibrary.simpleMessage(\"Connected\"),\n    \"connecting\": MessageLookupByLibrary.simpleMessage(\"Connecting...\"),\n    \"connection\": MessageLookupByLibrary.simpleMessage(\"Connection\"),\n    \"connections\": MessageLookupByLibrary.simpleMessage(\"Connections\"),\n    \"connectionsDesc\": MessageLookupByLibrary.simpleMessage(\n      \"View current connections data\",\n    ),\n    \"connectivity\": MessageLookupByLibrary.simpleMessage(\"Connectivity：\"),\n    \"contactMe\": MessageLookupByLibrary.simpleMessage(\"Contact me\"),\n    \"content\": MessageLookupByLibrary.simpleMessage(\"Content\"),\n    \"contentScheme\": MessageLookupByLibrary.simpleMessage(\"Content\"),\n    \"controlGlobalAddedRules\": MessageLookupByLibrary.simpleMessage(\n      \"Control global added rules\",\n    ),\n    \"copy\": MessageLookupByLibrary.simpleMessage(\"Copy\"),\n    \"copyEnvVar\": MessageLookupByLibrary.simpleMessage(\n      \"Copying environment variables\",\n    ),\n    \"copyLink\": MessageLookupByLibrary.simpleMessage(\"Copy link\"),\n    \"copySuccess\": MessageLookupByLibrary.simpleMessage(\"Copy success\"),\n    \"core\": MessageLookupByLibrary.simpleMessage(\"Core\"),\n    \"coreConfigChangeDetected\": MessageLookupByLibrary.simpleMessage(\n      \"Core configuration change detected\",\n    ),\n    \"coreInfo\": MessageLookupByLibrary.simpleMessage(\"Core info\"),\n    \"coreStatus\": MessageLookupByLibrary.simpleMessage(\"Core status\"),\n    \"country\": MessageLookupByLibrary.simpleMessage(\"Country\"),\n    \"crashTest\": MessageLookupByLibrary.simpleMessage(\"Crash test\"),\n    \"crashlytics\": MessageLookupByLibrary.simpleMessage(\"Crash Analysis\"),\n    \"crashlyticsTip\": MessageLookupByLibrary.simpleMessage(\n      \"When enabled, automatically uploads crash logs without sensitive information when the app crashes\",\n    ),\n    \"create\": MessageLookupByLibrary.simpleMessage(\"Create\"),\n    \"creationTime\": MessageLookupByLibrary.simpleMessage(\"Creation time\"),\n    \"cut\": MessageLookupByLibrary.simpleMessage(\"Cut\"),\n    \"dark\": MessageLookupByLibrary.simpleMessage(\"Dark\"),\n    \"dashboard\": MessageLookupByLibrary.simpleMessage(\"Dashboard\"),\n    \"dataCollectionContent\": MessageLookupByLibrary.simpleMessage(\n      \"This app uses Firebase Crashlytics to collect crash information to improve app stability.\\nThe collected data includes device information and crash details, but does not contain personal sensitive data.\\nYou can disable this feature in settings.\",\n    ),\n    \"dataCollectionTip\": MessageLookupByLibrary.simpleMessage(\n      \"Data Collection Notice\",\n    ),\n    \"days\": MessageLookupByLibrary.simpleMessage(\"Days\"),\n    \"daysAgo\": m0,\n    \"defaultNameserver\": MessageLookupByLibrary.simpleMessage(\n      \"Default nameserver\",\n    ),\n    \"defaultNameserverDesc\": MessageLookupByLibrary.simpleMessage(\n      \"For resolving DNS server\",\n    ),\n    \"defaultSort\": MessageLookupByLibrary.simpleMessage(\"Sort by default\"),\n    \"defaultText\": MessageLookupByLibrary.simpleMessage(\"Default\"),\n    \"delay\": MessageLookupByLibrary.simpleMessage(\"Delay\"),\n    \"delaySort\": MessageLookupByLibrary.simpleMessage(\"Sort by delay\"),\n    \"delayTest\": MessageLookupByLibrary.simpleMessage(\"Delay Test\"),\n    \"delete\": MessageLookupByLibrary.simpleMessage(\"Delete\"),\n    \"deleteMultipTip\": m1,\n    \"deleteTip\": m2,\n    \"desc\": MessageLookupByLibrary.simpleMessage(\n      \"A multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free.\",\n    ),\n    \"destination\": MessageLookupByLibrary.simpleMessage(\"Destination\"),\n    \"destinationGeoIP\": MessageLookupByLibrary.simpleMessage(\n      \"Destination GeoIP\",\n    ),\n    \"destinationIPASN\": MessageLookupByLibrary.simpleMessage(\n      \"Destination IPASN\",\n    ),\n    \"details\": m3,\n    \"detectionTip\": MessageLookupByLibrary.simpleMessage(\n      \"Relying on third-party api is for reference only\",\n    ),\n    \"developerMode\": MessageLookupByLibrary.simpleMessage(\"Developer mode\"),\n    \"developerModeEnableTip\": MessageLookupByLibrary.simpleMessage(\n      \"Developer mode is enabled.\",\n    ),\n    \"direct\": MessageLookupByLibrary.simpleMessage(\"Direct\"),\n    \"disclaimer\": MessageLookupByLibrary.simpleMessage(\"Disclaimer\"),\n    \"disclaimerDesc\": MessageLookupByLibrary.simpleMessage(\n      \"This software is only used for non-commercial purposes such as learning exchanges and scientific research. It is strictly prohibited to use this software for commercial purposes. Any commercial activity, if any, has nothing to do with this software.\",\n    ),\n    \"disconnected\": MessageLookupByLibrary.simpleMessage(\"Disconnected\"),\n    \"discoverNewVersion\": MessageLookupByLibrary.simpleMessage(\n      \"Discover the new version\",\n    ),\n    \"discovery\": MessageLookupByLibrary.simpleMessage(\n      \"Discovery a new version\",\n    ),\n    \"dnsDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Update DNS related settings\",\n    ),\n    \"dnsHijacking\": MessageLookupByLibrary.simpleMessage(\"DNS hijacking\"),\n    \"dnsMode\": MessageLookupByLibrary.simpleMessage(\"DNS mode\"),\n    \"doYouWantToPass\": MessageLookupByLibrary.simpleMessage(\n      \"Do you want to pass\",\n    ),\n    \"domain\": MessageLookupByLibrary.simpleMessage(\"Domain\"),\n    \"download\": MessageLookupByLibrary.simpleMessage(\"Download\"),\n    \"edit\": MessageLookupByLibrary.simpleMessage(\"Edit\"),\n    \"editGlobalRules\": MessageLookupByLibrary.simpleMessage(\n      \"Edit global rules\",\n    ),\n    \"editRule\": MessageLookupByLibrary.simpleMessage(\"Edit rule\"),\n    \"emptyTip\": m4,\n    \"en\": MessageLookupByLibrary.simpleMessage(\"English\"),\n    \"enableOverride\": MessageLookupByLibrary.simpleMessage(\"Enable override\"),\n    \"entries\": MessageLookupByLibrary.simpleMessage(\" entries\"),\n    \"exclude\": MessageLookupByLibrary.simpleMessage(\"Hidden from recent tasks\"),\n    \"excludeDesc\": MessageLookupByLibrary.simpleMessage(\n      \"When the app is in the background, the app is hidden from the recent task\",\n    ),\n    \"existsTip\": m5,\n    \"exit\": MessageLookupByLibrary.simpleMessage(\"Exit\"),\n    \"expand\": MessageLookupByLibrary.simpleMessage(\"Standard\"),\n    \"expirationTime\": MessageLookupByLibrary.simpleMessage(\"Expiration time\"),\n    \"exportFile\": MessageLookupByLibrary.simpleMessage(\"Export file\"),\n    \"exportLogs\": MessageLookupByLibrary.simpleMessage(\"Export logs\"),\n    \"exportSuccess\": MessageLookupByLibrary.simpleMessage(\"Export Success\"),\n    \"expressiveScheme\": MessageLookupByLibrary.simpleMessage(\"Expressive\"),\n    \"externalController\": MessageLookupByLibrary.simpleMessage(\n      \"ExternalController\",\n    ),\n    \"externalControllerDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Once enabled, the Clash kernel can be controlled on port 9090\",\n    ),\n    \"externalFetch\": MessageLookupByLibrary.simpleMessage(\"External fetch\"),\n    \"externalLink\": MessageLookupByLibrary.simpleMessage(\"External link\"),\n    \"externalResources\": MessageLookupByLibrary.simpleMessage(\n      \"External resources\",\n    ),\n    \"fakeipFilter\": MessageLookupByLibrary.simpleMessage(\"Fakeip filter\"),\n    \"fakeipRange\": MessageLookupByLibrary.simpleMessage(\"Fakeip range\"),\n    \"fallback\": MessageLookupByLibrary.simpleMessage(\"Fallback\"),\n    \"fallbackDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Generally use offshore DNS\",\n    ),\n    \"fallbackFilter\": MessageLookupByLibrary.simpleMessage(\"Fallback filter\"),\n    \"fidelityScheme\": MessageLookupByLibrary.simpleMessage(\"Fidelity\"),\n    \"file\": MessageLookupByLibrary.simpleMessage(\"File\"),\n    \"fileDesc\": MessageLookupByLibrary.simpleMessage(\"Directly upload profile\"),\n    \"fileIsUpdate\": MessageLookupByLibrary.simpleMessage(\n      \"The file has been modified. Do you want to save the changes?\",\n    ),\n    \"filterSystemApp\": MessageLookupByLibrary.simpleMessage(\n      \"Filter system app\",\n    ),\n    \"findProcessMode\": MessageLookupByLibrary.simpleMessage(\"Find process\"),\n    \"findProcessModeDesc\": MessageLookupByLibrary.simpleMessage(\n      \"There is a certain performance loss after opening\",\n    ),\n    \"fontFamily\": MessageLookupByLibrary.simpleMessage(\"FontFamily\"),\n    \"forceRestartCoreTip\": MessageLookupByLibrary.simpleMessage(\n      \"Are you sure you want to force restart the core?\",\n    ),\n    \"fourColumns\": MessageLookupByLibrary.simpleMessage(\"Four columns\"),\n    \"fruitSaladScheme\": MessageLookupByLibrary.simpleMessage(\"FruitSalad\"),\n    \"general\": MessageLookupByLibrary.simpleMessage(\"General\"),\n    \"generalDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Modify general settings\",\n    ),\n    \"geoData\": MessageLookupByLibrary.simpleMessage(\"GeoData\"),\n    \"geodataLoader\": MessageLookupByLibrary.simpleMessage(\n      \"Geo Low Memory Mode\",\n    ),\n    \"geodataLoaderDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Enabling will use the Geo low memory loader\",\n    ),\n    \"geoipCode\": MessageLookupByLibrary.simpleMessage(\"Geoip code\"),\n    \"getOriginRules\": MessageLookupByLibrary.simpleMessage(\n      \"Get original rules\",\n    ),\n    \"global\": MessageLookupByLibrary.simpleMessage(\"Global\"),\n    \"go\": MessageLookupByLibrary.simpleMessage(\"Go\"),\n    \"goDownload\": MessageLookupByLibrary.simpleMessage(\"Go to download\"),\n    \"goToConfigureScript\": MessageLookupByLibrary.simpleMessage(\n      \"Go to configure script\",\n    ),\n    \"hasCacheChange\": MessageLookupByLibrary.simpleMessage(\n      \"Do you want to cache the changes?\",\n    ),\n    \"host\": MessageLookupByLibrary.simpleMessage(\"Host\"),\n    \"hostsDesc\": MessageLookupByLibrary.simpleMessage(\"Add Hosts\"),\n    \"hotkeyConflict\": MessageLookupByLibrary.simpleMessage(\"Hotkey conflict\"),\n    \"hotkeyManagement\": MessageLookupByLibrary.simpleMessage(\n      \"Hotkey Management\",\n    ),\n    \"hotkeyManagementDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Use keyboard to control applications\",\n    ),\n    \"hours\": MessageLookupByLibrary.simpleMessage(\"Hours\"),\n    \"hoursAgo\": m6,\n    \"icon\": MessageLookupByLibrary.simpleMessage(\"Icon\"),\n    \"iconConfiguration\": MessageLookupByLibrary.simpleMessage(\n      \"Icon configuration\",\n    ),\n    \"iconStyle\": MessageLookupByLibrary.simpleMessage(\"Icon style\"),\n    \"import\": MessageLookupByLibrary.simpleMessage(\"Import\"),\n    \"importFile\": MessageLookupByLibrary.simpleMessage(\"Import from file\"),\n    \"importFromURL\": MessageLookupByLibrary.simpleMessage(\"Import from URL\"),\n    \"importUrl\": MessageLookupByLibrary.simpleMessage(\"Import from URL\"),\n    \"infiniteTime\": MessageLookupByLibrary.simpleMessage(\"Long term effective\"),\n    \"init\": MessageLookupByLibrary.simpleMessage(\"Init\"),\n    \"inputCorrectHotkey\": MessageLookupByLibrary.simpleMessage(\n      \"Please enter the correct hotkey\",\n    ),\n    \"intelligentSelected\": MessageLookupByLibrary.simpleMessage(\n      \"Intelligent selection\",\n    ),\n    \"internet\": MessageLookupByLibrary.simpleMessage(\"Internet\"),\n    \"interval\": MessageLookupByLibrary.simpleMessage(\"Interval\"),\n    \"intranetIP\": MessageLookupByLibrary.simpleMessage(\"Intranet IP\"),\n    \"invalidBackupFile\": MessageLookupByLibrary.simpleMessage(\n      \"Invalid backup file\",\n    ),\n    \"ipcidr\": MessageLookupByLibrary.simpleMessage(\"Ipcidr\"),\n    \"ipv6Desc\": MessageLookupByLibrary.simpleMessage(\n      \"When turned on it will be able to receive IPv6 traffic\",\n    ),\n    \"ipv6InboundDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Allow IPv6 inbound\",\n    ),\n    \"ja\": MessageLookupByLibrary.simpleMessage(\"Japanese\"),\n    \"just\": MessageLookupByLibrary.simpleMessage(\"Just\"),\n    \"justNow\": MessageLookupByLibrary.simpleMessage(\"Just now\"),\n    \"keepAliveIntervalDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Tcp keep alive interval\",\n    ),\n    \"key\": MessageLookupByLibrary.simpleMessage(\"Key\"),\n    \"language\": MessageLookupByLibrary.simpleMessage(\"Language\"),\n    \"layout\": MessageLookupByLibrary.simpleMessage(\"Layout\"),\n    \"light\": MessageLookupByLibrary.simpleMessage(\"Light\"),\n    \"list\": MessageLookupByLibrary.simpleMessage(\"List\"),\n    \"listen\": MessageLookupByLibrary.simpleMessage(\"Listen\"),\n    \"loadTest\": MessageLookupByLibrary.simpleMessage(\"Load test\"),\n    \"loading\": MessageLookupByLibrary.simpleMessage(\"Loading...\"),\n    \"local\": MessageLookupByLibrary.simpleMessage(\"Local\"),\n    \"localBackupDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Backup local data to local\",\n    ),\n    \"log\": MessageLookupByLibrary.simpleMessage(\"Log\"),\n    \"logLevel\": MessageLookupByLibrary.simpleMessage(\"LogLevel\"),\n    \"logcat\": MessageLookupByLibrary.simpleMessage(\"Logcat\"),\n    \"logcatDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Disabling will hide the log entry\",\n    ),\n    \"logs\": MessageLookupByLibrary.simpleMessage(\"Logs\"),\n    \"logsDesc\": MessageLookupByLibrary.simpleMessage(\"Log capture records\"),\n    \"logsTest\": MessageLookupByLibrary.simpleMessage(\"Logs test\"),\n    \"loopback\": MessageLookupByLibrary.simpleMessage(\"Loopback unlock tool\"),\n    \"loopbackDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Used for UWP loopback unlocking\",\n    ),\n    \"loose\": MessageLookupByLibrary.simpleMessage(\"Loose\"),\n    \"memoryInfo\": MessageLookupByLibrary.simpleMessage(\"Memory info\"),\n    \"messageTest\": MessageLookupByLibrary.simpleMessage(\"Message test\"),\n    \"messageTestTip\": MessageLookupByLibrary.simpleMessage(\n      \"This is a message.\",\n    ),\n    \"min\": MessageLookupByLibrary.simpleMessage(\"Min\"),\n    \"minimizeOnExit\": MessageLookupByLibrary.simpleMessage(\"Minimize on exit\"),\n    \"minimizeOnExitDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Modify the default system exit event\",\n    ),\n    \"minutes\": MessageLookupByLibrary.simpleMessage(\"Minutes\"),\n    \"minutesAgo\": m7,\n    \"mixedPort\": MessageLookupByLibrary.simpleMessage(\"Mixed Port\"),\n    \"mode\": MessageLookupByLibrary.simpleMessage(\"Mode\"),\n    \"monochromeScheme\": MessageLookupByLibrary.simpleMessage(\"Monochrome\"),\n    \"months\": MessageLookupByLibrary.simpleMessage(\"Months\"),\n    \"monthsAgo\": m8,\n    \"more\": MessageLookupByLibrary.simpleMessage(\"More\"),\n    \"name\": MessageLookupByLibrary.simpleMessage(\"Name\"),\n    \"nameSort\": MessageLookupByLibrary.simpleMessage(\"Sort by name\"),\n    \"nameserver\": MessageLookupByLibrary.simpleMessage(\"Nameserver\"),\n    \"nameserverDesc\": MessageLookupByLibrary.simpleMessage(\n      \"For resolving domain\",\n    ),\n    \"nameserverPolicy\": MessageLookupByLibrary.simpleMessage(\n      \"Nameserver policy\",\n    ),\n    \"nameserverPolicyDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Specify the corresponding nameserver policy\",\n    ),\n    \"network\": MessageLookupByLibrary.simpleMessage(\"Network\"),\n    \"networkDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Modify network-related settings\",\n    ),\n    \"networkDetection\": MessageLookupByLibrary.simpleMessage(\n      \"Network detection\",\n    ),\n    \"networkException\": MessageLookupByLibrary.simpleMessage(\n      \"Network exception, please check your connection and try again\",\n    ),\n    \"networkRequestException\": MessageLookupByLibrary.simpleMessage(\n      \"Network request exception, please try again later.\",\n    ),\n    \"networkSpeed\": MessageLookupByLibrary.simpleMessage(\"Network speed\"),\n    \"networkType\": MessageLookupByLibrary.simpleMessage(\"Network type\"),\n    \"neutralScheme\": MessageLookupByLibrary.simpleMessage(\"Neutral\"),\n    \"noData\": MessageLookupByLibrary.simpleMessage(\"No data\"),\n    \"noHotKey\": MessageLookupByLibrary.simpleMessage(\"No HotKey\"),\n    \"noIcon\": MessageLookupByLibrary.simpleMessage(\"None\"),\n    \"noInfo\": MessageLookupByLibrary.simpleMessage(\"No info\"),\n    \"noLongerRemind\": MessageLookupByLibrary.simpleMessage(\n      \"Don\\'t remind again\",\n    ),\n    \"noMoreInfoDesc\": MessageLookupByLibrary.simpleMessage(\"No more info\"),\n    \"noNetwork\": MessageLookupByLibrary.simpleMessage(\"No network\"),\n    \"noNetworkApp\": MessageLookupByLibrary.simpleMessage(\"No network APP\"),\n    \"noProxy\": MessageLookupByLibrary.simpleMessage(\"No proxy\"),\n    \"noProxyDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Please create a profile or add a valid profile\",\n    ),\n    \"noResolve\": MessageLookupByLibrary.simpleMessage(\"No resolve IP\"),\n    \"none\": MessageLookupByLibrary.simpleMessage(\"none\"),\n    \"notSelectedTip\": MessageLookupByLibrary.simpleMessage(\n      \"The current proxy group cannot be selected.\",\n    ),\n    \"nullProfileDesc\": MessageLookupByLibrary.simpleMessage(\n      \"No profile, Please add a profile\",\n    ),\n    \"nullTip\": m9,\n    \"numberTip\": m10,\n    \"oneColumn\": MessageLookupByLibrary.simpleMessage(\"One column\"),\n    \"onlyIcon\": MessageLookupByLibrary.simpleMessage(\"Icon\"),\n    \"onlyOtherApps\": MessageLookupByLibrary.simpleMessage(\n      \"Only third-party apps\",\n    ),\n    \"onlyStatisticsProxy\": MessageLookupByLibrary.simpleMessage(\n      \"Only statistics proxy\",\n    ),\n    \"onlyStatisticsProxyDesc\": MessageLookupByLibrary.simpleMessage(\n      \"When turned on, only statistics proxy traffic\",\n    ),\n    \"options\": MessageLookupByLibrary.simpleMessage(\"Options\"),\n    \"other\": MessageLookupByLibrary.simpleMessage(\"Other\"),\n    \"otherContributors\": MessageLookupByLibrary.simpleMessage(\n      \"Other contributors\",\n    ),\n    \"outboundMode\": MessageLookupByLibrary.simpleMessage(\"Outbound mode\"),\n    \"override\": MessageLookupByLibrary.simpleMessage(\"Override\"),\n    \"overrideDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Override Proxy related config\",\n    ),\n    \"overrideDns\": MessageLookupByLibrary.simpleMessage(\"Override Dns\"),\n    \"overrideDnsDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Turning it on will override the DNS options in the profile\",\n    ),\n    \"overrideInvalidTip\": MessageLookupByLibrary.simpleMessage(\n      \"Does not take effect in script mode\",\n    ),\n    \"overrideMode\": MessageLookupByLibrary.simpleMessage(\"Override mode\"),\n    \"overrideOriginRules\": MessageLookupByLibrary.simpleMessage(\n      \"Override the original rule\",\n    ),\n    \"overrideScript\": MessageLookupByLibrary.simpleMessage(\"Override script\"),\n    \"overwriteTypeCustom\": MessageLookupByLibrary.simpleMessage(\"Custom\"),\n    \"overwriteTypeCustomDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Custom mode, fully customize proxy groups and rules\",\n    ),\n    \"palette\": MessageLookupByLibrary.simpleMessage(\"Palette\"),\n    \"password\": MessageLookupByLibrary.simpleMessage(\"Password\"),\n    \"paste\": MessageLookupByLibrary.simpleMessage(\"Paste\"),\n    \"pleaseBindWebDAV\": MessageLookupByLibrary.simpleMessage(\n      \"Please bind WebDAV\",\n    ),\n    \"pleaseEnterScriptName\": MessageLookupByLibrary.simpleMessage(\n      \"Please enter a script name\",\n    ),\n    \"pleaseInputAdminPassword\": MessageLookupByLibrary.simpleMessage(\n      \"Please enter the admin password\",\n    ),\n    \"pleaseUploadFile\": MessageLookupByLibrary.simpleMessage(\n      \"Please upload file\",\n    ),\n    \"pleaseUploadValidQrcode\": MessageLookupByLibrary.simpleMessage(\n      \"Please upload a valid QR code\",\n    ),\n    \"port\": MessageLookupByLibrary.simpleMessage(\"Port\"),\n    \"portConflictTip\": MessageLookupByLibrary.simpleMessage(\n      \"Please enter a different port\",\n    ),\n    \"portTip\": m11,\n    \"preferH3Desc\": MessageLookupByLibrary.simpleMessage(\n      \"Prioritize the use of DOH\\'s http/3\",\n    ),\n    \"pressKeyboard\": MessageLookupByLibrary.simpleMessage(\n      \"Please press the keyboard.\",\n    ),\n    \"preview\": MessageLookupByLibrary.simpleMessage(\"Preview\"),\n    \"process\": MessageLookupByLibrary.simpleMessage(\"Process\"),\n    \"profile\": MessageLookupByLibrary.simpleMessage(\"Profile\"),\n    \"profileAutoUpdateIntervalInvalidValidationDesc\":\n        MessageLookupByLibrary.simpleMessage(\n          \"Please input a valid interval time format\",\n        ),\n    \"profileAutoUpdateIntervalNullValidationDesc\":\n        MessageLookupByLibrary.simpleMessage(\n          \"Please enter the auto update interval time\",\n        ),\n    \"profileHasUpdate\": MessageLookupByLibrary.simpleMessage(\n      \"The profile has been modified. Do you want to disable auto update?\",\n    ),\n    \"profileNameNullValidationDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Please input the profile name\",\n    ),\n    \"profileParseErrorDesc\": MessageLookupByLibrary.simpleMessage(\n      \"profile parse error\",\n    ),\n    \"profileUrlInvalidValidationDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Please input a valid profile URL\",\n    ),\n    \"profileUrlNullValidationDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Please input the profile URL\",\n    ),\n    \"profiles\": MessageLookupByLibrary.simpleMessage(\"Profiles\"),\n    \"profilesSort\": MessageLookupByLibrary.simpleMessage(\"Profiles sort\"),\n    \"project\": MessageLookupByLibrary.simpleMessage(\"Project\"),\n    \"providers\": MessageLookupByLibrary.simpleMessage(\"Providers\"),\n    \"proxies\": MessageLookupByLibrary.simpleMessage(\"Proxies\"),\n    \"proxiesSetting\": MessageLookupByLibrary.simpleMessage(\"Proxies setting\"),\n    \"proxyChains\": MessageLookupByLibrary.simpleMessage(\"Proxy chains\"),\n    \"proxyGroup\": MessageLookupByLibrary.simpleMessage(\"Proxy group\"),\n    \"proxyNameserver\": MessageLookupByLibrary.simpleMessage(\"Proxy nameserver\"),\n    \"proxyNameserverDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Domain for resolving proxy nodes\",\n    ),\n    \"proxyPort\": MessageLookupByLibrary.simpleMessage(\"ProxyPort\"),\n    \"proxyPortDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Set the Clash listening port\",\n    ),\n    \"proxyProviders\": MessageLookupByLibrary.simpleMessage(\"Proxy providers\"),\n    \"pruneCache\": MessageLookupByLibrary.simpleMessage(\"Prune cache\"),\n    \"pureBlackMode\": MessageLookupByLibrary.simpleMessage(\"Pure black mode\"),\n    \"qrcode\": MessageLookupByLibrary.simpleMessage(\"QR code\"),\n    \"qrcodeDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Scan QR code to obtain profile\",\n    ),\n    \"rainbowScheme\": MessageLookupByLibrary.simpleMessage(\"Rainbow\"),\n    \"redirPort\": MessageLookupByLibrary.simpleMessage(\"Redir Port\"),\n    \"redo\": MessageLookupByLibrary.simpleMessage(\"redo\"),\n    \"regExp\": MessageLookupByLibrary.simpleMessage(\"RegExp\"),\n    \"reload\": MessageLookupByLibrary.simpleMessage(\"Reload\"),\n    \"remote\": MessageLookupByLibrary.simpleMessage(\"Remote\"),\n    \"remoteBackupDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Backup local data to WebDAV\",\n    ),\n    \"remoteDestination\": MessageLookupByLibrary.simpleMessage(\n      \"Remote destination\",\n    ),\n    \"remove\": MessageLookupByLibrary.simpleMessage(\"Remove\"),\n    \"rename\": MessageLookupByLibrary.simpleMessage(\"Rename\"),\n    \"request\": MessageLookupByLibrary.simpleMessage(\"Request\"),\n    \"requests\": MessageLookupByLibrary.simpleMessage(\"Requests\"),\n    \"requestsDesc\": MessageLookupByLibrary.simpleMessage(\n      \"View recently request records\",\n    ),\n    \"reset\": MessageLookupByLibrary.simpleMessage(\"Reset\"),\n    \"resetPageChangesTip\": MessageLookupByLibrary.simpleMessage(\n      \"The current page has changes. Are you sure you want to reset?\",\n    ),\n    \"resetTip\": MessageLookupByLibrary.simpleMessage(\"Make sure to reset\"),\n    \"resources\": MessageLookupByLibrary.simpleMessage(\"Resources\"),\n    \"resourcesDesc\": MessageLookupByLibrary.simpleMessage(\n      \"External resource related info\",\n    ),\n    \"respectRules\": MessageLookupByLibrary.simpleMessage(\"Respect rules\"),\n    \"respectRulesDesc\": MessageLookupByLibrary.simpleMessage(\n      \"DNS connection following rules, need to configure proxy-server-nameserver\",\n    ),\n    \"restart\": MessageLookupByLibrary.simpleMessage(\"Restart\"),\n    \"restartCoreTip\": MessageLookupByLibrary.simpleMessage(\n      \"Are you sure you want to restart the core?\",\n    ),\n    \"restore\": MessageLookupByLibrary.simpleMessage(\"Restore\"),\n    \"restoreAllData\": MessageLookupByLibrary.simpleMessage(\"Restore all data\"),\n    \"restoreException\": MessageLookupByLibrary.simpleMessage(\n      \"Recovery exception\",\n    ),\n    \"restoreFromFileDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Restore data via file\",\n    ),\n    \"restoreFromWebDAVDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Restore data via WebDAV\",\n    ),\n    \"restoreOnlyConfig\": MessageLookupByLibrary.simpleMessage(\n      \"Restore configuration files only\",\n    ),\n    \"restoreStrategy\": MessageLookupByLibrary.simpleMessage(\"Restore strategy\"),\n    \"restoreStrategy_compatible\": MessageLookupByLibrary.simpleMessage(\n      \"Compatible\",\n    ),\n    \"restoreStrategy_override\": MessageLookupByLibrary.simpleMessage(\n      \"Override\",\n    ),\n    \"restoreSuccess\": MessageLookupByLibrary.simpleMessage(\"Restore success\"),\n    \"routeAddress\": MessageLookupByLibrary.simpleMessage(\"Route address\"),\n    \"routeAddressDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Config listen route address\",\n    ),\n    \"routeMode\": MessageLookupByLibrary.simpleMessage(\"Route mode\"),\n    \"routeMode_bypassPrivate\": MessageLookupByLibrary.simpleMessage(\n      \"Bypass private route address\",\n    ),\n    \"routeMode_config\": MessageLookupByLibrary.simpleMessage(\"Use config\"),\n    \"ru\": MessageLookupByLibrary.simpleMessage(\"Russian\"),\n    \"rule\": MessageLookupByLibrary.simpleMessage(\"Rule\"),\n    \"ruleName\": MessageLookupByLibrary.simpleMessage(\"Rule name\"),\n    \"ruleProviders\": MessageLookupByLibrary.simpleMessage(\"Rule providers\"),\n    \"ruleTarget\": MessageLookupByLibrary.simpleMessage(\"Rule target\"),\n    \"save\": MessageLookupByLibrary.simpleMessage(\"Save\"),\n    \"saveChanges\": MessageLookupByLibrary.simpleMessage(\n      \"Do you want to save the changes?\",\n    ),\n    \"saveTip\": MessageLookupByLibrary.simpleMessage(\n      \"Are you sure you want to save?\",\n    ),\n    \"script\": MessageLookupByLibrary.simpleMessage(\"Script\"),\n    \"scriptModeDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Script mode, use external extension scripts, provide one-click override configuration capability\",\n    ),\n    \"search\": MessageLookupByLibrary.simpleMessage(\"Search\"),\n    \"seconds\": MessageLookupByLibrary.simpleMessage(\"Seconds\"),\n    \"selectAll\": MessageLookupByLibrary.simpleMessage(\"Select all\"),\n    \"selected\": MessageLookupByLibrary.simpleMessage(\"Selected\"),\n    \"selectedCountTitle\": m12,\n    \"settings\": MessageLookupByLibrary.simpleMessage(\"Settings\"),\n    \"show\": MessageLookupByLibrary.simpleMessage(\"Show\"),\n    \"shrink\": MessageLookupByLibrary.simpleMessage(\"Shrink\"),\n    \"silentLaunch\": MessageLookupByLibrary.simpleMessage(\"SilentLaunch\"),\n    \"silentLaunchDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Start in the background\",\n    ),\n    \"size\": MessageLookupByLibrary.simpleMessage(\"Size\"),\n    \"socksPort\": MessageLookupByLibrary.simpleMessage(\"Socks Port\"),\n    \"sort\": MessageLookupByLibrary.simpleMessage(\"Sort\"),\n    \"source\": MessageLookupByLibrary.simpleMessage(\"Source\"),\n    \"sourceIp\": MessageLookupByLibrary.simpleMessage(\"Source IP\"),\n    \"specialProxy\": MessageLookupByLibrary.simpleMessage(\"Special proxy\"),\n    \"specialRules\": MessageLookupByLibrary.simpleMessage(\"special rules\"),\n    \"speedStatistics\": MessageLookupByLibrary.simpleMessage(\"Speed statistics\"),\n    \"stackMode\": MessageLookupByLibrary.simpleMessage(\"Stack mode\"),\n    \"standard\": MessageLookupByLibrary.simpleMessage(\"Standard\"),\n    \"standardModeDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Standard mode, override basic configuration, provide simple rule addition capability\",\n    ),\n    \"start\": MessageLookupByLibrary.simpleMessage(\"Start\"),\n    \"startVpn\": MessageLookupByLibrary.simpleMessage(\"Starting VPN...\"),\n    \"status\": MessageLookupByLibrary.simpleMessage(\"Status\"),\n    \"statusDesc\": MessageLookupByLibrary.simpleMessage(\n      \"System DNS will be used when turned off\",\n    ),\n    \"stop\": MessageLookupByLibrary.simpleMessage(\"Stop\"),\n    \"stopVpn\": MessageLookupByLibrary.simpleMessage(\"Stopping VPN...\"),\n    \"style\": MessageLookupByLibrary.simpleMessage(\"Style\"),\n    \"subRule\": MessageLookupByLibrary.simpleMessage(\"Sub rule\"),\n    \"submit\": MessageLookupByLibrary.simpleMessage(\"Submit\"),\n    \"sync\": MessageLookupByLibrary.simpleMessage(\"Sync\"),\n    \"system\": MessageLookupByLibrary.simpleMessage(\"System\"),\n    \"systemApp\": MessageLookupByLibrary.simpleMessage(\"System APP\"),\n    \"systemFont\": MessageLookupByLibrary.simpleMessage(\"System font\"),\n    \"systemProxy\": MessageLookupByLibrary.simpleMessage(\"System proxy\"),\n    \"systemProxyDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Attach HTTP proxy to VpnService\",\n    ),\n    \"tab\": MessageLookupByLibrary.simpleMessage(\"Tab\"),\n    \"tabAnimation\": MessageLookupByLibrary.simpleMessage(\"Tab animation\"),\n    \"tabAnimationDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Effective only in mobile view\",\n    ),\n    \"tcpConcurrent\": MessageLookupByLibrary.simpleMessage(\"TCP concurrent\"),\n    \"tcpConcurrentDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Enabling it will allow TCP concurrency\",\n    ),\n    \"testUrl\": MessageLookupByLibrary.simpleMessage(\"Test url\"),\n    \"textScale\": MessageLookupByLibrary.simpleMessage(\"Text Scaling\"),\n    \"theme\": MessageLookupByLibrary.simpleMessage(\"Theme\"),\n    \"themeColor\": MessageLookupByLibrary.simpleMessage(\"Theme color\"),\n    \"themeDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Set dark mode,adjust the color\",\n    ),\n    \"themeMode\": MessageLookupByLibrary.simpleMessage(\"Theme mode\"),\n    \"threeColumns\": MessageLookupByLibrary.simpleMessage(\"Three columns\"),\n    \"tight\": MessageLookupByLibrary.simpleMessage(\"Tight\"),\n    \"time\": MessageLookupByLibrary.simpleMessage(\"Time\"),\n    \"tip\": MessageLookupByLibrary.simpleMessage(\"tip\"),\n    \"toggle\": MessageLookupByLibrary.simpleMessage(\"Toggle\"),\n    \"tonalSpotScheme\": MessageLookupByLibrary.simpleMessage(\"TonalSpot\"),\n    \"tools\": MessageLookupByLibrary.simpleMessage(\"Tools\"),\n    \"tproxyPort\": MessageLookupByLibrary.simpleMessage(\"Tproxy Port\"),\n    \"trafficUsage\": MessageLookupByLibrary.simpleMessage(\"Traffic usage\"),\n    \"tun\": MessageLookupByLibrary.simpleMessage(\"TUN\"),\n    \"tunDesc\": MessageLookupByLibrary.simpleMessage(\n      \"only effective in administrator mode\",\n    ),\n    \"turnOff\": MessageLookupByLibrary.simpleMessage(\"Turn Off\"),\n    \"turnOn\": MessageLookupByLibrary.simpleMessage(\"Turn On\"),\n    \"twoColumns\": MessageLookupByLibrary.simpleMessage(\"Two columns\"),\n    \"unableToUpdateCurrentProfileDesc\": MessageLookupByLibrary.simpleMessage(\n      \"unable to update current profile\",\n    ),\n    \"undo\": MessageLookupByLibrary.simpleMessage(\"undo\"),\n    \"unifiedDelay\": MessageLookupByLibrary.simpleMessage(\"Unified delay\"),\n    \"unifiedDelayDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Remove extra delays such as handshaking\",\n    ),\n    \"unknown\": MessageLookupByLibrary.simpleMessage(\"Unknown\"),\n    \"unknownNetworkError\": MessageLookupByLibrary.simpleMessage(\n      \"Unknown network error\",\n    ),\n    \"unnamed\": MessageLookupByLibrary.simpleMessage(\"Unnamed\"),\n    \"update\": MessageLookupByLibrary.simpleMessage(\"Update\"),\n    \"upload\": MessageLookupByLibrary.simpleMessage(\"Upload\"),\n    \"url\": MessageLookupByLibrary.simpleMessage(\"URL\"),\n    \"urlDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Obtain profile through URL\",\n    ),\n    \"urlTip\": m13,\n    \"useHosts\": MessageLookupByLibrary.simpleMessage(\"Use hosts\"),\n    \"useSystemHosts\": MessageLookupByLibrary.simpleMessage(\"Use system hosts\"),\n    \"value\": MessageLookupByLibrary.simpleMessage(\"Value\"),\n    \"vibrantScheme\": MessageLookupByLibrary.simpleMessage(\"Vibrant\"),\n    \"view\": MessageLookupByLibrary.simpleMessage(\"View\"),\n    \"vpnConfigChangeDetected\": MessageLookupByLibrary.simpleMessage(\n      \"VPN configuration change detected\",\n    ),\n    \"vpnDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Modify VPN related settings\",\n    ),\n    \"vpnEnableDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Auto routes all system traffic through VpnService\",\n    ),\n    \"vpnSystemProxyDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Attach HTTP proxy to VpnService\",\n    ),\n    \"vpnTip\": MessageLookupByLibrary.simpleMessage(\n      \"Changes take effect after restarting the VPN\",\n    ),\n    \"webDAVConfiguration\": MessageLookupByLibrary.simpleMessage(\n      \"WebDAV configuration\",\n    ),\n    \"whitelistMode\": MessageLookupByLibrary.simpleMessage(\"Whitelist mode\"),\n    \"years\": MessageLookupByLibrary.simpleMessage(\"Years\"),\n    \"yearsAgo\": m14,\n    \"zh_CN\": MessageLookupByLibrary.simpleMessage(\"Simplified Chinese\"),\n  };\n}\n"
  },
  {
    "path": "lib/l10n/intl/messages_ja.dart",
    "content": "// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart\n// This is a library that provides messages for a ja locale. All the\n// messages from the main program should be duplicated here with the same\n// function name.\n\n// Ignore issues from commonly used lints in this file.\n// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new\n// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering\n// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases\n// ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes\n// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes\n\nimport 'package:intl/intl.dart';\nimport 'package:intl/message_lookup_by_library.dart';\n\nfinal messages = new MessageLookup();\n\ntypedef String MessageIfAbsent(String messageStr, List<dynamic> args);\n\nclass MessageLookup extends MessageLookupByLibrary {\n  String get localeName => 'ja';\n\n  static String m0(count) => \"${count}日前\";\n\n  static String m1(label) => \"選択された${label}を削除してもよろしいですか？\";\n\n  static String m2(label) => \"現在の${label}を削除してもよろしいですか？\";\n\n  static String m3(label) => \"${label}詳細\";\n\n  static String m4(label) => \"${label}は空欄にできません\";\n\n  static String m5(label) => \"現在の${label}は既に存在しています\";\n\n  static String m6(count) => \"${count}時間前\";\n\n  static String m7(count) => \"${count}分前\";\n\n  static String m8(count) => \"${count}ヶ月前\";\n\n  static String m9(label) => \"まだ${label}はありません\";\n\n  static String m10(label) => \"${label}は数字でなければなりません\";\n\n  static String m11(label) => \"${label} は 1024 から 49151 の間でなければなりません\";\n\n  static String m12(count) => \"${count} 項目が選択されています\";\n\n  static String m13(label) => \"${label}はURLである必要があります\";\n\n  static String m14(count) => \"${count}年前\";\n\n  final messages = _notInlinedMessages(_notInlinedMessages);\n  static Map<String, Function> _notInlinedMessages(_) => <String, Function>{\n    \"about\": MessageLookupByLibrary.simpleMessage(\"について\"),\n    \"accessControl\": MessageLookupByLibrary.simpleMessage(\"アクセス制御\"),\n    \"accessControlAllowDesc\": MessageLookupByLibrary.simpleMessage(\n      \"選択したアプリのみVPNを許可\",\n    ),\n    \"accessControlDesc\": MessageLookupByLibrary.simpleMessage(\n      \"アプリケーションのプロキシアクセスを設定\",\n    ),\n    \"accessControlNotAllowDesc\": MessageLookupByLibrary.simpleMessage(\n      \"選択したアプリをVPNから除外\",\n    ),\n    \"accessControlSettings\": MessageLookupByLibrary.simpleMessage(\"アクセス制御設定\"),\n    \"account\": MessageLookupByLibrary.simpleMessage(\"アカウント\"),\n    \"action\": MessageLookupByLibrary.simpleMessage(\"アクション\"),\n    \"action_mode\": MessageLookupByLibrary.simpleMessage(\"モード切替\"),\n    \"action_proxy\": MessageLookupByLibrary.simpleMessage(\"システムプロキシ\"),\n    \"action_start\": MessageLookupByLibrary.simpleMessage(\"開始/停止\"),\n    \"action_tun\": MessageLookupByLibrary.simpleMessage(\"TUN\"),\n    \"action_view\": MessageLookupByLibrary.simpleMessage(\"表示/非表示\"),\n    \"add\": MessageLookupByLibrary.simpleMessage(\"追加\"),\n    \"addProfile\": MessageLookupByLibrary.simpleMessage(\"プロファイルを追加\"),\n    \"addRule\": MessageLookupByLibrary.simpleMessage(\"ルールを追加\"),\n    \"addedOriginRules\": MessageLookupByLibrary.simpleMessage(\"元のルールに追加\"),\n    \"addedRules\": MessageLookupByLibrary.simpleMessage(\"追加ルール\"),\n    \"address\": MessageLookupByLibrary.simpleMessage(\"アドレス\"),\n    \"addressHelp\": MessageLookupByLibrary.simpleMessage(\"WebDAVサーバーアドレス\"),\n    \"addressTip\": MessageLookupByLibrary.simpleMessage(\"有効なWebDAVアドレスを入力\"),\n    \"adminAutoLaunch\": MessageLookupByLibrary.simpleMessage(\"管理者自動起動\"),\n    \"adminAutoLaunchDesc\": MessageLookupByLibrary.simpleMessage(\"管理者モードで起動\"),\n    \"advancedConfig\": MessageLookupByLibrary.simpleMessage(\"高度な設定\"),\n    \"advancedConfigDesc\": MessageLookupByLibrary.simpleMessage(\"多様な設定を提供\"),\n    \"ago\": MessageLookupByLibrary.simpleMessage(\"前\"),\n    \"agree\": MessageLookupByLibrary.simpleMessage(\"同意\"),\n    \"allApps\": MessageLookupByLibrary.simpleMessage(\"全アプリ\"),\n    \"allowBypass\": MessageLookupByLibrary.simpleMessage(\"アプリがVPNをバイパスすることを許可\"),\n    \"allowBypassDesc\": MessageLookupByLibrary.simpleMessage(\n      \"有効化すると一部アプリがVPNをバイパス\",\n    ),\n    \"allowLan\": MessageLookupByLibrary.simpleMessage(\"LANを許可\"),\n    \"allowLanDesc\": MessageLookupByLibrary.simpleMessage(\"LAN経由でのプロキシアクセスを許可\"),\n    \"app\": MessageLookupByLibrary.simpleMessage(\"アプリ\"),\n    \"appAccessControl\": MessageLookupByLibrary.simpleMessage(\"アプリアクセス制御\"),\n    \"appDesc\": MessageLookupByLibrary.simpleMessage(\"アプリ関連設定の処理\"),\n    \"appendSystemDns\": MessageLookupByLibrary.simpleMessage(\"システムDNSを追加\"),\n    \"appendSystemDnsTip\": MessageLookupByLibrary.simpleMessage(\n      \"設定にシステムDNSを強制的に追加します\",\n    ),\n    \"application\": MessageLookupByLibrary.simpleMessage(\"アプリケーション\"),\n    \"applicationDesc\": MessageLookupByLibrary.simpleMessage(\"アプリ関連設定を変更\"),\n    \"auto\": MessageLookupByLibrary.simpleMessage(\"自動\"),\n    \"autoCheckUpdate\": MessageLookupByLibrary.simpleMessage(\"自動更新チェック\"),\n    \"autoCheckUpdateDesc\": MessageLookupByLibrary.simpleMessage(\n      \"起動時に更新を自動チェック\",\n    ),\n    \"autoCloseConnections\": MessageLookupByLibrary.simpleMessage(\"接続を自動閉じる\"),\n    \"autoCloseConnectionsDesc\": MessageLookupByLibrary.simpleMessage(\n      \"ノード変更後に接続を自動閉じる\",\n    ),\n    \"autoLaunch\": MessageLookupByLibrary.simpleMessage(\"自動起動\"),\n    \"autoLaunchDesc\": MessageLookupByLibrary.simpleMessage(\"システムの自動起動に従う\"),\n    \"autoRun\": MessageLookupByLibrary.simpleMessage(\"自動実行\"),\n    \"autoRunDesc\": MessageLookupByLibrary.simpleMessage(\"アプリ起動時に自動実行\"),\n    \"autoSetSystemDns\": MessageLookupByLibrary.simpleMessage(\"オートセットシステムDNS\"),\n    \"autoUpdate\": MessageLookupByLibrary.simpleMessage(\"自動更新\"),\n    \"autoUpdateInterval\": MessageLookupByLibrary.simpleMessage(\"自動更新間隔（分）\"),\n    \"backup\": MessageLookupByLibrary.simpleMessage(\"バックアップ\"),\n    \"backupAndRestore\": MessageLookupByLibrary.simpleMessage(\"バックアップと復元\"),\n    \"backupAndRestoreDesc\": MessageLookupByLibrary.simpleMessage(\n      \"WebDAVまたはファイルを介してデータを同期する\",\n    ),\n    \"backupSuccess\": MessageLookupByLibrary.simpleMessage(\"バックアップ成功\"),\n    \"basicConfig\": MessageLookupByLibrary.simpleMessage(\"基本設定\"),\n    \"basicConfigDesc\": MessageLookupByLibrary.simpleMessage(\"基本設定をグローバルに変更\"),\n    \"bind\": MessageLookupByLibrary.simpleMessage(\"バインド\"),\n    \"blacklistMode\": MessageLookupByLibrary.simpleMessage(\"ブラックリストモード\"),\n    \"bypassDomain\": MessageLookupByLibrary.simpleMessage(\"バイパスドメイン\"),\n    \"bypassDomainDesc\": MessageLookupByLibrary.simpleMessage(\"システムプロキシ有効時のみ適用\"),\n    \"cacheCorrupt\": MessageLookupByLibrary.simpleMessage(\n      \"キャッシュが破損しています。クリアしますか？\",\n    ),\n    \"cancel\": MessageLookupByLibrary.simpleMessage(\"キャンセル\"),\n    \"cancelFilterSystemApp\": MessageLookupByLibrary.simpleMessage(\n      \"システムアプリの除外を解除\",\n    ),\n    \"cancelSelectAll\": MessageLookupByLibrary.simpleMessage(\"全選択解除\"),\n    \"checkError\": MessageLookupByLibrary.simpleMessage(\"確認エラー\"),\n    \"checkUpdate\": MessageLookupByLibrary.simpleMessage(\"更新を確認\"),\n    \"checkUpdateError\": MessageLookupByLibrary.simpleMessage(\"アプリは最新版です\"),\n    \"checking\": MessageLookupByLibrary.simpleMessage(\"確認中...\"),\n    \"clearData\": MessageLookupByLibrary.simpleMessage(\"データを消去\"),\n    \"clipboardExport\": MessageLookupByLibrary.simpleMessage(\"クリップボードにエクスポート\"),\n    \"clipboardImport\": MessageLookupByLibrary.simpleMessage(\"クリップボードからインポート\"),\n    \"color\": MessageLookupByLibrary.simpleMessage(\"カラー\"),\n    \"colorSchemes\": MessageLookupByLibrary.simpleMessage(\"カラースキーム\"),\n    \"columns\": MessageLookupByLibrary.simpleMessage(\"列\"),\n    \"compatible\": MessageLookupByLibrary.simpleMessage(\"互換モード\"),\n    \"compatibleDesc\": MessageLookupByLibrary.simpleMessage(\n      \"有効化すると一部機能を失いますが、Clashの完全サポートを獲得\",\n    ),\n    \"confirm\": MessageLookupByLibrary.simpleMessage(\"確認\"),\n    \"confirmClearAllData\": MessageLookupByLibrary.simpleMessage(\n      \"すべてのデータをクリアしてもよろしいですか？\",\n    ),\n    \"confirmForceCrashCore\": MessageLookupByLibrary.simpleMessage(\n      \"コアを強制的にクラッシュさせてもよろしいですか？\",\n    ),\n    \"connected\": MessageLookupByLibrary.simpleMessage(\"接続済み\"),\n    \"connecting\": MessageLookupByLibrary.simpleMessage(\"接続中...\"),\n    \"connection\": MessageLookupByLibrary.simpleMessage(\"接続\"),\n    \"connections\": MessageLookupByLibrary.simpleMessage(\"接続\"),\n    \"connectionsDesc\": MessageLookupByLibrary.simpleMessage(\"現在の接続データを表示\"),\n    \"connectivity\": MessageLookupByLibrary.simpleMessage(\"接続性：\"),\n    \"contactMe\": MessageLookupByLibrary.simpleMessage(\"連絡する\"),\n    \"content\": MessageLookupByLibrary.simpleMessage(\"内容\"),\n    \"contentScheme\": MessageLookupByLibrary.simpleMessage(\"コンテンツテーマ\"),\n    \"controlGlobalAddedRules\": MessageLookupByLibrary.simpleMessage(\n      \"グローバル追加ルールを制御\",\n    ),\n    \"copy\": MessageLookupByLibrary.simpleMessage(\"コピー\"),\n    \"copyEnvVar\": MessageLookupByLibrary.simpleMessage(\"環境変数をコピー\"),\n    \"copyLink\": MessageLookupByLibrary.simpleMessage(\"リンクをコピー\"),\n    \"copySuccess\": MessageLookupByLibrary.simpleMessage(\"コピー成功\"),\n    \"core\": MessageLookupByLibrary.simpleMessage(\"コア\"),\n    \"coreConfigChangeDetected\": MessageLookupByLibrary.simpleMessage(\n      \"コア設定の変更が検出されました\",\n    ),\n    \"coreInfo\": MessageLookupByLibrary.simpleMessage(\"コア情報\"),\n    \"coreStatus\": MessageLookupByLibrary.simpleMessage(\"コアステータス\"),\n    \"country\": MessageLookupByLibrary.simpleMessage(\"国\"),\n    \"crashTest\": MessageLookupByLibrary.simpleMessage(\"クラッシュテスト\"),\n    \"crashlytics\": MessageLookupByLibrary.simpleMessage(\"クラッシュ分析\"),\n    \"crashlyticsTip\": MessageLookupByLibrary.simpleMessage(\n      \"有効にすると、アプリがクラッシュした際に機密情報を含まないクラッシュログを自動的にアップロードします\",\n    ),\n    \"create\": MessageLookupByLibrary.simpleMessage(\"作成\"),\n    \"creationTime\": MessageLookupByLibrary.simpleMessage(\"作成時間\"),\n    \"cut\": MessageLookupByLibrary.simpleMessage(\"切り取り\"),\n    \"dark\": MessageLookupByLibrary.simpleMessage(\"ダーク\"),\n    \"dashboard\": MessageLookupByLibrary.simpleMessage(\"ダッシュボード\"),\n    \"dataCollectionContent\": MessageLookupByLibrary.simpleMessage(\n      \"本アプリはFirebase Crashlyticsを使用してクラッシュ情報を収集し、アプリの安定性を向上させます。\\n収集されるデータにはデバイス情報とクラッシュ詳細が含まれますが、個人の機密データは含まれません。\\n設定でこの機能を無効にすることができます。\",\n    ),\n    \"dataCollectionTip\": MessageLookupByLibrary.simpleMessage(\"データ収集説明\"),\n    \"days\": MessageLookupByLibrary.simpleMessage(\"日\"),\n    \"daysAgo\": m0,\n    \"defaultNameserver\": MessageLookupByLibrary.simpleMessage(\"デフォルトネームサーバー\"),\n    \"defaultNameserverDesc\": MessageLookupByLibrary.simpleMessage(\n      \"DNSサーバーの解決用\",\n    ),\n    \"defaultSort\": MessageLookupByLibrary.simpleMessage(\"デフォルト順\"),\n    \"defaultText\": MessageLookupByLibrary.simpleMessage(\"デフォルト\"),\n    \"delay\": MessageLookupByLibrary.simpleMessage(\"遅延\"),\n    \"delaySort\": MessageLookupByLibrary.simpleMessage(\"遅延順\"),\n    \"delayTest\": MessageLookupByLibrary.simpleMessage(\"遅延テスト\"),\n    \"delete\": MessageLookupByLibrary.simpleMessage(\"削除\"),\n    \"deleteMultipTip\": m1,\n    \"deleteTip\": m2,\n    \"desc\": MessageLookupByLibrary.simpleMessage(\n      \"ClashMetaベースのマルチプラットフォームプロキシクライアント。シンプルで使いやすく、オープンソースで広告なし。\",\n    ),\n    \"destination\": MessageLookupByLibrary.simpleMessage(\"宛先\"),\n    \"destinationGeoIP\": MessageLookupByLibrary.simpleMessage(\"宛先地理情報\"),\n    \"destinationIPASN\": MessageLookupByLibrary.simpleMessage(\"宛先IP ASN\"),\n    \"details\": m3,\n    \"detectionTip\": MessageLookupByLibrary.simpleMessage(\"サードパーティAPIに依存（参考値）\"),\n    \"developerMode\": MessageLookupByLibrary.simpleMessage(\"デベロッパーモード\"),\n    \"developerModeEnableTip\": MessageLookupByLibrary.simpleMessage(\n      \"デベロッパーモードが有効になりました。\",\n    ),\n    \"direct\": MessageLookupByLibrary.simpleMessage(\"ダイレクト\"),\n    \"disclaimer\": MessageLookupByLibrary.simpleMessage(\"免責事項\"),\n    \"disclaimerDesc\": MessageLookupByLibrary.simpleMessage(\n      \"本ソフトウェアは学習交流や科学研究などの非営利目的でのみ使用されます。商用利用は厳禁です。いかなる商用活動も本ソフトウェアとは無関係です。\",\n    ),\n    \"disconnected\": MessageLookupByLibrary.simpleMessage(\"切断済み\"),\n    \"discoverNewVersion\": MessageLookupByLibrary.simpleMessage(\"新バージョンを発見\"),\n    \"discovery\": MessageLookupByLibrary.simpleMessage(\"新しいバージョンを発見\"),\n    \"dnsDesc\": MessageLookupByLibrary.simpleMessage(\"DNS関連設定の更新\"),\n    \"dnsHijacking\": MessageLookupByLibrary.simpleMessage(\"DNSハイジャッキング\"),\n    \"dnsMode\": MessageLookupByLibrary.simpleMessage(\"DNSモード\"),\n    \"doYouWantToPass\": MessageLookupByLibrary.simpleMessage(\"通過させますか？\"),\n    \"domain\": MessageLookupByLibrary.simpleMessage(\"ドメイン\"),\n    \"download\": MessageLookupByLibrary.simpleMessage(\"ダウンロード\"),\n    \"edit\": MessageLookupByLibrary.simpleMessage(\"編集\"),\n    \"editGlobalRules\": MessageLookupByLibrary.simpleMessage(\"グローバルルールを編集\"),\n    \"editRule\": MessageLookupByLibrary.simpleMessage(\"ルールを編集\"),\n    \"emptyTip\": m4,\n    \"en\": MessageLookupByLibrary.simpleMessage(\"英語\"),\n    \"enableOverride\": MessageLookupByLibrary.simpleMessage(\"上書きを有効化\"),\n    \"entries\": MessageLookupByLibrary.simpleMessage(\" エントリ\"),\n    \"exclude\": MessageLookupByLibrary.simpleMessage(\"最近のタスクから非表示\"),\n    \"excludeDesc\": MessageLookupByLibrary.simpleMessage(\n      \"アプリがバックグラウンド時に最近のタスクから非表示\",\n    ),\n    \"existsTip\": m5,\n    \"exit\": MessageLookupByLibrary.simpleMessage(\"終了\"),\n    \"expand\": MessageLookupByLibrary.simpleMessage(\"標準\"),\n    \"expirationTime\": MessageLookupByLibrary.simpleMessage(\"有効期限\"),\n    \"exportFile\": MessageLookupByLibrary.simpleMessage(\"ファイルをエクスポート\"),\n    \"exportLogs\": MessageLookupByLibrary.simpleMessage(\"ログをエクスポート\"),\n    \"exportSuccess\": MessageLookupByLibrary.simpleMessage(\"エクスポート成功\"),\n    \"expressiveScheme\": MessageLookupByLibrary.simpleMessage(\"エクスプレッシブ\"),\n    \"externalController\": MessageLookupByLibrary.simpleMessage(\"外部コントローラー\"),\n    \"externalControllerDesc\": MessageLookupByLibrary.simpleMessage(\n      \"有効化するとClashコアをポート9090で制御可能\",\n    ),\n    \"externalFetch\": MessageLookupByLibrary.simpleMessage(\"外部取得\"),\n    \"externalLink\": MessageLookupByLibrary.simpleMessage(\"外部リンク\"),\n    \"externalResources\": MessageLookupByLibrary.simpleMessage(\"外部リソース\"),\n    \"fakeipFilter\": MessageLookupByLibrary.simpleMessage(\"Fakeipフィルター\"),\n    \"fakeipRange\": MessageLookupByLibrary.simpleMessage(\"Fakeip範囲\"),\n    \"fallback\": MessageLookupByLibrary.simpleMessage(\"フォールバック\"),\n    \"fallbackDesc\": MessageLookupByLibrary.simpleMessage(\"通常はオフショアDNSを使用\"),\n    \"fallbackFilter\": MessageLookupByLibrary.simpleMessage(\"フォールバックフィルター\"),\n    \"fidelityScheme\": MessageLookupByLibrary.simpleMessage(\"ハイファイデリティー\"),\n    \"file\": MessageLookupByLibrary.simpleMessage(\"ファイル\"),\n    \"fileDesc\": MessageLookupByLibrary.simpleMessage(\"プロファイルを直接アップロード\"),\n    \"fileIsUpdate\": MessageLookupByLibrary.simpleMessage(\n      \"ファイルが変更されました。保存しますか？\",\n    ),\n    \"filterSystemApp\": MessageLookupByLibrary.simpleMessage(\"システムアプリを除外\"),\n    \"findProcessMode\": MessageLookupByLibrary.simpleMessage(\"プロセス検出\"),\n    \"findProcessModeDesc\": MessageLookupByLibrary.simpleMessage(\n      \"有効化するとパフォーマンスが若干低下します\",\n    ),\n    \"fontFamily\": MessageLookupByLibrary.simpleMessage(\"フォントファミリー\"),\n    \"forceRestartCoreTip\": MessageLookupByLibrary.simpleMessage(\n      \"コアを強制再起動してもよろしいですか？\",\n    ),\n    \"fourColumns\": MessageLookupByLibrary.simpleMessage(\"4列\"),\n    \"fruitSaladScheme\": MessageLookupByLibrary.simpleMessage(\"フルーツサラダ\"),\n    \"general\": MessageLookupByLibrary.simpleMessage(\"一般\"),\n    \"generalDesc\": MessageLookupByLibrary.simpleMessage(\"一般設定を変更\"),\n    \"geoData\": MessageLookupByLibrary.simpleMessage(\"地域データ\"),\n    \"geodataLoader\": MessageLookupByLibrary.simpleMessage(\"Geo低メモリモード\"),\n    \"geodataLoaderDesc\": MessageLookupByLibrary.simpleMessage(\n      \"有効化するとGeo低メモリローダーを使用\",\n    ),\n    \"geoipCode\": MessageLookupByLibrary.simpleMessage(\"GeoIPコード\"),\n    \"getOriginRules\": MessageLookupByLibrary.simpleMessage(\"元のルールを取得\"),\n    \"global\": MessageLookupByLibrary.simpleMessage(\"グローバル\"),\n    \"go\": MessageLookupByLibrary.simpleMessage(\"移動\"),\n    \"goDownload\": MessageLookupByLibrary.simpleMessage(\"ダウンロードへ\"),\n    \"goToConfigureScript\": MessageLookupByLibrary.simpleMessage(\"スクリプト設定に移動\"),\n    \"hasCacheChange\": MessageLookupByLibrary.simpleMessage(\"変更をキャッシュしますか？\"),\n    \"host\": MessageLookupByLibrary.simpleMessage(\"ホスト\"),\n    \"hostsDesc\": MessageLookupByLibrary.simpleMessage(\"ホストを追加\"),\n    \"hotkeyConflict\": MessageLookupByLibrary.simpleMessage(\"ホットキー競合\"),\n    \"hotkeyManagement\": MessageLookupByLibrary.simpleMessage(\"ホットキー管理\"),\n    \"hotkeyManagementDesc\": MessageLookupByLibrary.simpleMessage(\n      \"キーボードでアプリを制御\",\n    ),\n    \"hours\": MessageLookupByLibrary.simpleMessage(\"時間\"),\n    \"hoursAgo\": m6,\n    \"icon\": MessageLookupByLibrary.simpleMessage(\"アイコン\"),\n    \"iconConfiguration\": MessageLookupByLibrary.simpleMessage(\"アイコン設定\"),\n    \"iconStyle\": MessageLookupByLibrary.simpleMessage(\"アイコンスタイル\"),\n    \"import\": MessageLookupByLibrary.simpleMessage(\"インポート\"),\n    \"importFile\": MessageLookupByLibrary.simpleMessage(\"ファイルからインポート\"),\n    \"importFromURL\": MessageLookupByLibrary.simpleMessage(\"URLからインポート\"),\n    \"importUrl\": MessageLookupByLibrary.simpleMessage(\"URLからインポート\"),\n    \"infiniteTime\": MessageLookupByLibrary.simpleMessage(\"長期有効\"),\n    \"init\": MessageLookupByLibrary.simpleMessage(\"初期化\"),\n    \"inputCorrectHotkey\": MessageLookupByLibrary.simpleMessage(\"正しいホットキーを入力\"),\n    \"intelligentSelected\": MessageLookupByLibrary.simpleMessage(\"インテリジェント選択\"),\n    \"internet\": MessageLookupByLibrary.simpleMessage(\"インターネット\"),\n    \"interval\": MessageLookupByLibrary.simpleMessage(\"インターバル\"),\n    \"intranetIP\": MessageLookupByLibrary.simpleMessage(\"イントラネットIP\"),\n    \"invalidBackupFile\": MessageLookupByLibrary.simpleMessage(\"無効なバックアップファイル\"),\n    \"ipcidr\": MessageLookupByLibrary.simpleMessage(\"IPCIDR\"),\n    \"ipv6Desc\": MessageLookupByLibrary.simpleMessage(\"有効化するとIPv6トラフィックを受信可能\"),\n    \"ipv6InboundDesc\": MessageLookupByLibrary.simpleMessage(\"IPv6インバウンドを許可\"),\n    \"ja\": MessageLookupByLibrary.simpleMessage(\"日本語\"),\n    \"just\": MessageLookupByLibrary.simpleMessage(\"たった今\"),\n    \"justNow\": MessageLookupByLibrary.simpleMessage(\"たった今\"),\n    \"keepAliveIntervalDesc\": MessageLookupByLibrary.simpleMessage(\n      \"TCPキープアライブ間隔\",\n    ),\n    \"key\": MessageLookupByLibrary.simpleMessage(\"キー\"),\n    \"language\": MessageLookupByLibrary.simpleMessage(\"言語\"),\n    \"layout\": MessageLookupByLibrary.simpleMessage(\"レイアウト\"),\n    \"light\": MessageLookupByLibrary.simpleMessage(\"ライト\"),\n    \"list\": MessageLookupByLibrary.simpleMessage(\"リスト\"),\n    \"listen\": MessageLookupByLibrary.simpleMessage(\"リスン\"),\n    \"loadTest\": MessageLookupByLibrary.simpleMessage(\"読み込みテスト\"),\n    \"loading\": MessageLookupByLibrary.simpleMessage(\"読み込み中...\"),\n    \"local\": MessageLookupByLibrary.simpleMessage(\"ローカル\"),\n    \"localBackupDesc\": MessageLookupByLibrary.simpleMessage(\"ローカルにデータをバックアップ\"),\n    \"log\": MessageLookupByLibrary.simpleMessage(\"ログ\"),\n    \"logLevel\": MessageLookupByLibrary.simpleMessage(\"ログレベル\"),\n    \"logcat\": MessageLookupByLibrary.simpleMessage(\"ログキャット\"),\n    \"logcatDesc\": MessageLookupByLibrary.simpleMessage(\"無効化するとログエントリを非表示\"),\n    \"logs\": MessageLookupByLibrary.simpleMessage(\"ログ\"),\n    \"logsDesc\": MessageLookupByLibrary.simpleMessage(\"ログキャプチャ記録\"),\n    \"logsTest\": MessageLookupByLibrary.simpleMessage(\"ログテスト\"),\n    \"loopback\": MessageLookupByLibrary.simpleMessage(\"ループバック解除ツール\"),\n    \"loopbackDesc\": MessageLookupByLibrary.simpleMessage(\"UWPループバック解除用\"),\n    \"loose\": MessageLookupByLibrary.simpleMessage(\"疎\"),\n    \"memoryInfo\": MessageLookupByLibrary.simpleMessage(\"メモリ情報\"),\n    \"messageTest\": MessageLookupByLibrary.simpleMessage(\"メッセージテスト\"),\n    \"messageTestTip\": MessageLookupByLibrary.simpleMessage(\"これはメッセージです。\"),\n    \"min\": MessageLookupByLibrary.simpleMessage(\"最小化\"),\n    \"minimizeOnExit\": MessageLookupByLibrary.simpleMessage(\"終了時に最小化\"),\n    \"minimizeOnExitDesc\": MessageLookupByLibrary.simpleMessage(\n      \"システムの終了イベントを変更\",\n    ),\n    \"minutes\": MessageLookupByLibrary.simpleMessage(\"分\"),\n    \"minutesAgo\": m7,\n    \"mixedPort\": MessageLookupByLibrary.simpleMessage(\"混合ポート\"),\n    \"mode\": MessageLookupByLibrary.simpleMessage(\"モード\"),\n    \"monochromeScheme\": MessageLookupByLibrary.simpleMessage(\"モノクローム\"),\n    \"months\": MessageLookupByLibrary.simpleMessage(\"月\"),\n    \"monthsAgo\": m8,\n    \"more\": MessageLookupByLibrary.simpleMessage(\"詳細\"),\n    \"name\": MessageLookupByLibrary.simpleMessage(\"名前\"),\n    \"nameSort\": MessageLookupByLibrary.simpleMessage(\"名前順\"),\n    \"nameserver\": MessageLookupByLibrary.simpleMessage(\"ネームサーバー\"),\n    \"nameserverDesc\": MessageLookupByLibrary.simpleMessage(\"ドメイン解決用\"),\n    \"nameserverPolicy\": MessageLookupByLibrary.simpleMessage(\"ネームサーバーポリシー\"),\n    \"nameserverPolicyDesc\": MessageLookupByLibrary.simpleMessage(\n      \"対応するネームサーバーポリシーを指定\",\n    ),\n    \"network\": MessageLookupByLibrary.simpleMessage(\"ネットワーク\"),\n    \"networkDesc\": MessageLookupByLibrary.simpleMessage(\"ネットワーク関連設定の変更\"),\n    \"networkDetection\": MessageLookupByLibrary.simpleMessage(\"ネットワーク検出\"),\n    \"networkException\": MessageLookupByLibrary.simpleMessage(\n      \"ネットワーク例外、接続を確認してもう一度お試しください\",\n    ),\n    \"networkRequestException\": MessageLookupByLibrary.simpleMessage(\n      \"ネットワーク要求例外、後でもう一度試してください。\",\n    ),\n    \"networkSpeed\": MessageLookupByLibrary.simpleMessage(\"ネットワーク速度\"),\n    \"networkType\": MessageLookupByLibrary.simpleMessage(\"ネットワーク種別\"),\n    \"neutralScheme\": MessageLookupByLibrary.simpleMessage(\"ニュートラル\"),\n    \"noData\": MessageLookupByLibrary.simpleMessage(\"データなし\"),\n    \"noHotKey\": MessageLookupByLibrary.simpleMessage(\"ホットキーなし\"),\n    \"noIcon\": MessageLookupByLibrary.simpleMessage(\"なし\"),\n    \"noInfo\": MessageLookupByLibrary.simpleMessage(\"情報なし\"),\n    \"noLongerRemind\": MessageLookupByLibrary.simpleMessage(\"今後表示しない\"),\n    \"noMoreInfoDesc\": MessageLookupByLibrary.simpleMessage(\"追加情報なし\"),\n    \"noNetwork\": MessageLookupByLibrary.simpleMessage(\"ネットワークなし\"),\n    \"noNetworkApp\": MessageLookupByLibrary.simpleMessage(\"ネットワークなしアプリ\"),\n    \"noProxy\": MessageLookupByLibrary.simpleMessage(\"プロキシなし\"),\n    \"noProxyDesc\": MessageLookupByLibrary.simpleMessage(\n      \"プロファイルを作成するか、有効なプロファイルを追加してください\",\n    ),\n    \"noResolve\": MessageLookupByLibrary.simpleMessage(\"IPを解決しない\"),\n    \"none\": MessageLookupByLibrary.simpleMessage(\"なし\"),\n    \"notSelectedTip\": MessageLookupByLibrary.simpleMessage(\n      \"現在のプロキシグループは選択できません\",\n    ),\n    \"nullProfileDesc\": MessageLookupByLibrary.simpleMessage(\n      \"プロファイルがありません。追加してください\",\n    ),\n    \"nullTip\": m9,\n    \"numberTip\": m10,\n    \"oneColumn\": MessageLookupByLibrary.simpleMessage(\"1列\"),\n    \"onlyIcon\": MessageLookupByLibrary.simpleMessage(\"アイコンのみ\"),\n    \"onlyOtherApps\": MessageLookupByLibrary.simpleMessage(\"サードパーティアプリのみ\"),\n    \"onlyStatisticsProxy\": MessageLookupByLibrary.simpleMessage(\"プロキシのみ統計\"),\n    \"onlyStatisticsProxyDesc\": MessageLookupByLibrary.simpleMessage(\n      \"有効化するとプロキシトラフィックのみ統計\",\n    ),\n    \"options\": MessageLookupByLibrary.simpleMessage(\"オプション\"),\n    \"other\": MessageLookupByLibrary.simpleMessage(\"その他\"),\n    \"otherContributors\": MessageLookupByLibrary.simpleMessage(\"その他の貢献者\"),\n    \"outboundMode\": MessageLookupByLibrary.simpleMessage(\"アウトバウンドモード\"),\n    \"override\": MessageLookupByLibrary.simpleMessage(\"上書き\"),\n    \"overrideDesc\": MessageLookupByLibrary.simpleMessage(\"プロキシ関連設定を上書き\"),\n    \"overrideDns\": MessageLookupByLibrary.simpleMessage(\"DNS上書き\"),\n    \"overrideDnsDesc\": MessageLookupByLibrary.simpleMessage(\n      \"有効化するとプロファイルのDNS設定を上書き\",\n    ),\n    \"overrideInvalidTip\": MessageLookupByLibrary.simpleMessage(\n      \"スクリプトモードでは有効になりません\",\n    ),\n    \"overrideMode\": MessageLookupByLibrary.simpleMessage(\"上書きモード\"),\n    \"overrideOriginRules\": MessageLookupByLibrary.simpleMessage(\"元のルールを上書き\"),\n    \"overrideScript\": MessageLookupByLibrary.simpleMessage(\"上書きスクリプト\"),\n    \"overwriteTypeCustom\": MessageLookupByLibrary.simpleMessage(\"カスタム\"),\n    \"overwriteTypeCustomDesc\": MessageLookupByLibrary.simpleMessage(\n      \"カスタムモード、プロキシグループとルールを完全にカスタマイズ可能\",\n    ),\n    \"palette\": MessageLookupByLibrary.simpleMessage(\"パレット\"),\n    \"password\": MessageLookupByLibrary.simpleMessage(\"パスワード\"),\n    \"paste\": MessageLookupByLibrary.simpleMessage(\"貼り付け\"),\n    \"pleaseBindWebDAV\": MessageLookupByLibrary.simpleMessage(\n      \"WebDAVをバインドしてください\",\n    ),\n    \"pleaseEnterScriptName\": MessageLookupByLibrary.simpleMessage(\n      \"スクリプト名を入力してください\",\n    ),\n    \"pleaseInputAdminPassword\": MessageLookupByLibrary.simpleMessage(\n      \"管理者パスワードを入力\",\n    ),\n    \"pleaseUploadFile\": MessageLookupByLibrary.simpleMessage(\n      \"ファイルをアップロードしてください\",\n    ),\n    \"pleaseUploadValidQrcode\": MessageLookupByLibrary.simpleMessage(\n      \"有効なQRコードをアップロードしてください\",\n    ),\n    \"port\": MessageLookupByLibrary.simpleMessage(\"ポート\"),\n    \"portConflictTip\": MessageLookupByLibrary.simpleMessage(\"別のポートを入力してください\"),\n    \"portTip\": m11,\n    \"preferH3Desc\": MessageLookupByLibrary.simpleMessage(\"DOHのHTTP/3を優先使用\"),\n    \"pressKeyboard\": MessageLookupByLibrary.simpleMessage(\"キーボードを押してください\"),\n    \"preview\": MessageLookupByLibrary.simpleMessage(\"プレビュー\"),\n    \"process\": MessageLookupByLibrary.simpleMessage(\"プロセス\"),\n    \"profile\": MessageLookupByLibrary.simpleMessage(\"プロファイル\"),\n    \"profileAutoUpdateIntervalInvalidValidationDesc\":\n        MessageLookupByLibrary.simpleMessage(\"有効な間隔形式を入力してください\"),\n    \"profileAutoUpdateIntervalNullValidationDesc\":\n        MessageLookupByLibrary.simpleMessage(\"自動更新間隔を入力してください\"),\n    \"profileHasUpdate\": MessageLookupByLibrary.simpleMessage(\n      \"プロファイルが変更されました。自動更新を無効化しますか？\",\n    ),\n    \"profileNameNullValidationDesc\": MessageLookupByLibrary.simpleMessage(\n      \"プロファイル名を入力してください\",\n    ),\n    \"profileParseErrorDesc\": MessageLookupByLibrary.simpleMessage(\n      \"プロファイル解析エラー\",\n    ),\n    \"profileUrlInvalidValidationDesc\": MessageLookupByLibrary.simpleMessage(\n      \"有効なプロファイルURLを入力してください\",\n    ),\n    \"profileUrlNullValidationDesc\": MessageLookupByLibrary.simpleMessage(\n      \"プロファイルURLを入力してください\",\n    ),\n    \"profiles\": MessageLookupByLibrary.simpleMessage(\"プロファイル一覧\"),\n    \"profilesSort\": MessageLookupByLibrary.simpleMessage(\"プロファイルの並び替え\"),\n    \"project\": MessageLookupByLibrary.simpleMessage(\"プロジェクト\"),\n    \"providers\": MessageLookupByLibrary.simpleMessage(\"プロバイダー\"),\n    \"proxies\": MessageLookupByLibrary.simpleMessage(\"プロキシ\"),\n    \"proxiesSetting\": MessageLookupByLibrary.simpleMessage(\"プロキシ設定\"),\n    \"proxyChains\": MessageLookupByLibrary.simpleMessage(\"プロキシチェーン\"),\n    \"proxyGroup\": MessageLookupByLibrary.simpleMessage(\"プロキシグループ\"),\n    \"proxyNameserver\": MessageLookupByLibrary.simpleMessage(\"プロキシネームサーバー\"),\n    \"proxyNameserverDesc\": MessageLookupByLibrary.simpleMessage(\n      \"プロキシノード解決用ドメイン\",\n    ),\n    \"proxyPort\": MessageLookupByLibrary.simpleMessage(\"プロキシポート\"),\n    \"proxyPortDesc\": MessageLookupByLibrary.simpleMessage(\"Clashのリスニングポートを設定\"),\n    \"proxyProviders\": MessageLookupByLibrary.simpleMessage(\"プロキシプロバイダー\"),\n    \"pruneCache\": MessageLookupByLibrary.simpleMessage(\"キャッシュの削除\"),\n    \"pureBlackMode\": MessageLookupByLibrary.simpleMessage(\"純黒モード\"),\n    \"qrcode\": MessageLookupByLibrary.simpleMessage(\"QRコード\"),\n    \"qrcodeDesc\": MessageLookupByLibrary.simpleMessage(\"QRコードをスキャンしてプロファイルを取得\"),\n    \"rainbowScheme\": MessageLookupByLibrary.simpleMessage(\"レインボー\"),\n    \"redirPort\": MessageLookupByLibrary.simpleMessage(\"Redirポート\"),\n    \"redo\": MessageLookupByLibrary.simpleMessage(\"やり直す\"),\n    \"regExp\": MessageLookupByLibrary.simpleMessage(\"正規表現\"),\n    \"reload\": MessageLookupByLibrary.simpleMessage(\"リロード\"),\n    \"remote\": MessageLookupByLibrary.simpleMessage(\"リモート\"),\n    \"remoteBackupDesc\": MessageLookupByLibrary.simpleMessage(\n      \"WebDAVにデータをバックアップ\",\n    ),\n    \"remoteDestination\": MessageLookupByLibrary.simpleMessage(\"リモート宛先\"),\n    \"remove\": MessageLookupByLibrary.simpleMessage(\"削除\"),\n    \"rename\": MessageLookupByLibrary.simpleMessage(\"リネーム\"),\n    \"request\": MessageLookupByLibrary.simpleMessage(\"リクエスト\"),\n    \"requests\": MessageLookupByLibrary.simpleMessage(\"リクエスト\"),\n    \"requestsDesc\": MessageLookupByLibrary.simpleMessage(\"最近のリクエスト記録を表示\"),\n    \"reset\": MessageLookupByLibrary.simpleMessage(\"リセット\"),\n    \"resetPageChangesTip\": MessageLookupByLibrary.simpleMessage(\n      \"現在のページに変更があります。リセットしてもよろしいですか？\",\n    ),\n    \"resetTip\": MessageLookupByLibrary.simpleMessage(\"リセットを確定\"),\n    \"resources\": MessageLookupByLibrary.simpleMessage(\"リソース\"),\n    \"resourcesDesc\": MessageLookupByLibrary.simpleMessage(\"外部リソース関連情報\"),\n    \"respectRules\": MessageLookupByLibrary.simpleMessage(\"ルール尊重\"),\n    \"respectRulesDesc\": MessageLookupByLibrary.simpleMessage(\n      \"DNS接続がルールに従う（proxy-server-nameserverの設定が必要）\",\n    ),\n    \"restart\": MessageLookupByLibrary.simpleMessage(\"再起動\"),\n    \"restartCoreTip\": MessageLookupByLibrary.simpleMessage(\"コアを再起動してもよろしいですか？\"),\n    \"restore\": MessageLookupByLibrary.simpleMessage(\"復元\"),\n    \"restoreAllData\": MessageLookupByLibrary.simpleMessage(\"すべてのデータを復元する\"),\n    \"restoreException\": MessageLookupByLibrary.simpleMessage(\"復元例外\"),\n    \"restoreFromFileDesc\": MessageLookupByLibrary.simpleMessage(\n      \"ファイルを介してデータを復元する\",\n    ),\n    \"restoreFromWebDAVDesc\": MessageLookupByLibrary.simpleMessage(\n      \"WebDAVを介してデータを復元する\",\n    ),\n    \"restoreOnlyConfig\": MessageLookupByLibrary.simpleMessage(\"設定ファイルのみを復元する\"),\n    \"restoreStrategy\": MessageLookupByLibrary.simpleMessage(\"復元ストラテジー\"),\n    \"restoreStrategy_compatible\": MessageLookupByLibrary.simpleMessage(\"互換\"),\n    \"restoreStrategy_override\": MessageLookupByLibrary.simpleMessage(\"上書き\"),\n    \"restoreSuccess\": MessageLookupByLibrary.simpleMessage(\"復元に成功しました\"),\n    \"routeAddress\": MessageLookupByLibrary.simpleMessage(\"ルートアドレス\"),\n    \"routeAddressDesc\": MessageLookupByLibrary.simpleMessage(\"ルートアドレスを設定\"),\n    \"routeMode\": MessageLookupByLibrary.simpleMessage(\"ルートモード\"),\n    \"routeMode_bypassPrivate\": MessageLookupByLibrary.simpleMessage(\n      \"プライベートルートをバイパス\",\n    ),\n    \"routeMode_config\": MessageLookupByLibrary.simpleMessage(\"設定を使用\"),\n    \"ru\": MessageLookupByLibrary.simpleMessage(\"ロシア語\"),\n    \"rule\": MessageLookupByLibrary.simpleMessage(\"ルール\"),\n    \"ruleName\": MessageLookupByLibrary.simpleMessage(\"ルール名\"),\n    \"ruleProviders\": MessageLookupByLibrary.simpleMessage(\"ルールプロバイダー\"),\n    \"ruleTarget\": MessageLookupByLibrary.simpleMessage(\"ルール対象\"),\n    \"save\": MessageLookupByLibrary.simpleMessage(\"保存\"),\n    \"saveChanges\": MessageLookupByLibrary.simpleMessage(\"変更を保存しますか？\"),\n    \"saveTip\": MessageLookupByLibrary.simpleMessage(\"保存してもよろしいですか？\"),\n    \"script\": MessageLookupByLibrary.simpleMessage(\"スクリプト\"),\n    \"scriptModeDesc\": MessageLookupByLibrary.simpleMessage(\n      \"スクリプトモード、外部拡張スクリプトを使用し、ワンクリックで設定を上書きする機能を提供\",\n    ),\n    \"search\": MessageLookupByLibrary.simpleMessage(\"検索\"),\n    \"seconds\": MessageLookupByLibrary.simpleMessage(\"秒\"),\n    \"selectAll\": MessageLookupByLibrary.simpleMessage(\"すべて選択\"),\n    \"selected\": MessageLookupByLibrary.simpleMessage(\"選択済み\"),\n    \"selectedCountTitle\": m12,\n    \"settings\": MessageLookupByLibrary.simpleMessage(\"設定\"),\n    \"show\": MessageLookupByLibrary.simpleMessage(\"表示\"),\n    \"shrink\": MessageLookupByLibrary.simpleMessage(\"縮小\"),\n    \"silentLaunch\": MessageLookupByLibrary.simpleMessage(\"バックグラウンド起動\"),\n    \"silentLaunchDesc\": MessageLookupByLibrary.simpleMessage(\"バックグラウンドで起動\"),\n    \"size\": MessageLookupByLibrary.simpleMessage(\"サイズ\"),\n    \"socksPort\": MessageLookupByLibrary.simpleMessage(\"Socksポート\"),\n    \"sort\": MessageLookupByLibrary.simpleMessage(\"並び替え\"),\n    \"source\": MessageLookupByLibrary.simpleMessage(\"ソース\"),\n    \"sourceIp\": MessageLookupByLibrary.simpleMessage(\"送信元IP\"),\n    \"specialProxy\": MessageLookupByLibrary.simpleMessage(\"特殊プロキシ\"),\n    \"specialRules\": MessageLookupByLibrary.simpleMessage(\"特殊ルール\"),\n    \"speedStatistics\": MessageLookupByLibrary.simpleMessage(\"速度統計\"),\n    \"stackMode\": MessageLookupByLibrary.simpleMessage(\"スタックモード\"),\n    \"standard\": MessageLookupByLibrary.simpleMessage(\"標準\"),\n    \"standardModeDesc\": MessageLookupByLibrary.simpleMessage(\n      \"標準モード、基本設定を上書きし、シンプルなルール追加機能を提供\",\n    ),\n    \"start\": MessageLookupByLibrary.simpleMessage(\"開始\"),\n    \"startVpn\": MessageLookupByLibrary.simpleMessage(\"VPNを開始中...\"),\n    \"status\": MessageLookupByLibrary.simpleMessage(\"ステータス\"),\n    \"statusDesc\": MessageLookupByLibrary.simpleMessage(\"無効時はシステムDNSを使用\"),\n    \"stop\": MessageLookupByLibrary.simpleMessage(\"停止\"),\n    \"stopVpn\": MessageLookupByLibrary.simpleMessage(\"VPNを停止中...\"),\n    \"style\": MessageLookupByLibrary.simpleMessage(\"スタイル\"),\n    \"subRule\": MessageLookupByLibrary.simpleMessage(\"サブルール\"),\n    \"submit\": MessageLookupByLibrary.simpleMessage(\"送信\"),\n    \"sync\": MessageLookupByLibrary.simpleMessage(\"同期\"),\n    \"system\": MessageLookupByLibrary.simpleMessage(\"システム\"),\n    \"systemApp\": MessageLookupByLibrary.simpleMessage(\"システムアプリ\"),\n    \"systemFont\": MessageLookupByLibrary.simpleMessage(\"システムフォント\"),\n    \"systemProxy\": MessageLookupByLibrary.simpleMessage(\"システムプロキシ\"),\n    \"systemProxyDesc\": MessageLookupByLibrary.simpleMessage(\n      \"HTTPプロキシをVpnServiceに接続\",\n    ),\n    \"tab\": MessageLookupByLibrary.simpleMessage(\"タブ\"),\n    \"tabAnimation\": MessageLookupByLibrary.simpleMessage(\"タブアニメーション\"),\n    \"tabAnimationDesc\": MessageLookupByLibrary.simpleMessage(\"モバイル表示でのみ有効\"),\n    \"tcpConcurrent\": MessageLookupByLibrary.simpleMessage(\"TCP並列処理\"),\n    \"tcpConcurrentDesc\": MessageLookupByLibrary.simpleMessage(\"TCP並列処理を許可\"),\n    \"testUrl\": MessageLookupByLibrary.simpleMessage(\"URLテスト\"),\n    \"textScale\": MessageLookupByLibrary.simpleMessage(\"テキストスケーリング\"),\n    \"theme\": MessageLookupByLibrary.simpleMessage(\"テーマ\"),\n    \"themeColor\": MessageLookupByLibrary.simpleMessage(\"テーマカラー\"),\n    \"themeDesc\": MessageLookupByLibrary.simpleMessage(\"ダークモードの設定、色の調整\"),\n    \"themeMode\": MessageLookupByLibrary.simpleMessage(\"テーマモード\"),\n    \"threeColumns\": MessageLookupByLibrary.simpleMessage(\"3列\"),\n    \"tight\": MessageLookupByLibrary.simpleMessage(\"密\"),\n    \"time\": MessageLookupByLibrary.simpleMessage(\"時間\"),\n    \"tip\": MessageLookupByLibrary.simpleMessage(\"ヒント\"),\n    \"toggle\": MessageLookupByLibrary.simpleMessage(\"トグル\"),\n    \"tonalSpotScheme\": MessageLookupByLibrary.simpleMessage(\"トーンスポット\"),\n    \"tools\": MessageLookupByLibrary.simpleMessage(\"ツール\"),\n    \"tproxyPort\": MessageLookupByLibrary.simpleMessage(\"Tproxyポート\"),\n    \"trafficUsage\": MessageLookupByLibrary.simpleMessage(\"トラフィック使用量\"),\n    \"tun\": MessageLookupByLibrary.simpleMessage(\"TUN\"),\n    \"tunDesc\": MessageLookupByLibrary.simpleMessage(\"管理者モードでのみ有効\"),\n    \"turnOff\": MessageLookupByLibrary.simpleMessage(\"オフ\"),\n    \"turnOn\": MessageLookupByLibrary.simpleMessage(\"オン\"),\n    \"twoColumns\": MessageLookupByLibrary.simpleMessage(\"2列\"),\n    \"unableToUpdateCurrentProfileDesc\": MessageLookupByLibrary.simpleMessage(\n      \"現在のプロファイルを更新できません\",\n    ),\n    \"undo\": MessageLookupByLibrary.simpleMessage(\"元に戻す\"),\n    \"unifiedDelay\": MessageLookupByLibrary.simpleMessage(\"統一遅延\"),\n    \"unifiedDelayDesc\": MessageLookupByLibrary.simpleMessage(\n      \"ハンドシェイクなどの余分な遅延を削除\",\n    ),\n    \"unknown\": MessageLookupByLibrary.simpleMessage(\"不明\"),\n    \"unknownNetworkError\": MessageLookupByLibrary.simpleMessage(\"不明なネットワークエラー\"),\n    \"unnamed\": MessageLookupByLibrary.simpleMessage(\"無題\"),\n    \"update\": MessageLookupByLibrary.simpleMessage(\"更新\"),\n    \"upload\": MessageLookupByLibrary.simpleMessage(\"アップロード\"),\n    \"url\": MessageLookupByLibrary.simpleMessage(\"URL\"),\n    \"urlDesc\": MessageLookupByLibrary.simpleMessage(\"URL経由でプロファイルを取得\"),\n    \"urlTip\": m13,\n    \"useHosts\": MessageLookupByLibrary.simpleMessage(\"ホストを使用\"),\n    \"useSystemHosts\": MessageLookupByLibrary.simpleMessage(\"システムホストを使用\"),\n    \"value\": MessageLookupByLibrary.simpleMessage(\"値\"),\n    \"vibrantScheme\": MessageLookupByLibrary.simpleMessage(\"ビブラント\"),\n    \"view\": MessageLookupByLibrary.simpleMessage(\"表示\"),\n    \"vpnConfigChangeDetected\": MessageLookupByLibrary.simpleMessage(\n      \"VPN設定の変更が検出されました\",\n    ),\n    \"vpnDesc\": MessageLookupByLibrary.simpleMessage(\"VPN関連設定の変更\"),\n    \"vpnEnableDesc\": MessageLookupByLibrary.simpleMessage(\n      \"VpnService経由で全システムトラフィックをルーティング\",\n    ),\n    \"vpnSystemProxyDesc\": MessageLookupByLibrary.simpleMessage(\n      \"HTTPプロキシをVpnServiceに接続\",\n    ),\n    \"vpnTip\": MessageLookupByLibrary.simpleMessage(\"変更はVPN再起動後に有効\"),\n    \"webDAVConfiguration\": MessageLookupByLibrary.simpleMessage(\"WebDAV設定\"),\n    \"whitelistMode\": MessageLookupByLibrary.simpleMessage(\"ホワイトリストモード\"),\n    \"years\": MessageLookupByLibrary.simpleMessage(\"年\"),\n    \"yearsAgo\": m14,\n    \"zh_CN\": MessageLookupByLibrary.simpleMessage(\"簡体字中国語\"),\n  };\n}\n"
  },
  {
    "path": "lib/l10n/intl/messages_ru.dart",
    "content": "// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart\n// This is a library that provides messages for a ru locale. All the\n// messages from the main program should be duplicated here with the same\n// function name.\n\n// Ignore issues from commonly used lints in this file.\n// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new\n// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering\n// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases\n// ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes\n// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes\n\nimport 'package:intl/intl.dart';\nimport 'package:intl/message_lookup_by_library.dart';\n\nfinal messages = new MessageLookup();\n\ntypedef String MessageIfAbsent(String messageStr, List<dynamic> args);\n\nclass MessageLookup extends MessageLookupByLibrary {\n  String get localeName => 'ru';\n\n  static String m0(count) =>\n      \"${Intl.plural(count, one: '${count} день назад', few: '${count} дня назад', many: '${count} дней назад', other: '${count} дня назад')}\";\n\n  static String m1(label) =>\n      \"Вы уверены, что хотите удалить выбранные ${label}?\";\n\n  static String m2(label) => \"Вы уверены, что хотите удалить текущий ${label}?\";\n\n  static String m3(label) => \"Детали {}\";\n\n  static String m4(label) => \"${label} не может быть пустым\";\n\n  static String m5(label) => \"Текущий ${label} уже существует\";\n\n  static String m6(count) =>\n      \"${Intl.plural(count, one: '${count} час назад', few: '${count} часа назад', many: '${count} часов назад', other: '${count} часа назад')}\";\n\n  static String m7(count) =>\n      \"${Intl.plural(count, one: '${count} минута назад', few: '${count} минуты назад', many: '${count} минут назад', other: '${count} минуты назад')}\";\n\n  static String m8(count) =>\n      \"${Intl.plural(count, one: '${count} месяц назад', few: '${count} месяца назад', many: '${count} месяцев назад', other: '${count} месяца назад')}\";\n\n  static String m9(label) => \"${label} пока отсутствуют\";\n\n  static String m10(label) => \"${label} должно быть числом\";\n\n  static String m11(label) => \"${label} должен быть числом от 1024 до 49151\";\n\n  static String m12(count) => \"Выбрано ${count} элементов\";\n\n  static String m13(label) => \"${label} должен быть URL\";\n\n  static String m14(count) =>\n      \"${Intl.plural(count, one: '${count} год назад', few: '${count} года назад', many: '${count} лет назад', other: '${count} года назад')}\";\n\n  final messages = _notInlinedMessages(_notInlinedMessages);\n  static Map<String, Function> _notInlinedMessages(_) => <String, Function>{\n    \"about\": MessageLookupByLibrary.simpleMessage(\"О программе\"),\n    \"accessControl\": MessageLookupByLibrary.simpleMessage(\"Контроль доступа\"),\n    \"accessControlAllowDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Разрешить только выбранным приложениям доступ к VPN\",\n    ),\n    \"accessControlDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Настройка доступа приложений к прокси\",\n    ),\n    \"accessControlNotAllowDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Выбранные приложения будут исключены из VPN\",\n    ),\n    \"accessControlSettings\": MessageLookupByLibrary.simpleMessage(\n      \"Настройки контроля доступа\",\n    ),\n    \"account\": MessageLookupByLibrary.simpleMessage(\"Аккаунт\"),\n    \"action\": MessageLookupByLibrary.simpleMessage(\"Действие\"),\n    \"action_mode\": MessageLookupByLibrary.simpleMessage(\"Переключить режим\"),\n    \"action_proxy\": MessageLookupByLibrary.simpleMessage(\"Системный прокси\"),\n    \"action_start\": MessageLookupByLibrary.simpleMessage(\"Старт/Стоп\"),\n    \"action_tun\": MessageLookupByLibrary.simpleMessage(\"TUN\"),\n    \"action_view\": MessageLookupByLibrary.simpleMessage(\"Показать/Скрыть\"),\n    \"add\": MessageLookupByLibrary.simpleMessage(\"Добавить\"),\n    \"addProfile\": MessageLookupByLibrary.simpleMessage(\"Добавить профиль\"),\n    \"addRule\": MessageLookupByLibrary.simpleMessage(\"Добавить правило\"),\n    \"addedOriginRules\": MessageLookupByLibrary.simpleMessage(\n      \"Добавить к оригинальным правилам\",\n    ),\n    \"addedRules\": MessageLookupByLibrary.simpleMessage(\"Добавленные правила\"),\n    \"address\": MessageLookupByLibrary.simpleMessage(\"Адрес\"),\n    \"addressHelp\": MessageLookupByLibrary.simpleMessage(\"Адрес сервера WebDAV\"),\n    \"addressTip\": MessageLookupByLibrary.simpleMessage(\n      \"Пожалуйста, введите действительный адрес WebDAV\",\n    ),\n    \"adminAutoLaunch\": MessageLookupByLibrary.simpleMessage(\n      \"Автозапуск с правами администратора\",\n    ),\n    \"adminAutoLaunchDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Запуск с правами администратора при загрузке системы\",\n    ),\n    \"advancedConfig\": MessageLookupByLibrary.simpleMessage(\n      \"Расширенная конфигурация\",\n    ),\n    \"advancedConfigDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Предоставляет разнообразные варианты конфигурации\",\n    ),\n    \"ago\": MessageLookupByLibrary.simpleMessage(\" назад\"),\n    \"agree\": MessageLookupByLibrary.simpleMessage(\"Согласен\"),\n    \"allApps\": MessageLookupByLibrary.simpleMessage(\"Все приложения\"),\n    \"allowBypass\": MessageLookupByLibrary.simpleMessage(\n      \"Разрешить приложениям обходить VPN\",\n    ),\n    \"allowBypassDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Некоторые приложения могут обходить VPN при включении\",\n    ),\n    \"allowLan\": MessageLookupByLibrary.simpleMessage(\"Разрешить LAN\"),\n    \"allowLanDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Разрешить доступ к прокси через локальную сеть\",\n    ),\n    \"app\": MessageLookupByLibrary.simpleMessage(\"Приложение\"),\n    \"appAccessControl\": MessageLookupByLibrary.simpleMessage(\n      \"Контроль доступа приложений\",\n    ),\n    \"appDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Обработка настроек, связанных с приложением\",\n    ),\n    \"appendSystemDns\": MessageLookupByLibrary.simpleMessage(\n      \"Добавить системный DNS\",\n    ),\n    \"appendSystemDnsTip\": MessageLookupByLibrary.simpleMessage(\n      \"Принудительно добавить системный DNS к конфигурации\",\n    ),\n    \"application\": MessageLookupByLibrary.simpleMessage(\"Приложение\"),\n    \"applicationDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Изменение настроек, связанных с приложением\",\n    ),\n    \"auto\": MessageLookupByLibrary.simpleMessage(\"Авто\"),\n    \"autoCheckUpdate\": MessageLookupByLibrary.simpleMessage(\n      \"Автопроверка обновлений\",\n    ),\n    \"autoCheckUpdateDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Автоматически проверять обновления при запуске приложения\",\n    ),\n    \"autoCloseConnections\": MessageLookupByLibrary.simpleMessage(\n      \"Автоматическое закрытие соединений\",\n    ),\n    \"autoCloseConnectionsDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Автоматически закрывать соединения после смены узла\",\n    ),\n    \"autoLaunch\": MessageLookupByLibrary.simpleMessage(\"Автозапуск\"),\n    \"autoLaunchDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Следовать автозапуску системы\",\n    ),\n    \"autoRun\": MessageLookupByLibrary.simpleMessage(\"Автозапуск\"),\n    \"autoRunDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Автоматический запуск при открытии приложения\",\n    ),\n    \"autoSetSystemDns\": MessageLookupByLibrary.simpleMessage(\n      \"Автоматическая настройка системного DNS\",\n    ),\n    \"autoUpdate\": MessageLookupByLibrary.simpleMessage(\"Автообновление\"),\n    \"autoUpdateInterval\": MessageLookupByLibrary.simpleMessage(\n      \"Интервал автообновления (минуты)\",\n    ),\n    \"backup\": MessageLookupByLibrary.simpleMessage(\"Резервное копирование\"),\n    \"backupAndRestore\": MessageLookupByLibrary.simpleMessage(\n      \"Резервное копирование и восстановление\",\n    ),\n    \"backupAndRestoreDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Синхронизация данных через WebDAV или файлы\",\n    ),\n    \"backupSuccess\": MessageLookupByLibrary.simpleMessage(\n      \"Резервное копирование успешно\",\n    ),\n    \"basicConfig\": MessageLookupByLibrary.simpleMessage(\"Базовая конфигурация\"),\n    \"basicConfigDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Глобальное изменение базовых настроек\",\n    ),\n    \"bind\": MessageLookupByLibrary.simpleMessage(\"Привязать\"),\n    \"blacklistMode\": MessageLookupByLibrary.simpleMessage(\n      \"Режим черного списка\",\n    ),\n    \"bypassDomain\": MessageLookupByLibrary.simpleMessage(\"Обход домена\"),\n    \"bypassDomainDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Действует только при включенном системном прокси\",\n    ),\n    \"cacheCorrupt\": MessageLookupByLibrary.simpleMessage(\n      \"Кэш поврежден. Хотите очистить его?\",\n    ),\n    \"cancel\": MessageLookupByLibrary.simpleMessage(\"Отмена\"),\n    \"cancelFilterSystemApp\": MessageLookupByLibrary.simpleMessage(\n      \"Отменить фильтрацию системных приложений\",\n    ),\n    \"cancelSelectAll\": MessageLookupByLibrary.simpleMessage(\n      \"Отменить выбор всего\",\n    ),\n    \"checkError\": MessageLookupByLibrary.simpleMessage(\"Ошибка проверки\"),\n    \"checkUpdate\": MessageLookupByLibrary.simpleMessage(\"Проверить обновления\"),\n    \"checkUpdateError\": MessageLookupByLibrary.simpleMessage(\n      \"Текущее приложение уже является последней версией\",\n    ),\n    \"checking\": MessageLookupByLibrary.simpleMessage(\"Проверка...\"),\n    \"clearData\": MessageLookupByLibrary.simpleMessage(\"Очистить данные\"),\n    \"clipboardExport\": MessageLookupByLibrary.simpleMessage(\n      \"Экспорт в буфер обмена\",\n    ),\n    \"clipboardImport\": MessageLookupByLibrary.simpleMessage(\n      \"Импорт из буфера обмена\",\n    ),\n    \"color\": MessageLookupByLibrary.simpleMessage(\"Цвет\"),\n    \"colorSchemes\": MessageLookupByLibrary.simpleMessage(\"Цветовые схемы\"),\n    \"columns\": MessageLookupByLibrary.simpleMessage(\"Столбцы\"),\n    \"compatible\": MessageLookupByLibrary.simpleMessage(\"Режим совместимости\"),\n    \"compatibleDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Включение приведет к потере части функциональности приложения, но обеспечит полную поддержку Clash.\",\n    ),\n    \"confirm\": MessageLookupByLibrary.simpleMessage(\"Подтвердить\"),\n    \"confirmClearAllData\": MessageLookupByLibrary.simpleMessage(\n      \"Вы уверены, что хотите очистить все данные?\",\n    ),\n    \"confirmForceCrashCore\": MessageLookupByLibrary.simpleMessage(\n      \"Вы уверены, что хотите принудительно аварийно завершить работу ядра?\",\n    ),\n    \"connected\": MessageLookupByLibrary.simpleMessage(\"Подключено\"),\n    \"connecting\": MessageLookupByLibrary.simpleMessage(\"Подключение...\"),\n    \"connection\": MessageLookupByLibrary.simpleMessage(\"Соединение\"),\n    \"connections\": MessageLookupByLibrary.simpleMessage(\"Соединения\"),\n    \"connectionsDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Просмотр текущих данных о соединениях\",\n    ),\n    \"connectivity\": MessageLookupByLibrary.simpleMessage(\"Связь：\"),\n    \"contactMe\": MessageLookupByLibrary.simpleMessage(\"Свяжитесь со мной\"),\n    \"content\": MessageLookupByLibrary.simpleMessage(\"Содержание\"),\n    \"contentScheme\": MessageLookupByLibrary.simpleMessage(\"Контентная тема\"),\n    \"controlGlobalAddedRules\": MessageLookupByLibrary.simpleMessage(\n      \"Управление глобальными добавленными правилами\",\n    ),\n    \"copy\": MessageLookupByLibrary.simpleMessage(\"Копировать\"),\n    \"copyEnvVar\": MessageLookupByLibrary.simpleMessage(\n      \"Копирование переменных окружения\",\n    ),\n    \"copyLink\": MessageLookupByLibrary.simpleMessage(\"Копировать ссылку\"),\n    \"copySuccess\": MessageLookupByLibrary.simpleMessage(\"Копирование успешно\"),\n    \"core\": MessageLookupByLibrary.simpleMessage(\"Ядро\"),\n    \"coreConfigChangeDetected\": MessageLookupByLibrary.simpleMessage(\n      \"Обнаружено изменение конфигурации ядра\",\n    ),\n    \"coreInfo\": MessageLookupByLibrary.simpleMessage(\"Информация о ядре\"),\n    \"coreStatus\": MessageLookupByLibrary.simpleMessage(\"Основной статус\"),\n    \"country\": MessageLookupByLibrary.simpleMessage(\"Страна\"),\n    \"crashTest\": MessageLookupByLibrary.simpleMessage(\"Тест на сбои\"),\n    \"crashlytics\": MessageLookupByLibrary.simpleMessage(\"Анализ сбоев\"),\n    \"crashlyticsTip\": MessageLookupByLibrary.simpleMessage(\n      \"При включении автоматически загружает журналы сбоев без конфиденциальной информации, когда приложение выходит из строя\",\n    ),\n    \"create\": MessageLookupByLibrary.simpleMessage(\"Создать\"),\n    \"creationTime\": MessageLookupByLibrary.simpleMessage(\"Время создания\"),\n    \"cut\": MessageLookupByLibrary.simpleMessage(\"Вырезать\"),\n    \"dark\": MessageLookupByLibrary.simpleMessage(\"Темный\"),\n    \"dashboard\": MessageLookupByLibrary.simpleMessage(\"Панель управления\"),\n    \"dataCollectionContent\": MessageLookupByLibrary.simpleMessage(\n      \"Это приложение использует Firebase Crashlytics для сбора информации о сбоях nhằm улучшения стабильности приложения.\\nСобираемые данные включают информацию об устройстве и подробности о сбоях, но не содержат персональных конфиденциальных данных.\\nВы можете отключить эту функцию в настройках.\",\n    ),\n    \"dataCollectionTip\": MessageLookupByLibrary.simpleMessage(\n      \"Уведомление о сборе данных\",\n    ),\n    \"days\": MessageLookupByLibrary.simpleMessage(\"Дней\"),\n    \"daysAgo\": m0,\n    \"defaultNameserver\": MessageLookupByLibrary.simpleMessage(\n      \"Сервер имен по умолчанию\",\n    ),\n    \"defaultNameserverDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Для разрешения DNS-сервера\",\n    ),\n    \"defaultSort\": MessageLookupByLibrary.simpleMessage(\n      \"Сортировка по умолчанию\",\n    ),\n    \"defaultText\": MessageLookupByLibrary.simpleMessage(\"По умолчанию\"),\n    \"delay\": MessageLookupByLibrary.simpleMessage(\"Задержка\"),\n    \"delaySort\": MessageLookupByLibrary.simpleMessage(\"Сортировка по задержке\"),\n    \"delayTest\": MessageLookupByLibrary.simpleMessage(\"Тест задержки\"),\n    \"delete\": MessageLookupByLibrary.simpleMessage(\"Удалить\"),\n    \"deleteMultipTip\": m1,\n    \"deleteTip\": m2,\n    \"desc\": MessageLookupByLibrary.simpleMessage(\n      \"Многоплатформенный прокси-клиент на основе ClashMeta, простой и удобный в использовании, с открытым исходным кодом и без рекламы.\",\n    ),\n    \"destination\": MessageLookupByLibrary.simpleMessage(\"Назначение\"),\n    \"destinationGeoIP\": MessageLookupByLibrary.simpleMessage(\n      \"Геолокация назначения\",\n    ),\n    \"destinationIPASN\": MessageLookupByLibrary.simpleMessage(\"ASN назначения\"),\n    \"details\": m3,\n    \"detectionTip\": MessageLookupByLibrary.simpleMessage(\n      \"Опирается на сторонний API, только для справки\",\n    ),\n    \"developerMode\": MessageLookupByLibrary.simpleMessage(\"Режим разработчика\"),\n    \"developerModeEnableTip\": MessageLookupByLibrary.simpleMessage(\n      \"Режим разработчика активирован.\",\n    ),\n    \"direct\": MessageLookupByLibrary.simpleMessage(\"Прямой\"),\n    \"disclaimer\": MessageLookupByLibrary.simpleMessage(\n      \"Отказ от ответственности\",\n    ),\n    \"disclaimerDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Это программное обеспечение используется только в некоммерческих целях, таких как учебные обмены и научные исследования. Запрещено использовать это программное обеспечение в коммерческих целях. Любая коммерческая деятельность, если таковая имеется, не имеет отношения к этому программному обеспечению.\",\n    ),\n    \"disconnected\": MessageLookupByLibrary.simpleMessage(\"Отключено\"),\n    \"discoverNewVersion\": MessageLookupByLibrary.simpleMessage(\n      \"Обнаружена новая версия\",\n    ),\n    \"discovery\": MessageLookupByLibrary.simpleMessage(\n      \"Обнаружена новая версия\",\n    ),\n    \"dnsDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Обновление настроек, связанных с DNS\",\n    ),\n    \"dnsHijacking\": MessageLookupByLibrary.simpleMessage(\"DNS-перехват\"),\n    \"dnsMode\": MessageLookupByLibrary.simpleMessage(\"Режим DNS\"),\n    \"doYouWantToPass\": MessageLookupByLibrary.simpleMessage(\n      \"Вы хотите пропустить\",\n    ),\n    \"domain\": MessageLookupByLibrary.simpleMessage(\"Домен\"),\n    \"download\": MessageLookupByLibrary.simpleMessage(\"Скачивание\"),\n    \"edit\": MessageLookupByLibrary.simpleMessage(\"Редактировать\"),\n    \"editGlobalRules\": MessageLookupByLibrary.simpleMessage(\n      \"Редактировать глобальные правила\",\n    ),\n    \"editRule\": MessageLookupByLibrary.simpleMessage(\"Редактировать правило\"),\n    \"emptyTip\": m4,\n    \"en\": MessageLookupByLibrary.simpleMessage(\"Английский\"),\n    \"enableOverride\": MessageLookupByLibrary.simpleMessage(\n      \"Включить переопределение\",\n    ),\n    \"entries\": MessageLookupByLibrary.simpleMessage(\" записей\"),\n    \"exclude\": MessageLookupByLibrary.simpleMessage(\n      \"Скрыть из последних задач\",\n    ),\n    \"excludeDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Когда приложение находится в фоновом режиме, оно скрыто из последних задач\",\n    ),\n    \"existsTip\": m5,\n    \"exit\": MessageLookupByLibrary.simpleMessage(\"Выход\"),\n    \"expand\": MessageLookupByLibrary.simpleMessage(\"Стандартный\"),\n    \"expirationTime\": MessageLookupByLibrary.simpleMessage(\"Время истечения\"),\n    \"exportFile\": MessageLookupByLibrary.simpleMessage(\"Экспорт файла\"),\n    \"exportLogs\": MessageLookupByLibrary.simpleMessage(\"Экспорт логов\"),\n    \"exportSuccess\": MessageLookupByLibrary.simpleMessage(\"Экспорт успешен\"),\n    \"expressiveScheme\": MessageLookupByLibrary.simpleMessage(\"Экспрессивные\"),\n    \"externalController\": MessageLookupByLibrary.simpleMessage(\n      \"Внешний контроллер\",\n    ),\n    \"externalControllerDesc\": MessageLookupByLibrary.simpleMessage(\n      \"При включении ядро Clash можно контролировать на порту 9090\",\n    ),\n    \"externalFetch\": MessageLookupByLibrary.simpleMessage(\"Внешнее получение\"),\n    \"externalLink\": MessageLookupByLibrary.simpleMessage(\"Внешняя ссылка\"),\n    \"externalResources\": MessageLookupByLibrary.simpleMessage(\n      \"Внешние ресурсы\",\n    ),\n    \"fakeipFilter\": MessageLookupByLibrary.simpleMessage(\"Фильтр Fakeip\"),\n    \"fakeipRange\": MessageLookupByLibrary.simpleMessage(\"Диапазон Fakeip\"),\n    \"fallback\": MessageLookupByLibrary.simpleMessage(\"Резервный\"),\n    \"fallbackDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Обычно используется оффшорный DNS\",\n    ),\n    \"fallbackFilter\": MessageLookupByLibrary.simpleMessage(\n      \"Фильтр резервного DNS\",\n    ),\n    \"fidelityScheme\": MessageLookupByLibrary.simpleMessage(\"Точная передача\"),\n    \"file\": MessageLookupByLibrary.simpleMessage(\"Файл\"),\n    \"fileDesc\": MessageLookupByLibrary.simpleMessage(\"Прямая загрузка профиля\"),\n    \"fileIsUpdate\": MessageLookupByLibrary.simpleMessage(\n      \"Файл был изменен. Хотите сохранить изменения?\",\n    ),\n    \"filterSystemApp\": MessageLookupByLibrary.simpleMessage(\n      \"Фильтровать системные приложения\",\n    ),\n    \"findProcessMode\": MessageLookupByLibrary.simpleMessage(\n      \"Режим поиска процесса\",\n    ),\n    \"findProcessModeDesc\": MessageLookupByLibrary.simpleMessage(\n      \"При включении возможны небольшие потери производительности\",\n    ),\n    \"fontFamily\": MessageLookupByLibrary.simpleMessage(\"Семейство шрифтов\"),\n    \"forceRestartCoreTip\": MessageLookupByLibrary.simpleMessage(\n      \"Вы уверены, что хотите принудительно перезапустить ядро?\",\n    ),\n    \"fourColumns\": MessageLookupByLibrary.simpleMessage(\"Четыре столбца\"),\n    \"fruitSaladScheme\": MessageLookupByLibrary.simpleMessage(\"Фруктовый микс\"),\n    \"general\": MessageLookupByLibrary.simpleMessage(\"Общие\"),\n    \"generalDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Изменение общих настроек\",\n    ),\n    \"geoData\": MessageLookupByLibrary.simpleMessage(\"Геоданные\"),\n    \"geodataLoader\": MessageLookupByLibrary.simpleMessage(\n      \"Режим низкого потребления памяти для геоданных\",\n    ),\n    \"geodataLoaderDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Включение будет использовать загрузчик геоданных с низким потреблением памяти\",\n    ),\n    \"geoipCode\": MessageLookupByLibrary.simpleMessage(\"Код Geoip\"),\n    \"getOriginRules\": MessageLookupByLibrary.simpleMessage(\n      \"Получить оригинальные правила\",\n    ),\n    \"global\": MessageLookupByLibrary.simpleMessage(\"Глобальный\"),\n    \"go\": MessageLookupByLibrary.simpleMessage(\"Перейти\"),\n    \"goDownload\": MessageLookupByLibrary.simpleMessage(\"Перейти к загрузке\"),\n    \"goToConfigureScript\": MessageLookupByLibrary.simpleMessage(\n      \"Перейти к настройке скрипта\",\n    ),\n    \"hasCacheChange\": MessageLookupByLibrary.simpleMessage(\n      \"Хотите сохранить изменения в кэше?\",\n    ),\n    \"host\": MessageLookupByLibrary.simpleMessage(\"Хост\"),\n    \"hostsDesc\": MessageLookupByLibrary.simpleMessage(\"Добавить Hosts\"),\n    \"hotkeyConflict\": MessageLookupByLibrary.simpleMessage(\n      \"Конфликт горячих клавиш\",\n    ),\n    \"hotkeyManagement\": MessageLookupByLibrary.simpleMessage(\n      \"Управление горячими клавишами\",\n    ),\n    \"hotkeyManagementDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Использование клавиатуры для управления приложением\",\n    ),\n    \"hours\": MessageLookupByLibrary.simpleMessage(\"Часов\"),\n    \"hoursAgo\": m6,\n    \"icon\": MessageLookupByLibrary.simpleMessage(\"Иконка\"),\n    \"iconConfiguration\": MessageLookupByLibrary.simpleMessage(\n      \"Конфигурация иконки\",\n    ),\n    \"iconStyle\": MessageLookupByLibrary.simpleMessage(\"Стиль иконки\"),\n    \"import\": MessageLookupByLibrary.simpleMessage(\"Импорт\"),\n    \"importFile\": MessageLookupByLibrary.simpleMessage(\"Импорт из файла\"),\n    \"importFromURL\": MessageLookupByLibrary.simpleMessage(\"Импорт из URL\"),\n    \"importUrl\": MessageLookupByLibrary.simpleMessage(\"Импорт по URL\"),\n    \"infiniteTime\": MessageLookupByLibrary.simpleMessage(\n      \"Долгосрочное действие\",\n    ),\n    \"init\": MessageLookupByLibrary.simpleMessage(\"Инициализация\"),\n    \"inputCorrectHotkey\": MessageLookupByLibrary.simpleMessage(\n      \"Пожалуйста, введите правильную горячую клавишу\",\n    ),\n    \"intelligentSelected\": MessageLookupByLibrary.simpleMessage(\n      \"Интеллектуальный выбор\",\n    ),\n    \"internet\": MessageLookupByLibrary.simpleMessage(\"Интернет\"),\n    \"interval\": MessageLookupByLibrary.simpleMessage(\"Интервал\"),\n    \"intranetIP\": MessageLookupByLibrary.simpleMessage(\"Внутренний IP\"),\n    \"invalidBackupFile\": MessageLookupByLibrary.simpleMessage(\n      \"Неверный файл резервной копии\",\n    ),\n    \"ipcidr\": MessageLookupByLibrary.simpleMessage(\"IPCIDR\"),\n    \"ipv6Desc\": MessageLookupByLibrary.simpleMessage(\n      \"При включении будет возможно получать IPv6 трафик\",\n    ),\n    \"ipv6InboundDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Разрешить входящий IPv6\",\n    ),\n    \"ja\": MessageLookupByLibrary.simpleMessage(\"Японский\"),\n    \"just\": MessageLookupByLibrary.simpleMessage(\"Только что\"),\n    \"justNow\": MessageLookupByLibrary.simpleMessage(\"Только что\"),\n    \"keepAliveIntervalDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Интервал поддержания TCP-соединения\",\n    ),\n    \"key\": MessageLookupByLibrary.simpleMessage(\"Ключ\"),\n    \"language\": MessageLookupByLibrary.simpleMessage(\"Язык\"),\n    \"layout\": MessageLookupByLibrary.simpleMessage(\"Макет\"),\n    \"light\": MessageLookupByLibrary.simpleMessage(\"Светлый\"),\n    \"list\": MessageLookupByLibrary.simpleMessage(\"Список\"),\n    \"listen\": MessageLookupByLibrary.simpleMessage(\"Слушать\"),\n    \"loadTest\": MessageLookupByLibrary.simpleMessage(\"Тест загрузки\"),\n    \"loading\": MessageLookupByLibrary.simpleMessage(\"Загрузка...\"),\n    \"local\": MessageLookupByLibrary.simpleMessage(\"Локальный\"),\n    \"localBackupDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Резервное копирование локальных данных на локальный диск\",\n    ),\n    \"log\": MessageLookupByLibrary.simpleMessage(\"Журнал\"),\n    \"logLevel\": MessageLookupByLibrary.simpleMessage(\"Уровень логов\"),\n    \"logcat\": MessageLookupByLibrary.simpleMessage(\"Logcat\"),\n    \"logcatDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Отключение скроет запись логов\",\n    ),\n    \"logs\": MessageLookupByLibrary.simpleMessage(\"Логи\"),\n    \"logsDesc\": MessageLookupByLibrary.simpleMessage(\"Записи захвата логов\"),\n    \"logsTest\": MessageLookupByLibrary.simpleMessage(\"Тест журналов\"),\n    \"loopback\": MessageLookupByLibrary.simpleMessage(\n      \"Инструмент разблокировки Loopback\",\n    ),\n    \"loopbackDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Используется для разблокировки Loopback UWP\",\n    ),\n    \"loose\": MessageLookupByLibrary.simpleMessage(\"Свободный\"),\n    \"memoryInfo\": MessageLookupByLibrary.simpleMessage(\"Информация о памяти\"),\n    \"messageTest\": MessageLookupByLibrary.simpleMessage(\n      \"Тестирование сообщения\",\n    ),\n    \"messageTestTip\": MessageLookupByLibrary.simpleMessage(\"Это сообщение.\"),\n    \"min\": MessageLookupByLibrary.simpleMessage(\"Мин\"),\n    \"minimizeOnExit\": MessageLookupByLibrary.simpleMessage(\n      \"Свернуть при выходе\",\n    ),\n    \"minimizeOnExitDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Изменить стандартное событие выхода из системы\",\n    ),\n    \"minutes\": MessageLookupByLibrary.simpleMessage(\"Минут\"),\n    \"minutesAgo\": m7,\n    \"mixedPort\": MessageLookupByLibrary.simpleMessage(\"Смешанный порт\"),\n    \"mode\": MessageLookupByLibrary.simpleMessage(\"Режим\"),\n    \"monochromeScheme\": MessageLookupByLibrary.simpleMessage(\"Монохром\"),\n    \"months\": MessageLookupByLibrary.simpleMessage(\"Месяцев\"),\n    \"monthsAgo\": m8,\n    \"more\": MessageLookupByLibrary.simpleMessage(\"Еще\"),\n    \"name\": MessageLookupByLibrary.simpleMessage(\"Имя\"),\n    \"nameSort\": MessageLookupByLibrary.simpleMessage(\"Сортировка по имени\"),\n    \"nameserver\": MessageLookupByLibrary.simpleMessage(\"Сервер имен\"),\n    \"nameserverDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Для разрешения домена\",\n    ),\n    \"nameserverPolicy\": MessageLookupByLibrary.simpleMessage(\n      \"Политика сервера имен\",\n    ),\n    \"nameserverPolicyDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Указать соответствующую политику сервера имен\",\n    ),\n    \"network\": MessageLookupByLibrary.simpleMessage(\"Сеть\"),\n    \"networkDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Изменение настроек, связанных с сетью\",\n    ),\n    \"networkDetection\": MessageLookupByLibrary.simpleMessage(\n      \"Обнаружение сети\",\n    ),\n    \"networkException\": MessageLookupByLibrary.simpleMessage(\n      \"Ошибка сети, проверьте соединение и попробуйте еще раз\",\n    ),\n    \"networkRequestException\": MessageLookupByLibrary.simpleMessage(\n      \"Исключение сетевого запроса, пожалуйста, попробуйте позже.\",\n    ),\n    \"networkSpeed\": MessageLookupByLibrary.simpleMessage(\"Скорость сети\"),\n    \"networkType\": MessageLookupByLibrary.simpleMessage(\"Тип сети\"),\n    \"neutralScheme\": MessageLookupByLibrary.simpleMessage(\"Нейтральные\"),\n    \"noData\": MessageLookupByLibrary.simpleMessage(\"Нет данных\"),\n    \"noHotKey\": MessageLookupByLibrary.simpleMessage(\"Нет горячей клавиши\"),\n    \"noIcon\": MessageLookupByLibrary.simpleMessage(\"Нет иконки\"),\n    \"noInfo\": MessageLookupByLibrary.simpleMessage(\"Нет информации\"),\n    \"noLongerRemind\": MessageLookupByLibrary.simpleMessage(\n      \"Больше не напоминать\",\n    ),\n    \"noMoreInfoDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Нет дополнительной информации\",\n    ),\n    \"noNetwork\": MessageLookupByLibrary.simpleMessage(\"Нет сети\"),\n    \"noNetworkApp\": MessageLookupByLibrary.simpleMessage(\"Приложение без сети\"),\n    \"noProxy\": MessageLookupByLibrary.simpleMessage(\"Нет прокси\"),\n    \"noProxyDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Пожалуйста, создайте профиль или добавьте действительный профиль\",\n    ),\n    \"noResolve\": MessageLookupByLibrary.simpleMessage(\"Не разрешать IP\"),\n    \"none\": MessageLookupByLibrary.simpleMessage(\"Нет\"),\n    \"notSelectedTip\": MessageLookupByLibrary.simpleMessage(\n      \"Текущая группа прокси не может быть выбрана.\",\n    ),\n    \"nullProfileDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Нет профиля, пожалуйста, добавьте профиль\",\n    ),\n    \"nullTip\": m9,\n    \"numberTip\": m10,\n    \"oneColumn\": MessageLookupByLibrary.simpleMessage(\"Один столбец\"),\n    \"onlyIcon\": MessageLookupByLibrary.simpleMessage(\"Только иконка\"),\n    \"onlyOtherApps\": MessageLookupByLibrary.simpleMessage(\n      \"Только сторонние приложения\",\n    ),\n    \"onlyStatisticsProxy\": MessageLookupByLibrary.simpleMessage(\n      \"Только статистика прокси\",\n    ),\n    \"onlyStatisticsProxyDesc\": MessageLookupByLibrary.simpleMessage(\n      \"При включении будет учитываться только трафик прокси\",\n    ),\n    \"options\": MessageLookupByLibrary.simpleMessage(\"Опции\"),\n    \"other\": MessageLookupByLibrary.simpleMessage(\"Другое\"),\n    \"otherContributors\": MessageLookupByLibrary.simpleMessage(\n      \"Другие участники\",\n    ),\n    \"outboundMode\": MessageLookupByLibrary.simpleMessage(\n      \"Режим исходящего трафика\",\n    ),\n    \"override\": MessageLookupByLibrary.simpleMessage(\"Переопределить\"),\n    \"overrideDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Переопределить конфигурацию, связанную с прокси\",\n    ),\n    \"overrideDns\": MessageLookupByLibrary.simpleMessage(\"Переопределить DNS\"),\n    \"overrideDnsDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Включение переопределит настройки DNS в профиле\",\n    ),\n    \"overrideInvalidTip\": MessageLookupByLibrary.simpleMessage(\n      \"В скриптовом режиме не действует\",\n    ),\n    \"overrideMode\": MessageLookupByLibrary.simpleMessage(\n      \"Режим переопределения\",\n    ),\n    \"overrideOriginRules\": MessageLookupByLibrary.simpleMessage(\n      \"Переопределить оригинальное правило\",\n    ),\n    \"overrideScript\": MessageLookupByLibrary.simpleMessage(\n      \"Скрипт переопределения\",\n    ),\n    \"overwriteTypeCustom\": MessageLookupByLibrary.simpleMessage(\n      \"Пользовательский\",\n    ),\n    \"overwriteTypeCustomDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Пользовательский режим, полная настройка групп прокси и правил\",\n    ),\n    \"palette\": MessageLookupByLibrary.simpleMessage(\"Палитра\"),\n    \"password\": MessageLookupByLibrary.simpleMessage(\"Пароль\"),\n    \"paste\": MessageLookupByLibrary.simpleMessage(\"Вставить\"),\n    \"pleaseBindWebDAV\": MessageLookupByLibrary.simpleMessage(\n      \"Пожалуйста, привяжите WebDAV\",\n    ),\n    \"pleaseEnterScriptName\": MessageLookupByLibrary.simpleMessage(\n      \"Пожалуйста, введите название скрипта\",\n    ),\n    \"pleaseInputAdminPassword\": MessageLookupByLibrary.simpleMessage(\n      \"Пожалуйста, введите пароль администратора\",\n    ),\n    \"pleaseUploadFile\": MessageLookupByLibrary.simpleMessage(\n      \"Пожалуйста, загрузите файл\",\n    ),\n    \"pleaseUploadValidQrcode\": MessageLookupByLibrary.simpleMessage(\n      \"Пожалуйста, загрузите действительный QR-код\",\n    ),\n    \"port\": MessageLookupByLibrary.simpleMessage(\"Порт\"),\n    \"portConflictTip\": MessageLookupByLibrary.simpleMessage(\n      \"Введите другой порт\",\n    ),\n    \"portTip\": m11,\n    \"preferH3Desc\": MessageLookupByLibrary.simpleMessage(\n      \"Приоритетное использование HTTP/3 для DOH\",\n    ),\n    \"pressKeyboard\": MessageLookupByLibrary.simpleMessage(\n      \"Пожалуйста, нажмите клавишу.\",\n    ),\n    \"preview\": MessageLookupByLibrary.simpleMessage(\"Предпросмотр\"),\n    \"process\": MessageLookupByLibrary.simpleMessage(\"процесс\"),\n    \"profile\": MessageLookupByLibrary.simpleMessage(\"Профиль\"),\n    \"profileAutoUpdateIntervalInvalidValidationDesc\":\n        MessageLookupByLibrary.simpleMessage(\n          \"Пожалуйста, введите действительный формат интервала времени\",\n        ),\n    \"profileAutoUpdateIntervalNullValidationDesc\":\n        MessageLookupByLibrary.simpleMessage(\n          \"Пожалуйста, введите интервал времени для автообновления\",\n        ),\n    \"profileHasUpdate\": MessageLookupByLibrary.simpleMessage(\n      \"Профиль был изменен. Хотите отключить автообновление?\",\n    ),\n    \"profileNameNullValidationDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Пожалуйста, введите имя профиля\",\n    ),\n    \"profileParseErrorDesc\": MessageLookupByLibrary.simpleMessage(\n      \"ошибка разбора профиля\",\n    ),\n    \"profileUrlInvalidValidationDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Пожалуйста, введите действительный URL профиля\",\n    ),\n    \"profileUrlNullValidationDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Пожалуйста, введите URL профиля\",\n    ),\n    \"profiles\": MessageLookupByLibrary.simpleMessage(\"Профили\"),\n    \"profilesSort\": MessageLookupByLibrary.simpleMessage(\"Сортировка профилей\"),\n    \"project\": MessageLookupByLibrary.simpleMessage(\"Проект\"),\n    \"providers\": MessageLookupByLibrary.simpleMessage(\"Провайдеры\"),\n    \"proxies\": MessageLookupByLibrary.simpleMessage(\"Прокси\"),\n    \"proxiesSetting\": MessageLookupByLibrary.simpleMessage(\"Настройка прокси\"),\n    \"proxyChains\": MessageLookupByLibrary.simpleMessage(\"Цепочки прокси\"),\n    \"proxyGroup\": MessageLookupByLibrary.simpleMessage(\"Группа прокси\"),\n    \"proxyNameserver\": MessageLookupByLibrary.simpleMessage(\n      \"Прокси-сервер имен\",\n    ),\n    \"proxyNameserverDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Домен для разрешения прокси-узлов\",\n    ),\n    \"proxyPort\": MessageLookupByLibrary.simpleMessage(\"Порт прокси\"),\n    \"proxyPortDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Установить порт прослушивания Clash\",\n    ),\n    \"proxyProviders\": MessageLookupByLibrary.simpleMessage(\"Провайдеры прокси\"),\n    \"pruneCache\": MessageLookupByLibrary.simpleMessage(\"Очистить кэш\"),\n    \"pureBlackMode\": MessageLookupByLibrary.simpleMessage(\"Чисто черный режим\"),\n    \"qrcode\": MessageLookupByLibrary.simpleMessage(\"QR-код\"),\n    \"qrcodeDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Сканируйте QR-код для получения профиля\",\n    ),\n    \"rainbowScheme\": MessageLookupByLibrary.simpleMessage(\"Радужные\"),\n    \"redirPort\": MessageLookupByLibrary.simpleMessage(\"Redir-порт\"),\n    \"redo\": MessageLookupByLibrary.simpleMessage(\"Повторить\"),\n    \"regExp\": MessageLookupByLibrary.simpleMessage(\"Регулярное выражение\"),\n    \"reload\": MessageLookupByLibrary.simpleMessage(\"Перезагрузить\"),\n    \"remote\": MessageLookupByLibrary.simpleMessage(\"Удаленный\"),\n    \"remoteBackupDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Резервное копирование локальных данных на WebDAV\",\n    ),\n    \"remoteDestination\": MessageLookupByLibrary.simpleMessage(\n      \"Удалённое назначение\",\n    ),\n    \"remove\": MessageLookupByLibrary.simpleMessage(\"Удалить\"),\n    \"rename\": MessageLookupByLibrary.simpleMessage(\"Переименовать\"),\n    \"request\": MessageLookupByLibrary.simpleMessage(\"Запрос\"),\n    \"requests\": MessageLookupByLibrary.simpleMessage(\"Запросы\"),\n    \"requestsDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Просмотр последних записей запросов\",\n    ),\n    \"reset\": MessageLookupByLibrary.simpleMessage(\"Сброс\"),\n    \"resetPageChangesTip\": MessageLookupByLibrary.simpleMessage(\n      \"На текущей странице есть изменения. Вы уверены, что хотите сбросить?\",\n    ),\n    \"resetTip\": MessageLookupByLibrary.simpleMessage(\n      \"Убедитесь, что хотите сбросить\",\n    ),\n    \"resources\": MessageLookupByLibrary.simpleMessage(\"Ресурсы\"),\n    \"resourcesDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Информация, связанная с внешними ресурсами\",\n    ),\n    \"respectRules\": MessageLookupByLibrary.simpleMessage(\"Соблюдение правил\"),\n    \"respectRulesDesc\": MessageLookupByLibrary.simpleMessage(\n      \"DNS-соединение следует правилам, необходимо настроить proxy-server-nameserver\",\n    ),\n    \"restart\": MessageLookupByLibrary.simpleMessage(\"Перезапустить\"),\n    \"restartCoreTip\": MessageLookupByLibrary.simpleMessage(\n      \"Вы уверены, что хотите перезапустить ядро?\",\n    ),\n    \"restore\": MessageLookupByLibrary.simpleMessage(\"Восстановить\"),\n    \"restoreAllData\": MessageLookupByLibrary.simpleMessage(\n      \"Восстановить все данные\",\n    ),\n    \"restoreException\": MessageLookupByLibrary.simpleMessage(\n      \"Ошибка восстановления\",\n    ),\n    \"restoreFromFileDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Восстановить данные из файла\",\n    ),\n    \"restoreFromWebDAVDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Восстановить данные через WebDAV\",\n    ),\n    \"restoreOnlyConfig\": MessageLookupByLibrary.simpleMessage(\n      \"Восстановить только файлы конфигурации\",\n    ),\n    \"restoreStrategy\": MessageLookupByLibrary.simpleMessage(\n      \"Стратегия восстановления\",\n    ),\n    \"restoreStrategy_compatible\": MessageLookupByLibrary.simpleMessage(\n      \"Совместимый\",\n    ),\n    \"restoreStrategy_override\": MessageLookupByLibrary.simpleMessage(\n      \"Перезаписать\",\n    ),\n    \"restoreSuccess\": MessageLookupByLibrary.simpleMessage(\n      \"Восстановление успешно\",\n    ),\n    \"routeAddress\": MessageLookupByLibrary.simpleMessage(\"Адрес маршрутизации\"),\n    \"routeAddressDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Настройка адреса прослушивания маршрутизации\",\n    ),\n    \"routeMode\": MessageLookupByLibrary.simpleMessage(\"Режим маршрутизации\"),\n    \"routeMode_bypassPrivate\": MessageLookupByLibrary.simpleMessage(\n      \"Обход частных адресов маршрутизации\",\n    ),\n    \"routeMode_config\": MessageLookupByLibrary.simpleMessage(\n      \"Использовать конфигурацию\",\n    ),\n    \"ru\": MessageLookupByLibrary.simpleMessage(\"Русский\"),\n    \"rule\": MessageLookupByLibrary.simpleMessage(\"Правило\"),\n    \"ruleName\": MessageLookupByLibrary.simpleMessage(\"Название правила\"),\n    \"ruleProviders\": MessageLookupByLibrary.simpleMessage(\"Провайдеры правил\"),\n    \"ruleTarget\": MessageLookupByLibrary.simpleMessage(\"Цель правила\"),\n    \"save\": MessageLookupByLibrary.simpleMessage(\"Сохранить\"),\n    \"saveChanges\": MessageLookupByLibrary.simpleMessage(\"Сохранить изменения?\"),\n    \"saveTip\": MessageLookupByLibrary.simpleMessage(\n      \"Вы уверены, что хотите сохранить?\",\n    ),\n    \"script\": MessageLookupByLibrary.simpleMessage(\"Скрипт\"),\n    \"scriptModeDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Режим скрипта, использование внешних расширяющих скриптов, предоставление возможности переопределения конфигурации одним кликом\",\n    ),\n    \"search\": MessageLookupByLibrary.simpleMessage(\"Поиск\"),\n    \"seconds\": MessageLookupByLibrary.simpleMessage(\"Секунд\"),\n    \"selectAll\": MessageLookupByLibrary.simpleMessage(\"Выбрать все\"),\n    \"selected\": MessageLookupByLibrary.simpleMessage(\"Выбрано\"),\n    \"selectedCountTitle\": m12,\n    \"settings\": MessageLookupByLibrary.simpleMessage(\"Настройки\"),\n    \"show\": MessageLookupByLibrary.simpleMessage(\"Показать\"),\n    \"shrink\": MessageLookupByLibrary.simpleMessage(\"Сжать\"),\n    \"silentLaunch\": MessageLookupByLibrary.simpleMessage(\"Тихий запуск\"),\n    \"silentLaunchDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Запуск в фоновом режиме\",\n    ),\n    \"size\": MessageLookupByLibrary.simpleMessage(\"Размер\"),\n    \"socksPort\": MessageLookupByLibrary.simpleMessage(\"Socks-порт\"),\n    \"sort\": MessageLookupByLibrary.simpleMessage(\"Сортировка\"),\n    \"source\": MessageLookupByLibrary.simpleMessage(\"Источник\"),\n    \"sourceIp\": MessageLookupByLibrary.simpleMessage(\"Исходный IP\"),\n    \"specialProxy\": MessageLookupByLibrary.simpleMessage(\"Специальный прокси\"),\n    \"specialRules\": MessageLookupByLibrary.simpleMessage(\"Специальные правила\"),\n    \"speedStatistics\": MessageLookupByLibrary.simpleMessage(\n      \"Статистика скорости\",\n    ),\n    \"stackMode\": MessageLookupByLibrary.simpleMessage(\"Режим стека\"),\n    \"standard\": MessageLookupByLibrary.simpleMessage(\"Стандартный\"),\n    \"standardModeDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Стандартный режим, переопределение базовой конфигурации, предоставление возможности простого добавления правил\",\n    ),\n    \"start\": MessageLookupByLibrary.simpleMessage(\"Старт\"),\n    \"startVpn\": MessageLookupByLibrary.simpleMessage(\"Запуск VPN...\"),\n    \"status\": MessageLookupByLibrary.simpleMessage(\"Статус\"),\n    \"statusDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Системный DNS будет использоваться при выключении\",\n    ),\n    \"stop\": MessageLookupByLibrary.simpleMessage(\"Стоп\"),\n    \"stopVpn\": MessageLookupByLibrary.simpleMessage(\"Остановка VPN...\"),\n    \"style\": MessageLookupByLibrary.simpleMessage(\"Стиль\"),\n    \"subRule\": MessageLookupByLibrary.simpleMessage(\"Подправило\"),\n    \"submit\": MessageLookupByLibrary.simpleMessage(\"Отправить\"),\n    \"sync\": MessageLookupByLibrary.simpleMessage(\"Синхронизация\"),\n    \"system\": MessageLookupByLibrary.simpleMessage(\"Система\"),\n    \"systemApp\": MessageLookupByLibrary.simpleMessage(\"Системное приложение\"),\n    \"systemFont\": MessageLookupByLibrary.simpleMessage(\"Системный шрифт\"),\n    \"systemProxy\": MessageLookupByLibrary.simpleMessage(\"Системный прокси\"),\n    \"systemProxyDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Прикрепить HTTP-прокси к VpnService\",\n    ),\n    \"tab\": MessageLookupByLibrary.simpleMessage(\"Вкладка\"),\n    \"tabAnimation\": MessageLookupByLibrary.simpleMessage(\"Анимация вкладок\"),\n    \"tabAnimationDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Действительно только в мобильном виде\",\n    ),\n    \"tcpConcurrent\": MessageLookupByLibrary.simpleMessage(\"TCP параллелизм\"),\n    \"tcpConcurrentDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Включение позволит использовать параллелизм TCP\",\n    ),\n    \"testUrl\": MessageLookupByLibrary.simpleMessage(\"Тест URL\"),\n    \"textScale\": MessageLookupByLibrary.simpleMessage(\"Масштабирование текста\"),\n    \"theme\": MessageLookupByLibrary.simpleMessage(\"Тема\"),\n    \"themeColor\": MessageLookupByLibrary.simpleMessage(\"Цвет темы\"),\n    \"themeDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Установить темный режим, настроить цвет\",\n    ),\n    \"themeMode\": MessageLookupByLibrary.simpleMessage(\"Режим темы\"),\n    \"threeColumns\": MessageLookupByLibrary.simpleMessage(\"Три столбца\"),\n    \"tight\": MessageLookupByLibrary.simpleMessage(\"Плотный\"),\n    \"time\": MessageLookupByLibrary.simpleMessage(\"Время\"),\n    \"tip\": MessageLookupByLibrary.simpleMessage(\"подсказка\"),\n    \"toggle\": MessageLookupByLibrary.simpleMessage(\"Переключить\"),\n    \"tonalSpotScheme\": MessageLookupByLibrary.simpleMessage(\"Тональный акцент\"),\n    \"tools\": MessageLookupByLibrary.simpleMessage(\"Инструменты\"),\n    \"tproxyPort\": MessageLookupByLibrary.simpleMessage(\"Tproxy-порт\"),\n    \"trafficUsage\": MessageLookupByLibrary.simpleMessage(\n      \"Использование трафика\",\n    ),\n    \"tun\": MessageLookupByLibrary.simpleMessage(\"TUN\"),\n    \"tunDesc\": MessageLookupByLibrary.simpleMessage(\n      \"действительно только в режиме администратора\",\n    ),\n    \"turnOff\": MessageLookupByLibrary.simpleMessage(\"Выключить\"),\n    \"turnOn\": MessageLookupByLibrary.simpleMessage(\"Включить\"),\n    \"twoColumns\": MessageLookupByLibrary.simpleMessage(\"Два столбца\"),\n    \"unableToUpdateCurrentProfileDesc\": MessageLookupByLibrary.simpleMessage(\n      \"невозможно обновить текущий профиль\",\n    ),\n    \"undo\": MessageLookupByLibrary.simpleMessage(\"Отменить\"),\n    \"unifiedDelay\": MessageLookupByLibrary.simpleMessage(\n      \"Унифицированная задержка\",\n    ),\n    \"unifiedDelayDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Убрать дополнительные задержки, такие как рукопожатие\",\n    ),\n    \"unknown\": MessageLookupByLibrary.simpleMessage(\"Неизвестно\"),\n    \"unknownNetworkError\": MessageLookupByLibrary.simpleMessage(\n      \"Неизвестная сетевая ошибка\",\n    ),\n    \"unnamed\": MessageLookupByLibrary.simpleMessage(\"Без имени\"),\n    \"update\": MessageLookupByLibrary.simpleMessage(\"Обновить\"),\n    \"upload\": MessageLookupByLibrary.simpleMessage(\"Загрузка\"),\n    \"url\": MessageLookupByLibrary.simpleMessage(\"URL\"),\n    \"urlDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Получить профиль через URL\",\n    ),\n    \"urlTip\": m13,\n    \"useHosts\": MessageLookupByLibrary.simpleMessage(\"Использовать hosts\"),\n    \"useSystemHosts\": MessageLookupByLibrary.simpleMessage(\n      \"Использовать системные hosts\",\n    ),\n    \"value\": MessageLookupByLibrary.simpleMessage(\"Значение\"),\n    \"vibrantScheme\": MessageLookupByLibrary.simpleMessage(\"Яркие\"),\n    \"view\": MessageLookupByLibrary.simpleMessage(\"Просмотр\"),\n    \"vpnConfigChangeDetected\": MessageLookupByLibrary.simpleMessage(\n      \"Обнаружено изменение конфигурации VPN\",\n    ),\n    \"vpnDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Изменение настроек, связанных с VPN\",\n    ),\n    \"vpnEnableDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Автоматически направляет весь системный трафик через VpnService\",\n    ),\n    \"vpnSystemProxyDesc\": MessageLookupByLibrary.simpleMessage(\n      \"Прикрепить HTTP-прокси к VpnService\",\n    ),\n    \"vpnTip\": MessageLookupByLibrary.simpleMessage(\n      \"Изменения вступят в силу после перезапуска VPN\",\n    ),\n    \"webDAVConfiguration\": MessageLookupByLibrary.simpleMessage(\n      \"Конфигурация WebDAV\",\n    ),\n    \"whitelistMode\": MessageLookupByLibrary.simpleMessage(\n      \"Режим белого списка\",\n    ),\n    \"years\": MessageLookupByLibrary.simpleMessage(\"Лет\"),\n    \"yearsAgo\": m14,\n    \"zh_CN\": MessageLookupByLibrary.simpleMessage(\"Упрощенный китайский\"),\n  };\n}\n"
  },
  {
    "path": "lib/l10n/intl/messages_zh_CN.dart",
    "content": "// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart\n// This is a library that provides messages for a zh_CN locale. All the\n// messages from the main program should be duplicated here with the same\n// function name.\n\n// Ignore issues from commonly used lints in this file.\n// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new\n// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering\n// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases\n// ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes\n// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes\n\nimport 'package:intl/intl.dart';\nimport 'package:intl/message_lookup_by_library.dart';\n\nfinal messages = new MessageLookup();\n\ntypedef String MessageIfAbsent(String messageStr, List<dynamic> args);\n\nclass MessageLookup extends MessageLookupByLibrary {\n  String get localeName => 'zh_CN';\n\n  static String m0(count) => \"${count} 天前\";\n\n  static String m1(label) => \"确定删除选中的${label}吗？\";\n\n  static String m2(label) => \"确定删除当前${label}吗？\";\n\n  static String m3(label) => \"${label}详情\";\n\n  static String m4(label) => \"${label}不能为空\";\n\n  static String m5(label) => \"${label}当前已存在\";\n\n  static String m6(count) => \"${count} 小时前\";\n\n  static String m7(count) => \"${count} 分钟前\";\n\n  static String m8(count) => \"${count} 个月前\";\n\n  static String m9(label) => \"暂无${label}\";\n\n  static String m10(label) => \"${label}必须为数字\";\n\n  static String m11(label) => \"${label} 必须在 1024 到 49151 之间\";\n\n  static String m12(count) => \"已选择 ${count} 项\";\n\n  static String m13(label) => \"${label}必须为URL\";\n\n  static String m14(count) => \"${count} 年前\";\n\n  final messages = _notInlinedMessages(_notInlinedMessages);\n  static Map<String, Function> _notInlinedMessages(_) => <String, Function>{\n    \"about\": MessageLookupByLibrary.simpleMessage(\"关于\"),\n    \"accessControl\": MessageLookupByLibrary.simpleMessage(\"访问控制\"),\n    \"accessControlAllowDesc\": MessageLookupByLibrary.simpleMessage(\n      \"只允许选中应用进入VPN\",\n    ),\n    \"accessControlDesc\": MessageLookupByLibrary.simpleMessage(\"配置应用访问代理\"),\n    \"accessControlNotAllowDesc\": MessageLookupByLibrary.simpleMessage(\n      \"选中应用将会被排除在VPN之外\",\n    ),\n    \"accessControlSettings\": MessageLookupByLibrary.simpleMessage(\"访问控制设置\"),\n    \"account\": MessageLookupByLibrary.simpleMessage(\"账号\"),\n    \"action\": MessageLookupByLibrary.simpleMessage(\"操作\"),\n    \"action_mode\": MessageLookupByLibrary.simpleMessage(\"切换模式\"),\n    \"action_proxy\": MessageLookupByLibrary.simpleMessage(\"系统代理\"),\n    \"action_start\": MessageLookupByLibrary.simpleMessage(\"启动/停止\"),\n    \"action_tun\": MessageLookupByLibrary.simpleMessage(\"虚拟网卡\"),\n    \"action_view\": MessageLookupByLibrary.simpleMessage(\"显示/隐藏\"),\n    \"add\": MessageLookupByLibrary.simpleMessage(\"添加\"),\n    \"addProfile\": MessageLookupByLibrary.simpleMessage(\"添加配置\"),\n    \"addRule\": MessageLookupByLibrary.simpleMessage(\"添加规则\"),\n    \"addedOriginRules\": MessageLookupByLibrary.simpleMessage(\"附加到原始规则\"),\n    \"addedRules\": MessageLookupByLibrary.simpleMessage(\"附加规则\"),\n    \"address\": MessageLookupByLibrary.simpleMessage(\"地址\"),\n    \"addressHelp\": MessageLookupByLibrary.simpleMessage(\"WebDAV服务器地址\"),\n    \"addressTip\": MessageLookupByLibrary.simpleMessage(\"请输入有效的WebDAV地址\"),\n    \"adminAutoLaunch\": MessageLookupByLibrary.simpleMessage(\"管理员自启动\"),\n    \"adminAutoLaunchDesc\": MessageLookupByLibrary.simpleMessage(\"使用管理员模式开机自启动\"),\n    \"advancedConfig\": MessageLookupByLibrary.simpleMessage(\"进阶配置\"),\n    \"advancedConfigDesc\": MessageLookupByLibrary.simpleMessage(\"提供多样化配置\"),\n    \"ago\": MessageLookupByLibrary.simpleMessage(\"前\"),\n    \"agree\": MessageLookupByLibrary.simpleMessage(\"同意\"),\n    \"allApps\": MessageLookupByLibrary.simpleMessage(\"所有应用\"),\n    \"allowBypass\": MessageLookupByLibrary.simpleMessage(\"允许应用绕过VPN\"),\n    \"allowBypassDesc\": MessageLookupByLibrary.simpleMessage(\"开启后部分应用可绕过VPN\"),\n    \"allowLan\": MessageLookupByLibrary.simpleMessage(\"局域网代理\"),\n    \"allowLanDesc\": MessageLookupByLibrary.simpleMessage(\"允许通过局域网访问代理\"),\n    \"app\": MessageLookupByLibrary.simpleMessage(\"应用\"),\n    \"appAccessControl\": MessageLookupByLibrary.simpleMessage(\"应用访问控制\"),\n    \"appDesc\": MessageLookupByLibrary.simpleMessage(\"处理应用相关设置\"),\n    \"appendSystemDns\": MessageLookupByLibrary.simpleMessage(\"追加系统DNS\"),\n    \"appendSystemDnsTip\": MessageLookupByLibrary.simpleMessage(\"强制为配置附加系统DNS\"),\n    \"application\": MessageLookupByLibrary.simpleMessage(\"应用程序\"),\n    \"applicationDesc\": MessageLookupByLibrary.simpleMessage(\"修改应用程序相关设置\"),\n    \"auto\": MessageLookupByLibrary.simpleMessage(\"自动\"),\n    \"autoCheckUpdate\": MessageLookupByLibrary.simpleMessage(\"自动检查更新\"),\n    \"autoCheckUpdateDesc\": MessageLookupByLibrary.simpleMessage(\"应用启动时自动检查更新\"),\n    \"autoCloseConnections\": MessageLookupByLibrary.simpleMessage(\"自动关闭连接\"),\n    \"autoCloseConnectionsDesc\": MessageLookupByLibrary.simpleMessage(\n      \"切换节点后自动关闭连接\",\n    ),\n    \"autoLaunch\": MessageLookupByLibrary.simpleMessage(\"自启动\"),\n    \"autoLaunchDesc\": MessageLookupByLibrary.simpleMessage(\"跟随系统自启动\"),\n    \"autoRun\": MessageLookupByLibrary.simpleMessage(\"自动运行\"),\n    \"autoRunDesc\": MessageLookupByLibrary.simpleMessage(\"应用打开时自动运行\"),\n    \"autoSetSystemDns\": MessageLookupByLibrary.simpleMessage(\"自动设置系统DNS\"),\n    \"autoUpdate\": MessageLookupByLibrary.simpleMessage(\"自动更新\"),\n    \"autoUpdateInterval\": MessageLookupByLibrary.simpleMessage(\"自动更新间隔（分钟）\"),\n    \"backup\": MessageLookupByLibrary.simpleMessage(\"备份\"),\n    \"backupAndRestore\": MessageLookupByLibrary.simpleMessage(\"备份与恢复\"),\n    \"backupAndRestoreDesc\": MessageLookupByLibrary.simpleMessage(\n      \"通过WebDAV或者文件同步数据\",\n    ),\n    \"backupSuccess\": MessageLookupByLibrary.simpleMessage(\"备份成功\"),\n    \"basicConfig\": MessageLookupByLibrary.simpleMessage(\"基本配置\"),\n    \"basicConfigDesc\": MessageLookupByLibrary.simpleMessage(\"全局修改基本配置\"),\n    \"bind\": MessageLookupByLibrary.simpleMessage(\"绑定\"),\n    \"blacklistMode\": MessageLookupByLibrary.simpleMessage(\"黑名单模式\"),\n    \"bypassDomain\": MessageLookupByLibrary.simpleMessage(\"排除域名\"),\n    \"bypassDomainDesc\": MessageLookupByLibrary.simpleMessage(\"仅在系统代理启用时生效\"),\n    \"cacheCorrupt\": MessageLookupByLibrary.simpleMessage(\"缓存已损坏，是否清空？\"),\n    \"cancel\": MessageLookupByLibrary.simpleMessage(\"取消\"),\n    \"cancelFilterSystemApp\": MessageLookupByLibrary.simpleMessage(\"取消过滤系统应用\"),\n    \"cancelSelectAll\": MessageLookupByLibrary.simpleMessage(\"取消全选\"),\n    \"checkError\": MessageLookupByLibrary.simpleMessage(\"检测失败\"),\n    \"checkUpdate\": MessageLookupByLibrary.simpleMessage(\"检查更新\"),\n    \"checkUpdateError\": MessageLookupByLibrary.simpleMessage(\"当前应用已经是最新版了\"),\n    \"checking\": MessageLookupByLibrary.simpleMessage(\"检测中...\"),\n    \"clearData\": MessageLookupByLibrary.simpleMessage(\"清除数据\"),\n    \"clipboardExport\": MessageLookupByLibrary.simpleMessage(\"导出剪贴板\"),\n    \"clipboardImport\": MessageLookupByLibrary.simpleMessage(\"剪贴板导入\"),\n    \"color\": MessageLookupByLibrary.simpleMessage(\"颜色\"),\n    \"colorSchemes\": MessageLookupByLibrary.simpleMessage(\"配色方案\"),\n    \"columns\": MessageLookupByLibrary.simpleMessage(\"列数\"),\n    \"compatible\": MessageLookupByLibrary.simpleMessage(\"兼容模式\"),\n    \"compatibleDesc\": MessageLookupByLibrary.simpleMessage(\n      \"开启将失去部分应用能力，获得全量的Clash的支持\",\n    ),\n    \"confirm\": MessageLookupByLibrary.simpleMessage(\"确定\"),\n    \"confirmClearAllData\": MessageLookupByLibrary.simpleMessage(\"确定要清除所有数据？\"),\n    \"confirmForceCrashCore\": MessageLookupByLibrary.simpleMessage(\"确定要强制崩溃核心？\"),\n    \"connected\": MessageLookupByLibrary.simpleMessage(\"已连接\"),\n    \"connecting\": MessageLookupByLibrary.simpleMessage(\"连接中...\"),\n    \"connection\": MessageLookupByLibrary.simpleMessage(\"连接\"),\n    \"connections\": MessageLookupByLibrary.simpleMessage(\"连接\"),\n    \"connectionsDesc\": MessageLookupByLibrary.simpleMessage(\"查看当前连接数据\"),\n    \"connectivity\": MessageLookupByLibrary.simpleMessage(\"连通性：\"),\n    \"contactMe\": MessageLookupByLibrary.simpleMessage(\"联系我\"),\n    \"content\": MessageLookupByLibrary.simpleMessage(\"内容\"),\n    \"contentScheme\": MessageLookupByLibrary.simpleMessage(\"内容主题\"),\n    \"controlGlobalAddedRules\": MessageLookupByLibrary.simpleMessage(\"控制全局附加规则\"),\n    \"copy\": MessageLookupByLibrary.simpleMessage(\"复制\"),\n    \"copyEnvVar\": MessageLookupByLibrary.simpleMessage(\"复制环境变量\"),\n    \"copyLink\": MessageLookupByLibrary.simpleMessage(\"复制链接\"),\n    \"copySuccess\": MessageLookupByLibrary.simpleMessage(\"复制成功\"),\n    \"core\": MessageLookupByLibrary.simpleMessage(\"内核\"),\n    \"coreConfigChangeDetected\": MessageLookupByLibrary.simpleMessage(\n      \"检测到核心配置更改\",\n    ),\n    \"coreInfo\": MessageLookupByLibrary.simpleMessage(\"内核信息\"),\n    \"coreStatus\": MessageLookupByLibrary.simpleMessage(\"核心状态\"),\n    \"country\": MessageLookupByLibrary.simpleMessage(\"区域\"),\n    \"crashTest\": MessageLookupByLibrary.simpleMessage(\"崩溃测试\"),\n    \"crashlytics\": MessageLookupByLibrary.simpleMessage(\"崩溃分析\"),\n    \"crashlyticsTip\": MessageLookupByLibrary.simpleMessage(\n      \"开启后，应用崩溃时自动上传不包含敏感信息的崩溃日志\",\n    ),\n    \"create\": MessageLookupByLibrary.simpleMessage(\"创建\"),\n    \"creationTime\": MessageLookupByLibrary.simpleMessage(\"创建时间\"),\n    \"cut\": MessageLookupByLibrary.simpleMessage(\"剪切\"),\n    \"dark\": MessageLookupByLibrary.simpleMessage(\"深色\"),\n    \"dashboard\": MessageLookupByLibrary.simpleMessage(\"仪表盘\"),\n    \"dataCollectionContent\": MessageLookupByLibrary.simpleMessage(\n      \"本应用使用 Firebase Crashlytics 收集崩溃信息以改进应用稳定性。\\n收集的数据包括设备信息和崩溃详情，不包含个人敏感数据。\\n您可以在设置中关闭此功能。\",\n    ),\n    \"dataCollectionTip\": MessageLookupByLibrary.simpleMessage(\"数据收集说明\"),\n    \"days\": MessageLookupByLibrary.simpleMessage(\"天\"),\n    \"daysAgo\": m0,\n    \"defaultNameserver\": MessageLookupByLibrary.simpleMessage(\"默认域名服务器\"),\n    \"defaultNameserverDesc\": MessageLookupByLibrary.simpleMessage(\"用于解析DNS服务器\"),\n    \"defaultSort\": MessageLookupByLibrary.simpleMessage(\"按默认排序\"),\n    \"defaultText\": MessageLookupByLibrary.simpleMessage(\"默认\"),\n    \"delay\": MessageLookupByLibrary.simpleMessage(\"延迟\"),\n    \"delaySort\": MessageLookupByLibrary.simpleMessage(\"按延迟排序\"),\n    \"delayTest\": MessageLookupByLibrary.simpleMessage(\"延迟测试\"),\n    \"delete\": MessageLookupByLibrary.simpleMessage(\"删除\"),\n    \"deleteMultipTip\": m1,\n    \"deleteTip\": m2,\n    \"desc\": MessageLookupByLibrary.simpleMessage(\n      \"基于ClashMeta的多平台代理客户端，简单易用，开源无广告。\",\n    ),\n    \"destination\": MessageLookupByLibrary.simpleMessage(\"目标地址\"),\n    \"destinationGeoIP\": MessageLookupByLibrary.simpleMessage(\"目标地理定位\"),\n    \"destinationIPASN\": MessageLookupByLibrary.simpleMessage(\"目标IP ASN\"),\n    \"details\": m3,\n    \"detectionTip\": MessageLookupByLibrary.simpleMessage(\"依赖第三方api，仅供参考\"),\n    \"developerMode\": MessageLookupByLibrary.simpleMessage(\"开发者模式\"),\n    \"developerModeEnableTip\": MessageLookupByLibrary.simpleMessage(\"开发者模式已启用。\"),\n    \"direct\": MessageLookupByLibrary.simpleMessage(\"直连\"),\n    \"disclaimer\": MessageLookupByLibrary.simpleMessage(\"免责声明\"),\n    \"disclaimerDesc\": MessageLookupByLibrary.simpleMessage(\n      \"本软件仅供学习交流、科研等非商业性质的用途，严禁将本软件用于商业目的。如有任何商业行为，均与本软件无关。\",\n    ),\n    \"disconnected\": MessageLookupByLibrary.simpleMessage(\"已断开\"),\n    \"discoverNewVersion\": MessageLookupByLibrary.simpleMessage(\"发现新版本\"),\n    \"discovery\": MessageLookupByLibrary.simpleMessage(\"发现新版本\"),\n    \"dnsDesc\": MessageLookupByLibrary.simpleMessage(\"更新DNS相关设置\"),\n    \"dnsHijacking\": MessageLookupByLibrary.simpleMessage(\"DNS劫持\"),\n    \"dnsMode\": MessageLookupByLibrary.simpleMessage(\"DNS模式\"),\n    \"doYouWantToPass\": MessageLookupByLibrary.simpleMessage(\"是否要通过\"),\n    \"domain\": MessageLookupByLibrary.simpleMessage(\"域名\"),\n    \"download\": MessageLookupByLibrary.simpleMessage(\"下载\"),\n    \"edit\": MessageLookupByLibrary.simpleMessage(\"编辑\"),\n    \"editGlobalRules\": MessageLookupByLibrary.simpleMessage(\"编辑全局规则\"),\n    \"editRule\": MessageLookupByLibrary.simpleMessage(\"编辑规则\"),\n    \"emptyTip\": m4,\n    \"en\": MessageLookupByLibrary.simpleMessage(\"英语\"),\n    \"enableOverride\": MessageLookupByLibrary.simpleMessage(\"启用覆写\"),\n    \"entries\": MessageLookupByLibrary.simpleMessage(\"个条目\"),\n    \"exclude\": MessageLookupByLibrary.simpleMessage(\"从最近任务中隐藏\"),\n    \"excludeDesc\": MessageLookupByLibrary.simpleMessage(\"应用在后台时,从最近任务中隐藏应用\"),\n    \"existsTip\": m5,\n    \"exit\": MessageLookupByLibrary.simpleMessage(\"退出\"),\n    \"expand\": MessageLookupByLibrary.simpleMessage(\"标准\"),\n    \"expirationTime\": MessageLookupByLibrary.simpleMessage(\"到期时间\"),\n    \"exportFile\": MessageLookupByLibrary.simpleMessage(\"导出文件\"),\n    \"exportLogs\": MessageLookupByLibrary.simpleMessage(\"导出日志\"),\n    \"exportSuccess\": MessageLookupByLibrary.simpleMessage(\"导出成功\"),\n    \"expressiveScheme\": MessageLookupByLibrary.simpleMessage(\"表现力\"),\n    \"externalController\": MessageLookupByLibrary.simpleMessage(\"外部控制器\"),\n    \"externalControllerDesc\": MessageLookupByLibrary.simpleMessage(\n      \"开启后将可以通过9090端口控制Clash内核\",\n    ),\n    \"externalFetch\": MessageLookupByLibrary.simpleMessage(\"外部获取\"),\n    \"externalLink\": MessageLookupByLibrary.simpleMessage(\"外部链接\"),\n    \"externalResources\": MessageLookupByLibrary.simpleMessage(\"外部资源\"),\n    \"fakeipFilter\": MessageLookupByLibrary.simpleMessage(\"Fakeip过滤\"),\n    \"fakeipRange\": MessageLookupByLibrary.simpleMessage(\"Fakeip范围\"),\n    \"fallback\": MessageLookupByLibrary.simpleMessage(\"Fallback\"),\n    \"fallbackDesc\": MessageLookupByLibrary.simpleMessage(\"一般情况下使用境外DNS\"),\n    \"fallbackFilter\": MessageLookupByLibrary.simpleMessage(\"Fallback过滤\"),\n    \"fidelityScheme\": MessageLookupByLibrary.simpleMessage(\"高保真\"),\n    \"file\": MessageLookupByLibrary.simpleMessage(\"文件\"),\n    \"fileDesc\": MessageLookupByLibrary.simpleMessage(\"直接上传配置文件\"),\n    \"fileIsUpdate\": MessageLookupByLibrary.simpleMessage(\"文件有修改，是否保存修改\"),\n    \"filterSystemApp\": MessageLookupByLibrary.simpleMessage(\"过滤系统应用\"),\n    \"findProcessMode\": MessageLookupByLibrary.simpleMessage(\"查找进程\"),\n    \"findProcessModeDesc\": MessageLookupByLibrary.simpleMessage(\"开启后会有一定性能损耗\"),\n    \"fontFamily\": MessageLookupByLibrary.simpleMessage(\"字体\"),\n    \"forceRestartCoreTip\": MessageLookupByLibrary.simpleMessage(\"您确定要强制重启核心吗？\"),\n    \"fourColumns\": MessageLookupByLibrary.simpleMessage(\"四列\"),\n    \"fruitSaladScheme\": MessageLookupByLibrary.simpleMessage(\"果缤纷\"),\n    \"general\": MessageLookupByLibrary.simpleMessage(\"常规\"),\n    \"generalDesc\": MessageLookupByLibrary.simpleMessage(\"修改通用设置\"),\n    \"geoData\": MessageLookupByLibrary.simpleMessage(\"地理数据\"),\n    \"geodataLoader\": MessageLookupByLibrary.simpleMessage(\"Geo低内存模式\"),\n    \"geodataLoaderDesc\": MessageLookupByLibrary.simpleMessage(\"开启将使用Geo低内存加载器\"),\n    \"geoipCode\": MessageLookupByLibrary.simpleMessage(\"Geoip代码\"),\n    \"getOriginRules\": MessageLookupByLibrary.simpleMessage(\"获取原始规则\"),\n    \"global\": MessageLookupByLibrary.simpleMessage(\"全局\"),\n    \"go\": MessageLookupByLibrary.simpleMessage(\"前往\"),\n    \"goDownload\": MessageLookupByLibrary.simpleMessage(\"前往下载\"),\n    \"goToConfigureScript\": MessageLookupByLibrary.simpleMessage(\"前往配置脚本\"),\n    \"hasCacheChange\": MessageLookupByLibrary.simpleMessage(\"是否缓存修改\"),\n    \"host\": MessageLookupByLibrary.simpleMessage(\"主机\"),\n    \"hostsDesc\": MessageLookupByLibrary.simpleMessage(\"追加Hosts\"),\n    \"hotkeyConflict\": MessageLookupByLibrary.simpleMessage(\"快捷键冲突\"),\n    \"hotkeyManagement\": MessageLookupByLibrary.simpleMessage(\"快捷键管理\"),\n    \"hotkeyManagementDesc\": MessageLookupByLibrary.simpleMessage(\"使用键盘控制应用程序\"),\n    \"hours\": MessageLookupByLibrary.simpleMessage(\"小时\"),\n    \"hoursAgo\": m6,\n    \"icon\": MessageLookupByLibrary.simpleMessage(\"图片\"),\n    \"iconConfiguration\": MessageLookupByLibrary.simpleMessage(\"图片配置\"),\n    \"iconStyle\": MessageLookupByLibrary.simpleMessage(\"图标样式\"),\n    \"import\": MessageLookupByLibrary.simpleMessage(\"导入\"),\n    \"importFile\": MessageLookupByLibrary.simpleMessage(\"通过文件导入\"),\n    \"importFromURL\": MessageLookupByLibrary.simpleMessage(\"从URL导入\"),\n    \"importUrl\": MessageLookupByLibrary.simpleMessage(\"通过URL导入\"),\n    \"infiniteTime\": MessageLookupByLibrary.simpleMessage(\"长期有效\"),\n    \"init\": MessageLookupByLibrary.simpleMessage(\"初始化\"),\n    \"inputCorrectHotkey\": MessageLookupByLibrary.simpleMessage(\"请输入正确的快捷键\"),\n    \"intelligentSelected\": MessageLookupByLibrary.simpleMessage(\"智能选择\"),\n    \"internet\": MessageLookupByLibrary.simpleMessage(\"互联网\"),\n    \"interval\": MessageLookupByLibrary.simpleMessage(\"间隔\"),\n    \"intranetIP\": MessageLookupByLibrary.simpleMessage(\"内网 IP\"),\n    \"invalidBackupFile\": MessageLookupByLibrary.simpleMessage(\"无效备份文件\"),\n    \"ipcidr\": MessageLookupByLibrary.simpleMessage(\"IP/掩码\"),\n    \"ipv6Desc\": MessageLookupByLibrary.simpleMessage(\"开启后将可以接收IPv6流量\"),\n    \"ipv6InboundDesc\": MessageLookupByLibrary.simpleMessage(\"允许IPv6入站\"),\n    \"ja\": MessageLookupByLibrary.simpleMessage(\"日语\"),\n    \"just\": MessageLookupByLibrary.simpleMessage(\"刚刚\"),\n    \"justNow\": MessageLookupByLibrary.simpleMessage(\"刚刚\"),\n    \"keepAliveIntervalDesc\": MessageLookupByLibrary.simpleMessage(\"TCP保持活动间隔\"),\n    \"key\": MessageLookupByLibrary.simpleMessage(\"键\"),\n    \"language\": MessageLookupByLibrary.simpleMessage(\"语言\"),\n    \"layout\": MessageLookupByLibrary.simpleMessage(\"布局\"),\n    \"light\": MessageLookupByLibrary.simpleMessage(\"浅色\"),\n    \"list\": MessageLookupByLibrary.simpleMessage(\"列表\"),\n    \"listen\": MessageLookupByLibrary.simpleMessage(\"监听\"),\n    \"loadTest\": MessageLookupByLibrary.simpleMessage(\"加载测试\"),\n    \"loading\": MessageLookupByLibrary.simpleMessage(\"加载中...\"),\n    \"local\": MessageLookupByLibrary.simpleMessage(\"本地\"),\n    \"localBackupDesc\": MessageLookupByLibrary.simpleMessage(\"备份数据到本地\"),\n    \"log\": MessageLookupByLibrary.simpleMessage(\"日志\"),\n    \"logLevel\": MessageLookupByLibrary.simpleMessage(\"日志等级\"),\n    \"logcat\": MessageLookupByLibrary.simpleMessage(\"日志捕获\"),\n    \"logcatDesc\": MessageLookupByLibrary.simpleMessage(\"禁用将会隐藏日志入口\"),\n    \"logs\": MessageLookupByLibrary.simpleMessage(\"日志\"),\n    \"logsDesc\": MessageLookupByLibrary.simpleMessage(\"日志捕获记录\"),\n    \"logsTest\": MessageLookupByLibrary.simpleMessage(\"日志测试\"),\n    \"loopback\": MessageLookupByLibrary.simpleMessage(\"回环解锁工具\"),\n    \"loopbackDesc\": MessageLookupByLibrary.simpleMessage(\"用于UWP回环解锁\"),\n    \"loose\": MessageLookupByLibrary.simpleMessage(\"宽松\"),\n    \"memoryInfo\": MessageLookupByLibrary.simpleMessage(\"内存信息\"),\n    \"messageTest\": MessageLookupByLibrary.simpleMessage(\"消息测试\"),\n    \"messageTestTip\": MessageLookupByLibrary.simpleMessage(\"这是一条消息。\"),\n    \"min\": MessageLookupByLibrary.simpleMessage(\"最小\"),\n    \"minimizeOnExit\": MessageLookupByLibrary.simpleMessage(\"退出时最小化\"),\n    \"minimizeOnExitDesc\": MessageLookupByLibrary.simpleMessage(\"修改系统默认退出事件\"),\n    \"minutes\": MessageLookupByLibrary.simpleMessage(\"分钟\"),\n    \"minutesAgo\": m7,\n    \"mixedPort\": MessageLookupByLibrary.simpleMessage(\"混合端口\"),\n    \"mode\": MessageLookupByLibrary.simpleMessage(\"模式\"),\n    \"monochromeScheme\": MessageLookupByLibrary.simpleMessage(\"单色\"),\n    \"months\": MessageLookupByLibrary.simpleMessage(\"月\"),\n    \"monthsAgo\": m8,\n    \"more\": MessageLookupByLibrary.simpleMessage(\"更多\"),\n    \"name\": MessageLookupByLibrary.simpleMessage(\"名称\"),\n    \"nameSort\": MessageLookupByLibrary.simpleMessage(\"按名称排序\"),\n    \"nameserver\": MessageLookupByLibrary.simpleMessage(\"域名服务器\"),\n    \"nameserverDesc\": MessageLookupByLibrary.simpleMessage(\"用于解析域名\"),\n    \"nameserverPolicy\": MessageLookupByLibrary.simpleMessage(\"域名服务器策略\"),\n    \"nameserverPolicyDesc\": MessageLookupByLibrary.simpleMessage(\"指定对应域名服务器策略\"),\n    \"network\": MessageLookupByLibrary.simpleMessage(\"网络\"),\n    \"networkDesc\": MessageLookupByLibrary.simpleMessage(\"修改网络相关设置\"),\n    \"networkDetection\": MessageLookupByLibrary.simpleMessage(\"网络检测\"),\n    \"networkException\": MessageLookupByLibrary.simpleMessage(\"网络异常，请检查连接后重试\"),\n    \"networkRequestException\": MessageLookupByLibrary.simpleMessage(\n      \"网络请求异常，请稍后再试。\",\n    ),\n    \"networkSpeed\": MessageLookupByLibrary.simpleMessage(\"网络速度\"),\n    \"networkType\": MessageLookupByLibrary.simpleMessage(\"网络类型\"),\n    \"neutralScheme\": MessageLookupByLibrary.simpleMessage(\"中性\"),\n    \"noData\": MessageLookupByLibrary.simpleMessage(\"暂无数据\"),\n    \"noHotKey\": MessageLookupByLibrary.simpleMessage(\"暂无快捷键\"),\n    \"noIcon\": MessageLookupByLibrary.simpleMessage(\"无图标\"),\n    \"noInfo\": MessageLookupByLibrary.simpleMessage(\"暂无信息\"),\n    \"noLongerRemind\": MessageLookupByLibrary.simpleMessage(\"不再提示\"),\n    \"noMoreInfoDesc\": MessageLookupByLibrary.simpleMessage(\"暂无更多信息\"),\n    \"noNetwork\": MessageLookupByLibrary.simpleMessage(\"无网络\"),\n    \"noNetworkApp\": MessageLookupByLibrary.simpleMessage(\"无网络应用\"),\n    \"noProxy\": MessageLookupByLibrary.simpleMessage(\"暂无代理\"),\n    \"noProxyDesc\": MessageLookupByLibrary.simpleMessage(\"请创建配置文件或者添加有效配置文件\"),\n    \"noResolve\": MessageLookupByLibrary.simpleMessage(\"不解析IP\"),\n    \"none\": MessageLookupByLibrary.simpleMessage(\"无\"),\n    \"notSelectedTip\": MessageLookupByLibrary.simpleMessage(\"当前代理组无法选中\"),\n    \"nullProfileDesc\": MessageLookupByLibrary.simpleMessage(\"没有配置文件,请先添加配置文件\"),\n    \"nullTip\": m9,\n    \"numberTip\": m10,\n    \"oneColumn\": MessageLookupByLibrary.simpleMessage(\"一列\"),\n    \"onlyIcon\": MessageLookupByLibrary.simpleMessage(\"仅图标\"),\n    \"onlyOtherApps\": MessageLookupByLibrary.simpleMessage(\"仅第三方应用\"),\n    \"onlyStatisticsProxy\": MessageLookupByLibrary.simpleMessage(\"仅统计代理\"),\n    \"onlyStatisticsProxyDesc\": MessageLookupByLibrary.simpleMessage(\n      \"开启后，将只统计代理流量\",\n    ),\n    \"options\": MessageLookupByLibrary.simpleMessage(\"选项\"),\n    \"other\": MessageLookupByLibrary.simpleMessage(\"其他\"),\n    \"otherContributors\": MessageLookupByLibrary.simpleMessage(\"其他贡献者\"),\n    \"outboundMode\": MessageLookupByLibrary.simpleMessage(\"出站模式\"),\n    \"override\": MessageLookupByLibrary.simpleMessage(\"覆写\"),\n    \"overrideDesc\": MessageLookupByLibrary.simpleMessage(\"覆写代理相关配置\"),\n    \"overrideDns\": MessageLookupByLibrary.simpleMessage(\"覆写DNS\"),\n    \"overrideDnsDesc\": MessageLookupByLibrary.simpleMessage(\"开启后将覆盖配置中的DNS选项\"),\n    \"overrideInvalidTip\": MessageLookupByLibrary.simpleMessage(\"在脚本模式下不生效\"),\n    \"overrideMode\": MessageLookupByLibrary.simpleMessage(\"覆写模式\"),\n    \"overrideOriginRules\": MessageLookupByLibrary.simpleMessage(\"覆盖原始规则\"),\n    \"overrideScript\": MessageLookupByLibrary.simpleMessage(\"覆写脚本\"),\n    \"overwriteTypeCustom\": MessageLookupByLibrary.simpleMessage(\"自定义\"),\n    \"overwriteTypeCustomDesc\": MessageLookupByLibrary.simpleMessage(\n      \"自定义模式，支持完全自定义修改代理组以及规则\",\n    ),\n    \"palette\": MessageLookupByLibrary.simpleMessage(\"调色板\"),\n    \"password\": MessageLookupByLibrary.simpleMessage(\"密码\"),\n    \"paste\": MessageLookupByLibrary.simpleMessage(\"粘贴\"),\n    \"pleaseBindWebDAV\": MessageLookupByLibrary.simpleMessage(\"请绑定WebDAV\"),\n    \"pleaseEnterScriptName\": MessageLookupByLibrary.simpleMessage(\"请输入脚本名称\"),\n    \"pleaseInputAdminPassword\": MessageLookupByLibrary.simpleMessage(\n      \"请输入管理员密码\",\n    ),\n    \"pleaseUploadFile\": MessageLookupByLibrary.simpleMessage(\"请上传文件\"),\n    \"pleaseUploadValidQrcode\": MessageLookupByLibrary.simpleMessage(\n      \"请上传有效的二维码\",\n    ),\n    \"port\": MessageLookupByLibrary.simpleMessage(\"端口\"),\n    \"portConflictTip\": MessageLookupByLibrary.simpleMessage(\"请输入不同的端口\"),\n    \"portTip\": m11,\n    \"preferH3Desc\": MessageLookupByLibrary.simpleMessage(\"优先使用DOH的http/3\"),\n    \"pressKeyboard\": MessageLookupByLibrary.simpleMessage(\"请按下按键\"),\n    \"preview\": MessageLookupByLibrary.simpleMessage(\"预览\"),\n    \"process\": MessageLookupByLibrary.simpleMessage(\"进程\"),\n    \"profile\": MessageLookupByLibrary.simpleMessage(\"配置\"),\n    \"profileAutoUpdateIntervalInvalidValidationDesc\":\n        MessageLookupByLibrary.simpleMessage(\"请输入有效间隔时间格式\"),\n    \"profileAutoUpdateIntervalNullValidationDesc\":\n        MessageLookupByLibrary.simpleMessage(\"请输入自动更新间隔时间\"),\n    \"profileHasUpdate\": MessageLookupByLibrary.simpleMessage(\n      \"配置文件已经修改,是否关闭自动更新 \",\n    ),\n    \"profileNameNullValidationDesc\": MessageLookupByLibrary.simpleMessage(\n      \"请输入配置名称\",\n    ),\n    \"profileParseErrorDesc\": MessageLookupByLibrary.simpleMessage(\"配置文件解析错误\"),\n    \"profileUrlInvalidValidationDesc\": MessageLookupByLibrary.simpleMessage(\n      \"请输入有效配置URL\",\n    ),\n    \"profileUrlNullValidationDesc\": MessageLookupByLibrary.simpleMessage(\n      \"请输入配置URL\",\n    ),\n    \"profiles\": MessageLookupByLibrary.simpleMessage(\"配置\"),\n    \"profilesSort\": MessageLookupByLibrary.simpleMessage(\"配置排序\"),\n    \"project\": MessageLookupByLibrary.simpleMessage(\"项目\"),\n    \"providers\": MessageLookupByLibrary.simpleMessage(\"提供者\"),\n    \"proxies\": MessageLookupByLibrary.simpleMessage(\"代理\"),\n    \"proxiesSetting\": MessageLookupByLibrary.simpleMessage(\"代理设置\"),\n    \"proxyChains\": MessageLookupByLibrary.simpleMessage(\"代理链\"),\n    \"proxyGroup\": MessageLookupByLibrary.simpleMessage(\"代理组\"),\n    \"proxyNameserver\": MessageLookupByLibrary.simpleMessage(\"代理域名服务器\"),\n    \"proxyNameserverDesc\": MessageLookupByLibrary.simpleMessage(\"用于解析代理节点的域名\"),\n    \"proxyPort\": MessageLookupByLibrary.simpleMessage(\"代理端口\"),\n    \"proxyPortDesc\": MessageLookupByLibrary.simpleMessage(\"设置Clash监听端口\"),\n    \"proxyProviders\": MessageLookupByLibrary.simpleMessage(\"代理提供者\"),\n    \"pruneCache\": MessageLookupByLibrary.simpleMessage(\"修剪缓存\"),\n    \"pureBlackMode\": MessageLookupByLibrary.simpleMessage(\"纯黑模式\"),\n    \"qrcode\": MessageLookupByLibrary.simpleMessage(\"二维码\"),\n    \"qrcodeDesc\": MessageLookupByLibrary.simpleMessage(\"扫描二维码获取配置文件\"),\n    \"rainbowScheme\": MessageLookupByLibrary.simpleMessage(\"彩虹\"),\n    \"redirPort\": MessageLookupByLibrary.simpleMessage(\"Redir端口\"),\n    \"redo\": MessageLookupByLibrary.simpleMessage(\"重做\"),\n    \"regExp\": MessageLookupByLibrary.simpleMessage(\"正则\"),\n    \"reload\": MessageLookupByLibrary.simpleMessage(\"重载\"),\n    \"remote\": MessageLookupByLibrary.simpleMessage(\"远程\"),\n    \"remoteBackupDesc\": MessageLookupByLibrary.simpleMessage(\"备份数据到WebDAV\"),\n    \"remoteDestination\": MessageLookupByLibrary.simpleMessage(\"远程目标\"),\n    \"remove\": MessageLookupByLibrary.simpleMessage(\"移除\"),\n    \"rename\": MessageLookupByLibrary.simpleMessage(\"重命名\"),\n    \"request\": MessageLookupByLibrary.simpleMessage(\"请求\"),\n    \"requests\": MessageLookupByLibrary.simpleMessage(\"请求\"),\n    \"requestsDesc\": MessageLookupByLibrary.simpleMessage(\"查看最近请求记录\"),\n    \"reset\": MessageLookupByLibrary.simpleMessage(\"重置\"),\n    \"resetPageChangesTip\": MessageLookupByLibrary.simpleMessage(\n      \"当前页面存在更改，确定重置吗？\",\n    ),\n    \"resetTip\": MessageLookupByLibrary.simpleMessage(\"确定要重置吗?\"),\n    \"resources\": MessageLookupByLibrary.simpleMessage(\"资源\"),\n    \"resourcesDesc\": MessageLookupByLibrary.simpleMessage(\"外部资源相关信息\"),\n    \"respectRules\": MessageLookupByLibrary.simpleMessage(\"遵守规则\"),\n    \"respectRulesDesc\": MessageLookupByLibrary.simpleMessage(\n      \"DNS连接跟随rules,需配置proxy-server-nameserver\",\n    ),\n    \"restart\": MessageLookupByLibrary.simpleMessage(\"重启\"),\n    \"restartCoreTip\": MessageLookupByLibrary.simpleMessage(\"您确定要重启核心吗？\"),\n    \"restore\": MessageLookupByLibrary.simpleMessage(\"恢复\"),\n    \"restoreAllData\": MessageLookupByLibrary.simpleMessage(\"恢复所有数据\"),\n    \"restoreException\": MessageLookupByLibrary.simpleMessage(\"恢复异常\"),\n    \"restoreFromFileDesc\": MessageLookupByLibrary.simpleMessage(\"通过文件恢复数据\"),\n    \"restoreFromWebDAVDesc\": MessageLookupByLibrary.simpleMessage(\n      \"通过WebDAV恢复数据\",\n    ),\n    \"restoreOnlyConfig\": MessageLookupByLibrary.simpleMessage(\"仅恢复配置文件\"),\n    \"restoreStrategy\": MessageLookupByLibrary.simpleMessage(\"恢复策略\"),\n    \"restoreStrategy_compatible\": MessageLookupByLibrary.simpleMessage(\"兼容\"),\n    \"restoreStrategy_override\": MessageLookupByLibrary.simpleMessage(\"覆盖\"),\n    \"restoreSuccess\": MessageLookupByLibrary.simpleMessage(\"恢复成功\"),\n    \"routeAddress\": MessageLookupByLibrary.simpleMessage(\"路由地址\"),\n    \"routeAddressDesc\": MessageLookupByLibrary.simpleMessage(\"配置监听路由地址\"),\n    \"routeMode\": MessageLookupByLibrary.simpleMessage(\"路由模式\"),\n    \"routeMode_bypassPrivate\": MessageLookupByLibrary.simpleMessage(\"绕过私有路由地址\"),\n    \"routeMode_config\": MessageLookupByLibrary.simpleMessage(\"使用配置\"),\n    \"ru\": MessageLookupByLibrary.simpleMessage(\"俄语\"),\n    \"rule\": MessageLookupByLibrary.simpleMessage(\"规则\"),\n    \"ruleName\": MessageLookupByLibrary.simpleMessage(\"规则名称\"),\n    \"ruleProviders\": MessageLookupByLibrary.simpleMessage(\"规则提供者\"),\n    \"ruleTarget\": MessageLookupByLibrary.simpleMessage(\"规则目标\"),\n    \"save\": MessageLookupByLibrary.simpleMessage(\"保存\"),\n    \"saveChanges\": MessageLookupByLibrary.simpleMessage(\"是否保存更改？\"),\n    \"saveTip\": MessageLookupByLibrary.simpleMessage(\"确定要保存吗？\"),\n    \"script\": MessageLookupByLibrary.simpleMessage(\"脚本\"),\n    \"scriptModeDesc\": MessageLookupByLibrary.simpleMessage(\n      \"脚本模式，使用外部扩展脚本，提供一键覆写配置的能力\",\n    ),\n    \"search\": MessageLookupByLibrary.simpleMessage(\"搜索\"),\n    \"seconds\": MessageLookupByLibrary.simpleMessage(\"秒\"),\n    \"selectAll\": MessageLookupByLibrary.simpleMessage(\"全选\"),\n    \"selected\": MessageLookupByLibrary.simpleMessage(\"已选择\"),\n    \"selectedCountTitle\": m12,\n    \"settings\": MessageLookupByLibrary.simpleMessage(\"设置\"),\n    \"show\": MessageLookupByLibrary.simpleMessage(\"显示\"),\n    \"shrink\": MessageLookupByLibrary.simpleMessage(\"紧凑\"),\n    \"silentLaunch\": MessageLookupByLibrary.simpleMessage(\"静默启动\"),\n    \"silentLaunchDesc\": MessageLookupByLibrary.simpleMessage(\"后台启动\"),\n    \"size\": MessageLookupByLibrary.simpleMessage(\"尺寸\"),\n    \"socksPort\": MessageLookupByLibrary.simpleMessage(\"Socks端口\"),\n    \"sort\": MessageLookupByLibrary.simpleMessage(\"排序\"),\n    \"source\": MessageLookupByLibrary.simpleMessage(\"来源\"),\n    \"sourceIp\": MessageLookupByLibrary.simpleMessage(\"源IP\"),\n    \"specialProxy\": MessageLookupByLibrary.simpleMessage(\"特殊代理\"),\n    \"specialRules\": MessageLookupByLibrary.simpleMessage(\"特殊规则\"),\n    \"speedStatistics\": MessageLookupByLibrary.simpleMessage(\"网速统计\"),\n    \"stackMode\": MessageLookupByLibrary.simpleMessage(\"栈模式\"),\n    \"standard\": MessageLookupByLibrary.simpleMessage(\"标准\"),\n    \"standardModeDesc\": MessageLookupByLibrary.simpleMessage(\n      \"标准模式，覆写基本配置，提供简单追加规则能力\",\n    ),\n    \"start\": MessageLookupByLibrary.simpleMessage(\"启动\"),\n    \"startVpn\": MessageLookupByLibrary.simpleMessage(\"正在启动VPN...\"),\n    \"status\": MessageLookupByLibrary.simpleMessage(\"状态\"),\n    \"statusDesc\": MessageLookupByLibrary.simpleMessage(\"关闭后将使用系统DNS\"),\n    \"stop\": MessageLookupByLibrary.simpleMessage(\"暂停\"),\n    \"stopVpn\": MessageLookupByLibrary.simpleMessage(\"正在停止VPN...\"),\n    \"style\": MessageLookupByLibrary.simpleMessage(\"风格\"),\n    \"subRule\": MessageLookupByLibrary.simpleMessage(\"子规则\"),\n    \"submit\": MessageLookupByLibrary.simpleMessage(\"提交\"),\n    \"sync\": MessageLookupByLibrary.simpleMessage(\"同步\"),\n    \"system\": MessageLookupByLibrary.simpleMessage(\"系统\"),\n    \"systemApp\": MessageLookupByLibrary.simpleMessage(\"系统应用\"),\n    \"systemFont\": MessageLookupByLibrary.simpleMessage(\"系统字体\"),\n    \"systemProxy\": MessageLookupByLibrary.simpleMessage(\"系统代理\"),\n    \"systemProxyDesc\": MessageLookupByLibrary.simpleMessage(\"设置系统代理\"),\n    \"tab\": MessageLookupByLibrary.simpleMessage(\"标签页\"),\n    \"tabAnimation\": MessageLookupByLibrary.simpleMessage(\"选项卡动画\"),\n    \"tabAnimationDesc\": MessageLookupByLibrary.simpleMessage(\"仅在移动视图中有效\"),\n    \"tcpConcurrent\": MessageLookupByLibrary.simpleMessage(\"TCP并发\"),\n    \"tcpConcurrentDesc\": MessageLookupByLibrary.simpleMessage(\"开启后允许TCP并发\"),\n    \"testUrl\": MessageLookupByLibrary.simpleMessage(\"测速链接\"),\n    \"textScale\": MessageLookupByLibrary.simpleMessage(\"文本缩放\"),\n    \"theme\": MessageLookupByLibrary.simpleMessage(\"主题\"),\n    \"themeColor\": MessageLookupByLibrary.simpleMessage(\"主题色彩\"),\n    \"themeDesc\": MessageLookupByLibrary.simpleMessage(\"设置深色模式，调整色彩\"),\n    \"themeMode\": MessageLookupByLibrary.simpleMessage(\"主题模式\"),\n    \"threeColumns\": MessageLookupByLibrary.simpleMessage(\"三列\"),\n    \"tight\": MessageLookupByLibrary.simpleMessage(\"紧凑\"),\n    \"time\": MessageLookupByLibrary.simpleMessage(\"时间\"),\n    \"tip\": MessageLookupByLibrary.simpleMessage(\"提示\"),\n    \"toggle\": MessageLookupByLibrary.simpleMessage(\"切换\"),\n    \"tonalSpotScheme\": MessageLookupByLibrary.simpleMessage(\"调性点缀\"),\n    \"tools\": MessageLookupByLibrary.simpleMessage(\"工具\"),\n    \"tproxyPort\": MessageLookupByLibrary.simpleMessage(\"Tproxy端口\"),\n    \"trafficUsage\": MessageLookupByLibrary.simpleMessage(\"流量统计\"),\n    \"tun\": MessageLookupByLibrary.simpleMessage(\"虚拟网卡\"),\n    \"tunDesc\": MessageLookupByLibrary.simpleMessage(\"仅在管理员模式生效\"),\n    \"turnOff\": MessageLookupByLibrary.simpleMessage(\"关闭\"),\n    \"turnOn\": MessageLookupByLibrary.simpleMessage(\"开启\"),\n    \"twoColumns\": MessageLookupByLibrary.simpleMessage(\"两列\"),\n    \"unableToUpdateCurrentProfileDesc\": MessageLookupByLibrary.simpleMessage(\n      \"无法更新当前配置文件\",\n    ),\n    \"undo\": MessageLookupByLibrary.simpleMessage(\"撤销\"),\n    \"unifiedDelay\": MessageLookupByLibrary.simpleMessage(\"统一延迟\"),\n    \"unifiedDelayDesc\": MessageLookupByLibrary.simpleMessage(\"去除握手等额外延迟\"),\n    \"unknown\": MessageLookupByLibrary.simpleMessage(\"未知\"),\n    \"unknownNetworkError\": MessageLookupByLibrary.simpleMessage(\"未知网络错误\"),\n    \"unnamed\": MessageLookupByLibrary.simpleMessage(\"未命名\"),\n    \"update\": MessageLookupByLibrary.simpleMessage(\"更新\"),\n    \"upload\": MessageLookupByLibrary.simpleMessage(\"上传\"),\n    \"url\": MessageLookupByLibrary.simpleMessage(\"URL\"),\n    \"urlDesc\": MessageLookupByLibrary.simpleMessage(\"通过URL获取配置文件\"),\n    \"urlTip\": m13,\n    \"useHosts\": MessageLookupByLibrary.simpleMessage(\"使用Hosts\"),\n    \"useSystemHosts\": MessageLookupByLibrary.simpleMessage(\"使用系统Hosts\"),\n    \"value\": MessageLookupByLibrary.simpleMessage(\"值\"),\n    \"vibrantScheme\": MessageLookupByLibrary.simpleMessage(\"活力\"),\n    \"view\": MessageLookupByLibrary.simpleMessage(\"查看\"),\n    \"vpnConfigChangeDetected\": MessageLookupByLibrary.simpleMessage(\n      \"检测到VPN相关配置改动\",\n    ),\n    \"vpnDesc\": MessageLookupByLibrary.simpleMessage(\"修改VPN相关设置\"),\n    \"vpnEnableDesc\": MessageLookupByLibrary.simpleMessage(\n      \"通过VpnService自动路由系统所有流量\",\n    ),\n    \"vpnSystemProxyDesc\": MessageLookupByLibrary.simpleMessage(\n      \"为VpnService附加HTTP代理\",\n    ),\n    \"vpnTip\": MessageLookupByLibrary.simpleMessage(\"重启VPN后改变生效\"),\n    \"webDAVConfiguration\": MessageLookupByLibrary.simpleMessage(\"WebDAV配置\"),\n    \"whitelistMode\": MessageLookupByLibrary.simpleMessage(\"白名单模式\"),\n    \"years\": MessageLookupByLibrary.simpleMessage(\"年\"),\n    \"yearsAgo\": m14,\n    \"zh_CN\": MessageLookupByLibrary.simpleMessage(\"中文简体\"),\n  };\n}\n"
  },
  {
    "path": "lib/l10n/l10n.dart",
    "content": "// GENERATED CODE - DO NOT MODIFY BY HAND\nimport 'package:flutter/material.dart';\nimport 'package:intl/intl.dart';\nimport 'intl/messages_all.dart';\n\n// **************************************************************************\n// Generator: Flutter Intl IDE plugin\n// Made by Localizely\n// **************************************************************************\n\n// ignore_for_file: non_constant_identifier_names, lines_longer_than_80_chars\n// ignore_for_file: join_return_with_assignment, prefer_final_in_for_each\n// ignore_for_file: avoid_redundant_argument_values, avoid_escaping_inner_quotes\n\nclass AppLocalizations {\n  AppLocalizations();\n\n  static AppLocalizations? _current;\n\n  static AppLocalizations get current {\n    assert(\n      _current != null,\n      'No instance of AppLocalizations was loaded. Try to initialize the AppLocalizations delegate before accessing AppLocalizations.current.',\n    );\n    return _current!;\n  }\n\n  static const AppLocalizationDelegate delegate = AppLocalizationDelegate();\n\n  static Future<AppLocalizations> load(Locale locale) {\n    final name = (locale.countryCode?.isEmpty ?? false)\n        ? locale.languageCode\n        : locale.toString();\n    final localeName = Intl.canonicalizedLocale(name);\n    return initializeMessages(localeName).then((_) {\n      Intl.defaultLocale = localeName;\n      final instance = AppLocalizations();\n      AppLocalizations._current = instance;\n\n      return instance;\n    });\n  }\n\n  static AppLocalizations of(BuildContext context) {\n    final instance = AppLocalizations.maybeOf(context);\n    assert(\n      instance != null,\n      'No instance of AppLocalizations present in the widget tree. Did you add AppLocalizations.delegate in localizationsDelegates?',\n    );\n    return instance!;\n  }\n\n  static AppLocalizations? maybeOf(BuildContext context) {\n    return Localizations.of<AppLocalizations>(context, AppLocalizations);\n  }\n\n  /// `Rule`\n  String get rule {\n    return Intl.message('Rule', name: 'rule', desc: '', args: []);\n  }\n\n  /// `Global`\n  String get global {\n    return Intl.message('Global', name: 'global', desc: '', args: []);\n  }\n\n  /// `Direct`\n  String get direct {\n    return Intl.message('Direct', name: 'direct', desc: '', args: []);\n  }\n\n  /// `Dashboard`\n  String get dashboard {\n    return Intl.message('Dashboard', name: 'dashboard', desc: '', args: []);\n  }\n\n  /// `Proxies`\n  String get proxies {\n    return Intl.message('Proxies', name: 'proxies', desc: '', args: []);\n  }\n\n  /// `Profile`\n  String get profile {\n    return Intl.message('Profile', name: 'profile', desc: '', args: []);\n  }\n\n  /// `Profiles`\n  String get profiles {\n    return Intl.message('Profiles', name: 'profiles', desc: '', args: []);\n  }\n\n  /// `Tools`\n  String get tools {\n    return Intl.message('Tools', name: 'tools', desc: '', args: []);\n  }\n\n  /// `Logs`\n  String get logs {\n    return Intl.message('Logs', name: 'logs', desc: '', args: []);\n  }\n\n  /// `Log capture records`\n  String get logsDesc {\n    return Intl.message(\n      'Log capture records',\n      name: 'logsDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Resources`\n  String get resources {\n    return Intl.message('Resources', name: 'resources', desc: '', args: []);\n  }\n\n  /// `External resource related info`\n  String get resourcesDesc {\n    return Intl.message(\n      'External resource related info',\n      name: 'resourcesDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Traffic usage`\n  String get trafficUsage {\n    return Intl.message(\n      'Traffic usage',\n      name: 'trafficUsage',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Core info`\n  String get coreInfo {\n    return Intl.message('Core info', name: 'coreInfo', desc: '', args: []);\n  }\n\n  /// `Network speed`\n  String get networkSpeed {\n    return Intl.message(\n      'Network speed',\n      name: 'networkSpeed',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Outbound mode`\n  String get outboundMode {\n    return Intl.message(\n      'Outbound mode',\n      name: 'outboundMode',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Network detection`\n  String get networkDetection {\n    return Intl.message(\n      'Network detection',\n      name: 'networkDetection',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Upload`\n  String get upload {\n    return Intl.message('Upload', name: 'upload', desc: '', args: []);\n  }\n\n  /// `Download`\n  String get download {\n    return Intl.message('Download', name: 'download', desc: '', args: []);\n  }\n\n  /// `No proxy`\n  String get noProxy {\n    return Intl.message('No proxy', name: 'noProxy', desc: '', args: []);\n  }\n\n  /// `Please create a profile or add a valid profile`\n  String get noProxyDesc {\n    return Intl.message(\n      'Please create a profile or add a valid profile',\n      name: 'noProxyDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `No profile, Please add a profile`\n  String get nullProfileDesc {\n    return Intl.message(\n      'No profile, Please add a profile',\n      name: 'nullProfileDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Settings`\n  String get settings {\n    return Intl.message('Settings', name: 'settings', desc: '', args: []);\n  }\n\n  /// `Language`\n  String get language {\n    return Intl.message('Language', name: 'language', desc: '', args: []);\n  }\n\n  /// `Default`\n  String get defaultText {\n    return Intl.message('Default', name: 'defaultText', desc: '', args: []);\n  }\n\n  /// `More`\n  String get more {\n    return Intl.message('More', name: 'more', desc: '', args: []);\n  }\n\n  /// `Other`\n  String get other {\n    return Intl.message('Other', name: 'other', desc: '', args: []);\n  }\n\n  /// `About`\n  String get about {\n    return Intl.message('About', name: 'about', desc: '', args: []);\n  }\n\n  /// `English`\n  String get en {\n    return Intl.message('English', name: 'en', desc: '', args: []);\n  }\n\n  /// `Japanese`\n  String get ja {\n    return Intl.message('Japanese', name: 'ja', desc: '', args: []);\n  }\n\n  /// `Russian`\n  String get ru {\n    return Intl.message('Russian', name: 'ru', desc: '', args: []);\n  }\n\n  /// `Simplified Chinese`\n  String get zh_CN {\n    return Intl.message(\n      'Simplified Chinese',\n      name: 'zh_CN',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Theme`\n  String get theme {\n    return Intl.message('Theme', name: 'theme', desc: '', args: []);\n  }\n\n  /// `Set dark mode,adjust the color`\n  String get themeDesc {\n    return Intl.message(\n      'Set dark mode,adjust the color',\n      name: 'themeDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Override`\n  String get override {\n    return Intl.message('Override', name: 'override', desc: '', args: []);\n  }\n\n  /// `Override Proxy related config`\n  String get overrideDesc {\n    return Intl.message(\n      'Override Proxy related config',\n      name: 'overrideDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `AllowLan`\n  String get allowLan {\n    return Intl.message('AllowLan', name: 'allowLan', desc: '', args: []);\n  }\n\n  /// `Allow access proxy through the LAN`\n  String get allowLanDesc {\n    return Intl.message(\n      'Allow access proxy through the LAN',\n      name: 'allowLanDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `TUN`\n  String get tun {\n    return Intl.message('TUN', name: 'tun', desc: '', args: []);\n  }\n\n  /// `only effective in administrator mode`\n  String get tunDesc {\n    return Intl.message(\n      'only effective in administrator mode',\n      name: 'tunDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Minimize on exit`\n  String get minimizeOnExit {\n    return Intl.message(\n      'Minimize on exit',\n      name: 'minimizeOnExit',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Modify the default system exit event`\n  String get minimizeOnExitDesc {\n    return Intl.message(\n      'Modify the default system exit event',\n      name: 'minimizeOnExitDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Auto launch`\n  String get autoLaunch {\n    return Intl.message('Auto launch', name: 'autoLaunch', desc: '', args: []);\n  }\n\n  /// `Follow the system self startup`\n  String get autoLaunchDesc {\n    return Intl.message(\n      'Follow the system self startup',\n      name: 'autoLaunchDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `SilentLaunch`\n  String get silentLaunch {\n    return Intl.message(\n      'SilentLaunch',\n      name: 'silentLaunch',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Start in the background`\n  String get silentLaunchDesc {\n    return Intl.message(\n      'Start in the background',\n      name: 'silentLaunchDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `AutoRun`\n  String get autoRun {\n    return Intl.message('AutoRun', name: 'autoRun', desc: '', args: []);\n  }\n\n  /// `Auto run when the application is opened`\n  String get autoRunDesc {\n    return Intl.message(\n      'Auto run when the application is opened',\n      name: 'autoRunDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Logcat`\n  String get logcat {\n    return Intl.message('Logcat', name: 'logcat', desc: '', args: []);\n  }\n\n  /// `Disabling will hide the log entry`\n  String get logcatDesc {\n    return Intl.message(\n      'Disabling will hide the log entry',\n      name: 'logcatDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Auto check updates`\n  String get autoCheckUpdate {\n    return Intl.message(\n      'Auto check updates',\n      name: 'autoCheckUpdate',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Auto check for updates when the app starts`\n  String get autoCheckUpdateDesc {\n    return Intl.message(\n      'Auto check for updates when the app starts',\n      name: 'autoCheckUpdateDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `AccessControl`\n  String get accessControl {\n    return Intl.message(\n      'AccessControl',\n      name: 'accessControl',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Configure application access proxy`\n  String get accessControlDesc {\n    return Intl.message(\n      'Configure application access proxy',\n      name: 'accessControlDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Application`\n  String get application {\n    return Intl.message('Application', name: 'application', desc: '', args: []);\n  }\n\n  /// `Modify application related settings`\n  String get applicationDesc {\n    return Intl.message(\n      'Modify application related settings',\n      name: 'applicationDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Edit`\n  String get edit {\n    return Intl.message('Edit', name: 'edit', desc: '', args: []);\n  }\n\n  /// `Confirm`\n  String get confirm {\n    return Intl.message('Confirm', name: 'confirm', desc: '', args: []);\n  }\n\n  /// `Update`\n  String get update {\n    return Intl.message('Update', name: 'update', desc: '', args: []);\n  }\n\n  /// `Add`\n  String get add {\n    return Intl.message('Add', name: 'add', desc: '', args: []);\n  }\n\n  /// `Save`\n  String get save {\n    return Intl.message('Save', name: 'save', desc: '', args: []);\n  }\n\n  /// `Delete`\n  String get delete {\n    return Intl.message('Delete', name: 'delete', desc: '', args: []);\n  }\n\n  /// `Years`\n  String get years {\n    return Intl.message('Years', name: 'years', desc: '', args: []);\n  }\n\n  /// `Months`\n  String get months {\n    return Intl.message('Months', name: 'months', desc: '', args: []);\n  }\n\n  /// `Hours`\n  String get hours {\n    return Intl.message('Hours', name: 'hours', desc: '', args: []);\n  }\n\n  /// `Days`\n  String get days {\n    return Intl.message('Days', name: 'days', desc: '', args: []);\n  }\n\n  /// `Minutes`\n  String get minutes {\n    return Intl.message('Minutes', name: 'minutes', desc: '', args: []);\n  }\n\n  /// `Seconds`\n  String get seconds {\n    return Intl.message('Seconds', name: 'seconds', desc: '', args: []);\n  }\n\n  /// ` Ago`\n  String get ago {\n    return Intl.message(' Ago', name: 'ago', desc: '', args: []);\n  }\n\n  /// `Just`\n  String get just {\n    return Intl.message('Just', name: 'just', desc: '', args: []);\n  }\n\n  /// `QR code`\n  String get qrcode {\n    return Intl.message('QR code', name: 'qrcode', desc: '', args: []);\n  }\n\n  /// `Scan QR code to obtain profile`\n  String get qrcodeDesc {\n    return Intl.message(\n      'Scan QR code to obtain profile',\n      name: 'qrcodeDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `URL`\n  String get url {\n    return Intl.message('URL', name: 'url', desc: '', args: []);\n  }\n\n  /// `Obtain profile through URL`\n  String get urlDesc {\n    return Intl.message(\n      'Obtain profile through URL',\n      name: 'urlDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `File`\n  String get file {\n    return Intl.message('File', name: 'file', desc: '', args: []);\n  }\n\n  /// `Directly upload profile`\n  String get fileDesc {\n    return Intl.message(\n      'Directly upload profile',\n      name: 'fileDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Name`\n  String get name {\n    return Intl.message('Name', name: 'name', desc: '', args: []);\n  }\n\n  /// `Please input the profile name`\n  String get profileNameNullValidationDesc {\n    return Intl.message(\n      'Please input the profile name',\n      name: 'profileNameNullValidationDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Please input the profile URL`\n  String get profileUrlNullValidationDesc {\n    return Intl.message(\n      'Please input the profile URL',\n      name: 'profileUrlNullValidationDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Please input a valid profile URL`\n  String get profileUrlInvalidValidationDesc {\n    return Intl.message(\n      'Please input a valid profile URL',\n      name: 'profileUrlInvalidValidationDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Auto update`\n  String get autoUpdate {\n    return Intl.message('Auto update', name: 'autoUpdate', desc: '', args: []);\n  }\n\n  /// `Auto update interval (minutes)`\n  String get autoUpdateInterval {\n    return Intl.message(\n      'Auto update interval (minutes)',\n      name: 'autoUpdateInterval',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Please enter the auto update interval time`\n  String get profileAutoUpdateIntervalNullValidationDesc {\n    return Intl.message(\n      'Please enter the auto update interval time',\n      name: 'profileAutoUpdateIntervalNullValidationDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Please input a valid interval time format`\n  String get profileAutoUpdateIntervalInvalidValidationDesc {\n    return Intl.message(\n      'Please input a valid interval time format',\n      name: 'profileAutoUpdateIntervalInvalidValidationDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Theme mode`\n  String get themeMode {\n    return Intl.message('Theme mode', name: 'themeMode', desc: '', args: []);\n  }\n\n  /// `Theme color`\n  String get themeColor {\n    return Intl.message('Theme color', name: 'themeColor', desc: '', args: []);\n  }\n\n  /// `Preview`\n  String get preview {\n    return Intl.message('Preview', name: 'preview', desc: '', args: []);\n  }\n\n  /// `Auto`\n  String get auto {\n    return Intl.message('Auto', name: 'auto', desc: '', args: []);\n  }\n\n  /// `Light`\n  String get light {\n    return Intl.message('Light', name: 'light', desc: '', args: []);\n  }\n\n  /// `Dark`\n  String get dark {\n    return Intl.message('Dark', name: 'dark', desc: '', args: []);\n  }\n\n  /// `Import from URL`\n  String get importFromURL {\n    return Intl.message(\n      'Import from URL',\n      name: 'importFromURL',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Submit`\n  String get submit {\n    return Intl.message('Submit', name: 'submit', desc: '', args: []);\n  }\n\n  /// `Do you want to pass`\n  String get doYouWantToPass {\n    return Intl.message(\n      'Do you want to pass',\n      name: 'doYouWantToPass',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Create`\n  String get create {\n    return Intl.message('Create', name: 'create', desc: '', args: []);\n  }\n\n  /// `Sort by default`\n  String get defaultSort {\n    return Intl.message(\n      'Sort by default',\n      name: 'defaultSort',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Sort by delay`\n  String get delaySort {\n    return Intl.message('Sort by delay', name: 'delaySort', desc: '', args: []);\n  }\n\n  /// `Sort by name`\n  String get nameSort {\n    return Intl.message('Sort by name', name: 'nameSort', desc: '', args: []);\n  }\n\n  /// `Please upload file`\n  String get pleaseUploadFile {\n    return Intl.message(\n      'Please upload file',\n      name: 'pleaseUploadFile',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Please upload a valid QR code`\n  String get pleaseUploadValidQrcode {\n    return Intl.message(\n      'Please upload a valid QR code',\n      name: 'pleaseUploadValidQrcode',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Blacklist mode`\n  String get blacklistMode {\n    return Intl.message(\n      'Blacklist mode',\n      name: 'blacklistMode',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Whitelist mode`\n  String get whitelistMode {\n    return Intl.message(\n      'Whitelist mode',\n      name: 'whitelistMode',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Filter system app`\n  String get filterSystemApp {\n    return Intl.message(\n      'Filter system app',\n      name: 'filterSystemApp',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Cancel filter system app`\n  String get cancelFilterSystemApp {\n    return Intl.message(\n      'Cancel filter system app',\n      name: 'cancelFilterSystemApp',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Select all`\n  String get selectAll {\n    return Intl.message('Select all', name: 'selectAll', desc: '', args: []);\n  }\n\n  /// `Cancel select all`\n  String get cancelSelectAll {\n    return Intl.message(\n      'Cancel select all',\n      name: 'cancelSelectAll',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `App access control`\n  String get appAccessControl {\n    return Intl.message(\n      'App access control',\n      name: 'appAccessControl',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Only allow selected app to enter VPN`\n  String get accessControlAllowDesc {\n    return Intl.message(\n      'Only allow selected app to enter VPN',\n      name: 'accessControlAllowDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `The selected application will be excluded from VPN`\n  String get accessControlNotAllowDesc {\n    return Intl.message(\n      'The selected application will be excluded from VPN',\n      name: 'accessControlNotAllowDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Selected`\n  String get selected {\n    return Intl.message('Selected', name: 'selected', desc: '', args: []);\n  }\n\n  /// `unable to update current profile`\n  String get unableToUpdateCurrentProfileDesc {\n    return Intl.message(\n      'unable to update current profile',\n      name: 'unableToUpdateCurrentProfileDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `No more info`\n  String get noMoreInfoDesc {\n    return Intl.message(\n      'No more info',\n      name: 'noMoreInfoDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `profile parse error`\n  String get profileParseErrorDesc {\n    return Intl.message(\n      'profile parse error',\n      name: 'profileParseErrorDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `ProxyPort`\n  String get proxyPort {\n    return Intl.message('ProxyPort', name: 'proxyPort', desc: '', args: []);\n  }\n\n  /// `Set the Clash listening port`\n  String get proxyPortDesc {\n    return Intl.message(\n      'Set the Clash listening port',\n      name: 'proxyPortDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Port`\n  String get port {\n    return Intl.message('Port', name: 'port', desc: '', args: []);\n  }\n\n  /// `LogLevel`\n  String get logLevel {\n    return Intl.message('LogLevel', name: 'logLevel', desc: '', args: []);\n  }\n\n  /// `Show`\n  String get show {\n    return Intl.message('Show', name: 'show', desc: '', args: []);\n  }\n\n  /// `Exit`\n  String get exit {\n    return Intl.message('Exit', name: 'exit', desc: '', args: []);\n  }\n\n  /// `System proxy`\n  String get systemProxy {\n    return Intl.message(\n      'System proxy',\n      name: 'systemProxy',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Project`\n  String get project {\n    return Intl.message('Project', name: 'project', desc: '', args: []);\n  }\n\n  /// `Core`\n  String get core {\n    return Intl.message('Core', name: 'core', desc: '', args: []);\n  }\n\n  /// `Tab animation`\n  String get tabAnimation {\n    return Intl.message(\n      'Tab animation',\n      name: 'tabAnimation',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `A multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free.`\n  String get desc {\n    return Intl.message(\n      'A multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free.',\n      name: 'desc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Starting VPN...`\n  String get startVpn {\n    return Intl.message(\n      'Starting VPN...',\n      name: 'startVpn',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Stopping VPN...`\n  String get stopVpn {\n    return Intl.message('Stopping VPN...', name: 'stopVpn', desc: '', args: []);\n  }\n\n  /// `Discovery a new version`\n  String get discovery {\n    return Intl.message(\n      'Discovery a new version',\n      name: 'discovery',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Compatibility mode`\n  String get compatible {\n    return Intl.message(\n      'Compatibility mode',\n      name: 'compatible',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Opening it will lose part of its application ability and gain the support of full amount of Clash.`\n  String get compatibleDesc {\n    return Intl.message(\n      'Opening it will lose part of its application ability and gain the support of full amount of Clash.',\n      name: 'compatibleDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `The current proxy group cannot be selected.`\n  String get notSelectedTip {\n    return Intl.message(\n      'The current proxy group cannot be selected.',\n      name: 'notSelectedTip',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `tip`\n  String get tip {\n    return Intl.message('tip', name: 'tip', desc: '', args: []);\n  }\n\n  /// `Account`\n  String get account {\n    return Intl.message('Account', name: 'account', desc: '', args: []);\n  }\n\n  /// `Backup`\n  String get backup {\n    return Intl.message('Backup', name: 'backup', desc: '', args: []);\n  }\n\n  /// `Backup success`\n  String get backupSuccess {\n    return Intl.message(\n      'Backup success',\n      name: 'backupSuccess',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `No info`\n  String get noInfo {\n    return Intl.message('No info', name: 'noInfo', desc: '', args: []);\n  }\n\n  /// `Please bind WebDAV`\n  String get pleaseBindWebDAV {\n    return Intl.message(\n      'Please bind WebDAV',\n      name: 'pleaseBindWebDAV',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Bind`\n  String get bind {\n    return Intl.message('Bind', name: 'bind', desc: '', args: []);\n  }\n\n  /// `Connectivity：`\n  String get connectivity {\n    return Intl.message(\n      'Connectivity：',\n      name: 'connectivity',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `WebDAV configuration`\n  String get webDAVConfiguration {\n    return Intl.message(\n      'WebDAV configuration',\n      name: 'webDAVConfiguration',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Address`\n  String get address {\n    return Intl.message('Address', name: 'address', desc: '', args: []);\n  }\n\n  /// `WebDAV server address`\n  String get addressHelp {\n    return Intl.message(\n      'WebDAV server address',\n      name: 'addressHelp',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Please enter a valid WebDAV address`\n  String get addressTip {\n    return Intl.message(\n      'Please enter a valid WebDAV address',\n      name: 'addressTip',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Password`\n  String get password {\n    return Intl.message('Password', name: 'password', desc: '', args: []);\n  }\n\n  /// `Check for updates`\n  String get checkUpdate {\n    return Intl.message(\n      'Check for updates',\n      name: 'checkUpdate',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Discover the new version`\n  String get discoverNewVersion {\n    return Intl.message(\n      'Discover the new version',\n      name: 'discoverNewVersion',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `The current application is already the latest version`\n  String get checkUpdateError {\n    return Intl.message(\n      'The current application is already the latest version',\n      name: 'checkUpdateError',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Go to download`\n  String get goDownload {\n    return Intl.message(\n      'Go to download',\n      name: 'goDownload',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Unknown`\n  String get unknown {\n    return Intl.message('Unknown', name: 'unknown', desc: '', args: []);\n  }\n\n  /// `GeoData`\n  String get geoData {\n    return Intl.message('GeoData', name: 'geoData', desc: '', args: []);\n  }\n\n  /// `External resources`\n  String get externalResources {\n    return Intl.message(\n      'External resources',\n      name: 'externalResources',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Checking...`\n  String get checking {\n    return Intl.message('Checking...', name: 'checking', desc: '', args: []);\n  }\n\n  /// `Country`\n  String get country {\n    return Intl.message('Country', name: 'country', desc: '', args: []);\n  }\n\n  /// `Check error`\n  String get checkError {\n    return Intl.message('Check error', name: 'checkError', desc: '', args: []);\n  }\n\n  /// `Search`\n  String get search {\n    return Intl.message('Search', name: 'search', desc: '', args: []);\n  }\n\n  /// `Allow applications to bypass VPN`\n  String get allowBypass {\n    return Intl.message(\n      'Allow applications to bypass VPN',\n      name: 'allowBypass',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Some apps can bypass VPN when turned on`\n  String get allowBypassDesc {\n    return Intl.message(\n      'Some apps can bypass VPN when turned on',\n      name: 'allowBypassDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `ExternalController`\n  String get externalController {\n    return Intl.message(\n      'ExternalController',\n      name: 'externalController',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Once enabled, the Clash kernel can be controlled on port 9090`\n  String get externalControllerDesc {\n    return Intl.message(\n      'Once enabled, the Clash kernel can be controlled on port 9090',\n      name: 'externalControllerDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `When turned on it will be able to receive IPv6 traffic`\n  String get ipv6Desc {\n    return Intl.message(\n      'When turned on it will be able to receive IPv6 traffic',\n      name: 'ipv6Desc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `App`\n  String get app {\n    return Intl.message('App', name: 'app', desc: '', args: []);\n  }\n\n  /// `General`\n  String get general {\n    return Intl.message('General', name: 'general', desc: '', args: []);\n  }\n\n  /// `Attach HTTP proxy to VpnService`\n  String get vpnSystemProxyDesc {\n    return Intl.message(\n      'Attach HTTP proxy to VpnService',\n      name: 'vpnSystemProxyDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Attach HTTP proxy to VpnService`\n  String get systemProxyDesc {\n    return Intl.message(\n      'Attach HTTP proxy to VpnService',\n      name: 'systemProxyDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Unified delay`\n  String get unifiedDelay {\n    return Intl.message(\n      'Unified delay',\n      name: 'unifiedDelay',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Remove extra delays such as handshaking`\n  String get unifiedDelayDesc {\n    return Intl.message(\n      'Remove extra delays such as handshaking',\n      name: 'unifiedDelayDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `TCP concurrent`\n  String get tcpConcurrent {\n    return Intl.message(\n      'TCP concurrent',\n      name: 'tcpConcurrent',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Enabling it will allow TCP concurrency`\n  String get tcpConcurrentDesc {\n    return Intl.message(\n      'Enabling it will allow TCP concurrency',\n      name: 'tcpConcurrentDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Geo Low Memory Mode`\n  String get geodataLoader {\n    return Intl.message(\n      'Geo Low Memory Mode',\n      name: 'geodataLoader',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Enabling will use the Geo low memory loader`\n  String get geodataLoaderDesc {\n    return Intl.message(\n      'Enabling will use the Geo low memory loader',\n      name: 'geodataLoaderDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Requests`\n  String get requests {\n    return Intl.message('Requests', name: 'requests', desc: '', args: []);\n  }\n\n  /// `View recently request records`\n  String get requestsDesc {\n    return Intl.message(\n      'View recently request records',\n      name: 'requestsDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Find process`\n  String get findProcessMode {\n    return Intl.message(\n      'Find process',\n      name: 'findProcessMode',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Init`\n  String get init {\n    return Intl.message('Init', name: 'init', desc: '', args: []);\n  }\n\n  /// `Long term effective`\n  String get infiniteTime {\n    return Intl.message(\n      'Long term effective',\n      name: 'infiniteTime',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Expiration time`\n  String get expirationTime {\n    return Intl.message(\n      'Expiration time',\n      name: 'expirationTime',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Connections`\n  String get connections {\n    return Intl.message('Connections', name: 'connections', desc: '', args: []);\n  }\n\n  /// `View current connections data`\n  String get connectionsDesc {\n    return Intl.message(\n      'View current connections data',\n      name: 'connectionsDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Intranet IP`\n  String get intranetIP {\n    return Intl.message('Intranet IP', name: 'intranetIP', desc: '', args: []);\n  }\n\n  /// `View`\n  String get view {\n    return Intl.message('View', name: 'view', desc: '', args: []);\n  }\n\n  /// `Cut`\n  String get cut {\n    return Intl.message('Cut', name: 'cut', desc: '', args: []);\n  }\n\n  /// `Copy`\n  String get copy {\n    return Intl.message('Copy', name: 'copy', desc: '', args: []);\n  }\n\n  /// `Paste`\n  String get paste {\n    return Intl.message('Paste', name: 'paste', desc: '', args: []);\n  }\n\n  /// `Test url`\n  String get testUrl {\n    return Intl.message('Test url', name: 'testUrl', desc: '', args: []);\n  }\n\n  /// `Sync`\n  String get sync {\n    return Intl.message('Sync', name: 'sync', desc: '', args: []);\n  }\n\n  /// `Hidden from recent tasks`\n  String get exclude {\n    return Intl.message(\n      'Hidden from recent tasks',\n      name: 'exclude',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `When the app is in the background, the app is hidden from the recent task`\n  String get excludeDesc {\n    return Intl.message(\n      'When the app is in the background, the app is hidden from the recent task',\n      name: 'excludeDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `One column`\n  String get oneColumn {\n    return Intl.message('One column', name: 'oneColumn', desc: '', args: []);\n  }\n\n  /// `Two columns`\n  String get twoColumns {\n    return Intl.message('Two columns', name: 'twoColumns', desc: '', args: []);\n  }\n\n  /// `Three columns`\n  String get threeColumns {\n    return Intl.message(\n      'Three columns',\n      name: 'threeColumns',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Four columns`\n  String get fourColumns {\n    return Intl.message(\n      'Four columns',\n      name: 'fourColumns',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Standard`\n  String get expand {\n    return Intl.message('Standard', name: 'expand', desc: '', args: []);\n  }\n\n  /// `Shrink`\n  String get shrink {\n    return Intl.message('Shrink', name: 'shrink', desc: '', args: []);\n  }\n\n  /// `Min`\n  String get min {\n    return Intl.message('Min', name: 'min', desc: '', args: []);\n  }\n\n  /// `Tab`\n  String get tab {\n    return Intl.message('Tab', name: 'tab', desc: '', args: []);\n  }\n\n  /// `List`\n  String get list {\n    return Intl.message('List', name: 'list', desc: '', args: []);\n  }\n\n  /// `Delay`\n  String get delay {\n    return Intl.message('Delay', name: 'delay', desc: '', args: []);\n  }\n\n  /// `Style`\n  String get style {\n    return Intl.message('Style', name: 'style', desc: '', args: []);\n  }\n\n  /// `Size`\n  String get size {\n    return Intl.message('Size', name: 'size', desc: '', args: []);\n  }\n\n  /// `Sort`\n  String get sort {\n    return Intl.message('Sort', name: 'sort', desc: '', args: []);\n  }\n\n  /// `Columns`\n  String get columns {\n    return Intl.message('Columns', name: 'columns', desc: '', args: []);\n  }\n\n  /// `Proxies setting`\n  String get proxiesSetting {\n    return Intl.message(\n      'Proxies setting',\n      name: 'proxiesSetting',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Proxy group`\n  String get proxyGroup {\n    return Intl.message('Proxy group', name: 'proxyGroup', desc: '', args: []);\n  }\n\n  /// `Go`\n  String get go {\n    return Intl.message('Go', name: 'go', desc: '', args: []);\n  }\n\n  /// `External link`\n  String get externalLink {\n    return Intl.message(\n      'External link',\n      name: 'externalLink',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Other contributors`\n  String get otherContributors {\n    return Intl.message(\n      'Other contributors',\n      name: 'otherContributors',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Auto close connections`\n  String get autoCloseConnections {\n    return Intl.message(\n      'Auto close connections',\n      name: 'autoCloseConnections',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Auto close connections after change node`\n  String get autoCloseConnectionsDesc {\n    return Intl.message(\n      'Auto close connections after change node',\n      name: 'autoCloseConnectionsDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Only statistics proxy`\n  String get onlyStatisticsProxy {\n    return Intl.message(\n      'Only statistics proxy',\n      name: 'onlyStatisticsProxy',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `When turned on, only statistics proxy traffic`\n  String get onlyStatisticsProxyDesc {\n    return Intl.message(\n      'When turned on, only statistics proxy traffic',\n      name: 'onlyStatisticsProxyDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Pure black mode`\n  String get pureBlackMode {\n    return Intl.message(\n      'Pure black mode',\n      name: 'pureBlackMode',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Tcp keep alive interval`\n  String get keepAliveIntervalDesc {\n    return Intl.message(\n      'Tcp keep alive interval',\n      name: 'keepAliveIntervalDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// ` entries`\n  String get entries {\n    return Intl.message(' entries', name: 'entries', desc: '', args: []);\n  }\n\n  /// `Local`\n  String get local {\n    return Intl.message('Local', name: 'local', desc: '', args: []);\n  }\n\n  /// `Remote`\n  String get remote {\n    return Intl.message('Remote', name: 'remote', desc: '', args: []);\n  }\n\n  /// `Backup local data to WebDAV`\n  String get remoteBackupDesc {\n    return Intl.message(\n      'Backup local data to WebDAV',\n      name: 'remoteBackupDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Backup local data to local`\n  String get localBackupDesc {\n    return Intl.message(\n      'Backup local data to local',\n      name: 'localBackupDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Mode`\n  String get mode {\n    return Intl.message('Mode', name: 'mode', desc: '', args: []);\n  }\n\n  /// `Time`\n  String get time {\n    return Intl.message('Time', name: 'time', desc: '', args: []);\n  }\n\n  /// `Source`\n  String get source {\n    return Intl.message('Source', name: 'source', desc: '', args: []);\n  }\n\n  /// `All apps`\n  String get allApps {\n    return Intl.message('All apps', name: 'allApps', desc: '', args: []);\n  }\n\n  /// `Only third-party apps`\n  String get onlyOtherApps {\n    return Intl.message(\n      'Only third-party apps',\n      name: 'onlyOtherApps',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Action`\n  String get action {\n    return Intl.message('Action', name: 'action', desc: '', args: []);\n  }\n\n  /// `Intelligent selection`\n  String get intelligentSelected {\n    return Intl.message(\n      'Intelligent selection',\n      name: 'intelligentSelected',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Clipboard import`\n  String get clipboardImport {\n    return Intl.message(\n      'Clipboard import',\n      name: 'clipboardImport',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Export clipboard`\n  String get clipboardExport {\n    return Intl.message(\n      'Export clipboard',\n      name: 'clipboardExport',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Layout`\n  String get layout {\n    return Intl.message('Layout', name: 'layout', desc: '', args: []);\n  }\n\n  /// `Tight`\n  String get tight {\n    return Intl.message('Tight', name: 'tight', desc: '', args: []);\n  }\n\n  /// `Standard`\n  String get standard {\n    return Intl.message('Standard', name: 'standard', desc: '', args: []);\n  }\n\n  /// `Loose`\n  String get loose {\n    return Intl.message('Loose', name: 'loose', desc: '', args: []);\n  }\n\n  /// `Profiles sort`\n  String get profilesSort {\n    return Intl.message(\n      'Profiles sort',\n      name: 'profilesSort',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Start`\n  String get start {\n    return Intl.message('Start', name: 'start', desc: '', args: []);\n  }\n\n  /// `Stop`\n  String get stop {\n    return Intl.message('Stop', name: 'stop', desc: '', args: []);\n  }\n\n  /// `Processing app related settings`\n  String get appDesc {\n    return Intl.message(\n      'Processing app related settings',\n      name: 'appDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Modify VPN related settings`\n  String get vpnDesc {\n    return Intl.message(\n      'Modify VPN related settings',\n      name: 'vpnDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Update DNS related settings`\n  String get dnsDesc {\n    return Intl.message(\n      'Update DNS related settings',\n      name: 'dnsDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Key`\n  String get key {\n    return Intl.message('Key', name: 'key', desc: '', args: []);\n  }\n\n  /// `Value`\n  String get value {\n    return Intl.message('Value', name: 'value', desc: '', args: []);\n  }\n\n  /// `Add Hosts`\n  String get hostsDesc {\n    return Intl.message('Add Hosts', name: 'hostsDesc', desc: '', args: []);\n  }\n\n  /// `Changes take effect after restarting the VPN`\n  String get vpnTip {\n    return Intl.message(\n      'Changes take effect after restarting the VPN',\n      name: 'vpnTip',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Auto routes all system traffic through VpnService`\n  String get vpnEnableDesc {\n    return Intl.message(\n      'Auto routes all system traffic through VpnService',\n      name: 'vpnEnableDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Options`\n  String get options {\n    return Intl.message('Options', name: 'options', desc: '', args: []);\n  }\n\n  /// `Loopback unlock tool`\n  String get loopback {\n    return Intl.message(\n      'Loopback unlock tool',\n      name: 'loopback',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Used for UWP loopback unlocking`\n  String get loopbackDesc {\n    return Intl.message(\n      'Used for UWP loopback unlocking',\n      name: 'loopbackDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Providers`\n  String get providers {\n    return Intl.message('Providers', name: 'providers', desc: '', args: []);\n  }\n\n  /// `Proxy providers`\n  String get proxyProviders {\n    return Intl.message(\n      'Proxy providers',\n      name: 'proxyProviders',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Rule providers`\n  String get ruleProviders {\n    return Intl.message(\n      'Rule providers',\n      name: 'ruleProviders',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Override Dns`\n  String get overrideDns {\n    return Intl.message(\n      'Override Dns',\n      name: 'overrideDns',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Turning it on will override the DNS options in the profile`\n  String get overrideDnsDesc {\n    return Intl.message(\n      'Turning it on will override the DNS options in the profile',\n      name: 'overrideDnsDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Status`\n  String get status {\n    return Intl.message('Status', name: 'status', desc: '', args: []);\n  }\n\n  /// `System DNS will be used when turned off`\n  String get statusDesc {\n    return Intl.message(\n      'System DNS will be used when turned off',\n      name: 'statusDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Prioritize the use of DOH's http/3`\n  String get preferH3Desc {\n    return Intl.message(\n      'Prioritize the use of DOH\\'s http/3',\n      name: 'preferH3Desc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Respect rules`\n  String get respectRules {\n    return Intl.message(\n      'Respect rules',\n      name: 'respectRules',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `DNS connection following rules, need to configure proxy-server-nameserver`\n  String get respectRulesDesc {\n    return Intl.message(\n      'DNS connection following rules, need to configure proxy-server-nameserver',\n      name: 'respectRulesDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `DNS mode`\n  String get dnsMode {\n    return Intl.message('DNS mode', name: 'dnsMode', desc: '', args: []);\n  }\n\n  /// `Fakeip range`\n  String get fakeipRange {\n    return Intl.message(\n      'Fakeip range',\n      name: 'fakeipRange',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Fakeip filter`\n  String get fakeipFilter {\n    return Intl.message(\n      'Fakeip filter',\n      name: 'fakeipFilter',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Default nameserver`\n  String get defaultNameserver {\n    return Intl.message(\n      'Default nameserver',\n      name: 'defaultNameserver',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `For resolving DNS server`\n  String get defaultNameserverDesc {\n    return Intl.message(\n      'For resolving DNS server',\n      name: 'defaultNameserverDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Nameserver`\n  String get nameserver {\n    return Intl.message('Nameserver', name: 'nameserver', desc: '', args: []);\n  }\n\n  /// `For resolving domain`\n  String get nameserverDesc {\n    return Intl.message(\n      'For resolving domain',\n      name: 'nameserverDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Use hosts`\n  String get useHosts {\n    return Intl.message('Use hosts', name: 'useHosts', desc: '', args: []);\n  }\n\n  /// `Use system hosts`\n  String get useSystemHosts {\n    return Intl.message(\n      'Use system hosts',\n      name: 'useSystemHosts',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Nameserver policy`\n  String get nameserverPolicy {\n    return Intl.message(\n      'Nameserver policy',\n      name: 'nameserverPolicy',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Specify the corresponding nameserver policy`\n  String get nameserverPolicyDesc {\n    return Intl.message(\n      'Specify the corresponding nameserver policy',\n      name: 'nameserverPolicyDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Proxy nameserver`\n  String get proxyNameserver {\n    return Intl.message(\n      'Proxy nameserver',\n      name: 'proxyNameserver',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Domain for resolving proxy nodes`\n  String get proxyNameserverDesc {\n    return Intl.message(\n      'Domain for resolving proxy nodes',\n      name: 'proxyNameserverDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Fallback`\n  String get fallback {\n    return Intl.message('Fallback', name: 'fallback', desc: '', args: []);\n  }\n\n  /// `Generally use offshore DNS`\n  String get fallbackDesc {\n    return Intl.message(\n      'Generally use offshore DNS',\n      name: 'fallbackDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Fallback filter`\n  String get fallbackFilter {\n    return Intl.message(\n      'Fallback filter',\n      name: 'fallbackFilter',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Geoip code`\n  String get geoipCode {\n    return Intl.message('Geoip code', name: 'geoipCode', desc: '', args: []);\n  }\n\n  /// `Ipcidr`\n  String get ipcidr {\n    return Intl.message('Ipcidr', name: 'ipcidr', desc: '', args: []);\n  }\n\n  /// `Domain`\n  String get domain {\n    return Intl.message('Domain', name: 'domain', desc: '', args: []);\n  }\n\n  /// `Reset`\n  String get reset {\n    return Intl.message('Reset', name: 'reset', desc: '', args: []);\n  }\n\n  /// `Show/Hide`\n  String get action_view {\n    return Intl.message('Show/Hide', name: 'action_view', desc: '', args: []);\n  }\n\n  /// `Start/Stop`\n  String get action_start {\n    return Intl.message('Start/Stop', name: 'action_start', desc: '', args: []);\n  }\n\n  /// `Switch mode`\n  String get action_mode {\n    return Intl.message('Switch mode', name: 'action_mode', desc: '', args: []);\n  }\n\n  /// `System proxy`\n  String get action_proxy {\n    return Intl.message(\n      'System proxy',\n      name: 'action_proxy',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `TUN`\n  String get action_tun {\n    return Intl.message('TUN', name: 'action_tun', desc: '', args: []);\n  }\n\n  /// `Disclaimer`\n  String get disclaimer {\n    return Intl.message('Disclaimer', name: 'disclaimer', desc: '', args: []);\n  }\n\n  /// `This software is only used for non-commercial purposes such as learning exchanges and scientific research. It is strictly prohibited to use this software for commercial purposes. Any commercial activity, if any, has nothing to do with this software.`\n  String get disclaimerDesc {\n    return Intl.message(\n      'This software is only used for non-commercial purposes such as learning exchanges and scientific research. It is strictly prohibited to use this software for commercial purposes. Any commercial activity, if any, has nothing to do with this software.',\n      name: 'disclaimerDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Agree`\n  String get agree {\n    return Intl.message('Agree', name: 'agree', desc: '', args: []);\n  }\n\n  /// `Hotkey Management`\n  String get hotkeyManagement {\n    return Intl.message(\n      'Hotkey Management',\n      name: 'hotkeyManagement',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Use keyboard to control applications`\n  String get hotkeyManagementDesc {\n    return Intl.message(\n      'Use keyboard to control applications',\n      name: 'hotkeyManagementDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Please press the keyboard.`\n  String get pressKeyboard {\n    return Intl.message(\n      'Please press the keyboard.',\n      name: 'pressKeyboard',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Please enter the correct hotkey`\n  String get inputCorrectHotkey {\n    return Intl.message(\n      'Please enter the correct hotkey',\n      name: 'inputCorrectHotkey',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Hotkey conflict`\n  String get hotkeyConflict {\n    return Intl.message(\n      'Hotkey conflict',\n      name: 'hotkeyConflict',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Remove`\n  String get remove {\n    return Intl.message('Remove', name: 'remove', desc: '', args: []);\n  }\n\n  /// `No HotKey`\n  String get noHotKey {\n    return Intl.message('No HotKey', name: 'noHotKey', desc: '', args: []);\n  }\n\n  /// `No network`\n  String get noNetwork {\n    return Intl.message('No network', name: 'noNetwork', desc: '', args: []);\n  }\n\n  /// `Allow IPv6 inbound`\n  String get ipv6InboundDesc {\n    return Intl.message(\n      'Allow IPv6 inbound',\n      name: 'ipv6InboundDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Export logs`\n  String get exportLogs {\n    return Intl.message('Export logs', name: 'exportLogs', desc: '', args: []);\n  }\n\n  /// `Export Success`\n  String get exportSuccess {\n    return Intl.message(\n      'Export Success',\n      name: 'exportSuccess',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Icon style`\n  String get iconStyle {\n    return Intl.message('Icon style', name: 'iconStyle', desc: '', args: []);\n  }\n\n  /// `Icon`\n  String get onlyIcon {\n    return Intl.message('Icon', name: 'onlyIcon', desc: '', args: []);\n  }\n\n  /// `None`\n  String get noIcon {\n    return Intl.message('None', name: 'noIcon', desc: '', args: []);\n  }\n\n  /// `Stack mode`\n  String get stackMode {\n    return Intl.message('Stack mode', name: 'stackMode', desc: '', args: []);\n  }\n\n  /// `Network`\n  String get network {\n    return Intl.message('Network', name: 'network', desc: '', args: []);\n  }\n\n  /// `Modify network-related settings`\n  String get networkDesc {\n    return Intl.message(\n      'Modify network-related settings',\n      name: 'networkDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Bypass domain`\n  String get bypassDomain {\n    return Intl.message(\n      'Bypass domain',\n      name: 'bypassDomain',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Only takes effect when the system proxy is enabled`\n  String get bypassDomainDesc {\n    return Intl.message(\n      'Only takes effect when the system proxy is enabled',\n      name: 'bypassDomainDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Make sure to reset`\n  String get resetTip {\n    return Intl.message(\n      'Make sure to reset',\n      name: 'resetTip',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `RegExp`\n  String get regExp {\n    return Intl.message('RegExp', name: 'regExp', desc: '', args: []);\n  }\n\n  /// `Icon`\n  String get icon {\n    return Intl.message('Icon', name: 'icon', desc: '', args: []);\n  }\n\n  /// `Icon configuration`\n  String get iconConfiguration {\n    return Intl.message(\n      'Icon configuration',\n      name: 'iconConfiguration',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `No data`\n  String get noData {\n    return Intl.message('No data', name: 'noData', desc: '', args: []);\n  }\n\n  /// `Admin auto launch`\n  String get adminAutoLaunch {\n    return Intl.message(\n      'Admin auto launch',\n      name: 'adminAutoLaunch',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Boot up by using admin mode`\n  String get adminAutoLaunchDesc {\n    return Intl.message(\n      'Boot up by using admin mode',\n      name: 'adminAutoLaunchDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `FontFamily`\n  String get fontFamily {\n    return Intl.message('FontFamily', name: 'fontFamily', desc: '', args: []);\n  }\n\n  /// `System font`\n  String get systemFont {\n    return Intl.message('System font', name: 'systemFont', desc: '', args: []);\n  }\n\n  /// `Toggle`\n  String get toggle {\n    return Intl.message('Toggle', name: 'toggle', desc: '', args: []);\n  }\n\n  /// `System`\n  String get system {\n    return Intl.message('System', name: 'system', desc: '', args: []);\n  }\n\n  /// `Route mode`\n  String get routeMode {\n    return Intl.message('Route mode', name: 'routeMode', desc: '', args: []);\n  }\n\n  /// `Bypass private route address`\n  String get routeMode_bypassPrivate {\n    return Intl.message(\n      'Bypass private route address',\n      name: 'routeMode_bypassPrivate',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Use config`\n  String get routeMode_config {\n    return Intl.message(\n      'Use config',\n      name: 'routeMode_config',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Route address`\n  String get routeAddress {\n    return Intl.message(\n      'Route address',\n      name: 'routeAddress',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Config listen route address`\n  String get routeAddressDesc {\n    return Intl.message(\n      'Config listen route address',\n      name: 'routeAddressDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Please enter the admin password`\n  String get pleaseInputAdminPassword {\n    return Intl.message(\n      'Please enter the admin password',\n      name: 'pleaseInputAdminPassword',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Copying environment variables`\n  String get copyEnvVar {\n    return Intl.message(\n      'Copying environment variables',\n      name: 'copyEnvVar',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Memory info`\n  String get memoryInfo {\n    return Intl.message('Memory info', name: 'memoryInfo', desc: '', args: []);\n  }\n\n  /// `Cancel`\n  String get cancel {\n    return Intl.message('Cancel', name: 'cancel', desc: '', args: []);\n  }\n\n  /// `The file has been modified. Do you want to save the changes?`\n  String get fileIsUpdate {\n    return Intl.message(\n      'The file has been modified. Do you want to save the changes?',\n      name: 'fileIsUpdate',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `The profile has been modified. Do you want to disable auto update?`\n  String get profileHasUpdate {\n    return Intl.message(\n      'The profile has been modified. Do you want to disable auto update?',\n      name: 'profileHasUpdate',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Do you want to cache the changes?`\n  String get hasCacheChange {\n    return Intl.message(\n      'Do you want to cache the changes?',\n      name: 'hasCacheChange',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Copy success`\n  String get copySuccess {\n    return Intl.message(\n      'Copy success',\n      name: 'copySuccess',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Copy link`\n  String get copyLink {\n    return Intl.message('Copy link', name: 'copyLink', desc: '', args: []);\n  }\n\n  /// `Export file`\n  String get exportFile {\n    return Intl.message('Export file', name: 'exportFile', desc: '', args: []);\n  }\n\n  /// `The cache is corrupt. Do you want to clear it?`\n  String get cacheCorrupt {\n    return Intl.message(\n      'The cache is corrupt. Do you want to clear it?',\n      name: 'cacheCorrupt',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Relying on third-party api is for reference only`\n  String get detectionTip {\n    return Intl.message(\n      'Relying on third-party api is for reference only',\n      name: 'detectionTip',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Listen`\n  String get listen {\n    return Intl.message('Listen', name: 'listen', desc: '', args: []);\n  }\n\n  /// `undo`\n  String get undo {\n    return Intl.message('undo', name: 'undo', desc: '', args: []);\n  }\n\n  /// `redo`\n  String get redo {\n    return Intl.message('redo', name: 'redo', desc: '', args: []);\n  }\n\n  /// `none`\n  String get none {\n    return Intl.message('none', name: 'none', desc: '', args: []);\n  }\n\n  /// `Basic configuration`\n  String get basicConfig {\n    return Intl.message(\n      'Basic configuration',\n      name: 'basicConfig',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Modify the basic configuration globally`\n  String get basicConfigDesc {\n    return Intl.message(\n      'Modify the basic configuration globally',\n      name: 'basicConfigDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Advanced configuration`\n  String get advancedConfig {\n    return Intl.message(\n      'Advanced configuration',\n      name: 'advancedConfig',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Provide diverse configuration options`\n  String get advancedConfigDesc {\n    return Intl.message(\n      'Provide diverse configuration options',\n      name: 'advancedConfigDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `{count} items have been selected`\n  String selectedCountTitle(Object count) {\n    return Intl.message(\n      '$count items have been selected',\n      name: 'selectedCountTitle',\n      desc: '',\n      args: [count],\n    );\n  }\n\n  /// `Add rule`\n  String get addRule {\n    return Intl.message('Add rule', name: 'addRule', desc: '', args: []);\n  }\n\n  /// `Rule name`\n  String get ruleName {\n    return Intl.message('Rule name', name: 'ruleName', desc: '', args: []);\n  }\n\n  /// `Content`\n  String get content {\n    return Intl.message('Content', name: 'content', desc: '', args: []);\n  }\n\n  /// `Sub rule`\n  String get subRule {\n    return Intl.message('Sub rule', name: 'subRule', desc: '', args: []);\n  }\n\n  /// `Rule target`\n  String get ruleTarget {\n    return Intl.message('Rule target', name: 'ruleTarget', desc: '', args: []);\n  }\n\n  /// `Source IP`\n  String get sourceIp {\n    return Intl.message('Source IP', name: 'sourceIp', desc: '', args: []);\n  }\n\n  /// `No resolve IP`\n  String get noResolve {\n    return Intl.message('No resolve IP', name: 'noResolve', desc: '', args: []);\n  }\n\n  /// `Get original rules`\n  String get getOriginRules {\n    return Intl.message(\n      'Get original rules',\n      name: 'getOriginRules',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Override the original rule`\n  String get overrideOriginRules {\n    return Intl.message(\n      'Override the original rule',\n      name: 'overrideOriginRules',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Attach on the original rules`\n  String get addedOriginRules {\n    return Intl.message(\n      'Attach on the original rules',\n      name: 'addedOriginRules',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Enable override`\n  String get enableOverride {\n    return Intl.message(\n      'Enable override',\n      name: 'enableOverride',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Do you want to save the changes?`\n  String get saveChanges {\n    return Intl.message(\n      'Do you want to save the changes?',\n      name: 'saveChanges',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Modify general settings`\n  String get generalDesc {\n    return Intl.message(\n      'Modify general settings',\n      name: 'generalDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `There is a certain performance loss after opening`\n  String get findProcessModeDesc {\n    return Intl.message(\n      'There is a certain performance loss after opening',\n      name: 'findProcessModeDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Effective only in mobile view`\n  String get tabAnimationDesc {\n    return Intl.message(\n      'Effective only in mobile view',\n      name: 'tabAnimationDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Are you sure you want to save?`\n  String get saveTip {\n    return Intl.message(\n      'Are you sure you want to save?',\n      name: 'saveTip',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Color schemes`\n  String get colorSchemes {\n    return Intl.message(\n      'Color schemes',\n      name: 'colorSchemes',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Palette`\n  String get palette {\n    return Intl.message('Palette', name: 'palette', desc: '', args: []);\n  }\n\n  /// `TonalSpot`\n  String get tonalSpotScheme {\n    return Intl.message(\n      'TonalSpot',\n      name: 'tonalSpotScheme',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Fidelity`\n  String get fidelityScheme {\n    return Intl.message('Fidelity', name: 'fidelityScheme', desc: '', args: []);\n  }\n\n  /// `Monochrome`\n  String get monochromeScheme {\n    return Intl.message(\n      'Monochrome',\n      name: 'monochromeScheme',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Neutral`\n  String get neutralScheme {\n    return Intl.message('Neutral', name: 'neutralScheme', desc: '', args: []);\n  }\n\n  /// `Vibrant`\n  String get vibrantScheme {\n    return Intl.message('Vibrant', name: 'vibrantScheme', desc: '', args: []);\n  }\n\n  /// `Expressive`\n  String get expressiveScheme {\n    return Intl.message(\n      'Expressive',\n      name: 'expressiveScheme',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Content`\n  String get contentScheme {\n    return Intl.message('Content', name: 'contentScheme', desc: '', args: []);\n  }\n\n  /// `Rainbow`\n  String get rainbowScheme {\n    return Intl.message('Rainbow', name: 'rainbowScheme', desc: '', args: []);\n  }\n\n  /// `FruitSalad`\n  String get fruitSaladScheme {\n    return Intl.message(\n      'FruitSalad',\n      name: 'fruitSaladScheme',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Developer mode`\n  String get developerMode {\n    return Intl.message(\n      'Developer mode',\n      name: 'developerMode',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Developer mode is enabled.`\n  String get developerModeEnableTip {\n    return Intl.message(\n      'Developer mode is enabled.',\n      name: 'developerModeEnableTip',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Message test`\n  String get messageTest {\n    return Intl.message(\n      'Message test',\n      name: 'messageTest',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `This is a message.`\n  String get messageTestTip {\n    return Intl.message(\n      'This is a message.',\n      name: 'messageTestTip',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Crash test`\n  String get crashTest {\n    return Intl.message('Crash test', name: 'crashTest', desc: '', args: []);\n  }\n\n  /// `Clear Data`\n  String get clearData {\n    return Intl.message('Clear Data', name: 'clearData', desc: '', args: []);\n  }\n\n  /// `Text Scaling`\n  String get textScale {\n    return Intl.message('Text Scaling', name: 'textScale', desc: '', args: []);\n  }\n\n  /// `Internet`\n  String get internet {\n    return Intl.message('Internet', name: 'internet', desc: '', args: []);\n  }\n\n  /// `System APP`\n  String get systemApp {\n    return Intl.message('System APP', name: 'systemApp', desc: '', args: []);\n  }\n\n  /// `No network APP`\n  String get noNetworkApp {\n    return Intl.message(\n      'No network APP',\n      name: 'noNetworkApp',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Contact me`\n  String get contactMe {\n    return Intl.message('Contact me', name: 'contactMe', desc: '', args: []);\n  }\n\n  /// `Restore strategy`\n  String get restoreStrategy {\n    return Intl.message(\n      'Restore strategy',\n      name: 'restoreStrategy',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Override`\n  String get restoreStrategy_override {\n    return Intl.message(\n      'Override',\n      name: 'restoreStrategy_override',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Compatible`\n  String get restoreStrategy_compatible {\n    return Intl.message(\n      'Compatible',\n      name: 'restoreStrategy_compatible',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Logs test`\n  String get logsTest {\n    return Intl.message('Logs test', name: 'logsTest', desc: '', args: []);\n  }\n\n  /// `{label} cannot be empty`\n  String emptyTip(Object label) {\n    return Intl.message(\n      '$label cannot be empty',\n      name: 'emptyTip',\n      desc: '',\n      args: [label],\n    );\n  }\n\n  /// `{label} must be a url`\n  String urlTip(Object label) {\n    return Intl.message(\n      '$label must be a url',\n      name: 'urlTip',\n      desc: '',\n      args: [label],\n    );\n  }\n\n  /// `{label} must be a number`\n  String numberTip(Object label) {\n    return Intl.message(\n      '$label must be a number',\n      name: 'numberTip',\n      desc: '',\n      args: [label],\n    );\n  }\n\n  /// `Interval`\n  String get interval {\n    return Intl.message('Interval', name: 'interval', desc: '', args: []);\n  }\n\n  /// `Current {label} already exists`\n  String existsTip(Object label) {\n    return Intl.message(\n      'Current $label already exists',\n      name: 'existsTip',\n      desc: '',\n      args: [label],\n    );\n  }\n\n  /// `Are you sure you want to delete the current {label}?`\n  String deleteTip(Object label) {\n    return Intl.message(\n      'Are you sure you want to delete the current $label?',\n      name: 'deleteTip',\n      desc: '',\n      args: [label],\n    );\n  }\n\n  /// `Are you sure you want to delete the selected {label}?`\n  String deleteMultipTip(Object label) {\n    return Intl.message(\n      'Are you sure you want to delete the selected $label?',\n      name: 'deleteMultipTip',\n      desc: '',\n      args: [label],\n    );\n  }\n\n  /// `No {label} yet`\n  String nullTip(Object label) {\n    return Intl.message(\n      'No $label yet',\n      name: 'nullTip',\n      desc: '',\n      args: [label],\n    );\n  }\n\n  /// `Script`\n  String get script {\n    return Intl.message('Script', name: 'script', desc: '', args: []);\n  }\n\n  /// `Color`\n  String get color {\n    return Intl.message('Color', name: 'color', desc: '', args: []);\n  }\n\n  /// `Rename`\n  String get rename {\n    return Intl.message('Rename', name: 'rename', desc: '', args: []);\n  }\n\n  /// `Unnamed`\n  String get unnamed {\n    return Intl.message('Unnamed', name: 'unnamed', desc: '', args: []);\n  }\n\n  /// `Please enter a script name`\n  String get pleaseEnterScriptName {\n    return Intl.message(\n      'Please enter a script name',\n      name: 'pleaseEnterScriptName',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Does not take effect in script mode`\n  String get overrideInvalidTip {\n    return Intl.message(\n      'Does not take effect in script mode',\n      name: 'overrideInvalidTip',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Mixed Port`\n  String get mixedPort {\n    return Intl.message('Mixed Port', name: 'mixedPort', desc: '', args: []);\n  }\n\n  /// `Socks Port`\n  String get socksPort {\n    return Intl.message('Socks Port', name: 'socksPort', desc: '', args: []);\n  }\n\n  /// `Redir Port`\n  String get redirPort {\n    return Intl.message('Redir Port', name: 'redirPort', desc: '', args: []);\n  }\n\n  /// `Tproxy Port`\n  String get tproxyPort {\n    return Intl.message('Tproxy Port', name: 'tproxyPort', desc: '', args: []);\n  }\n\n  /// `{label} must be between 1024 and 49151`\n  String portTip(Object label) {\n    return Intl.message(\n      '$label must be between 1024 and 49151',\n      name: 'portTip',\n      desc: '',\n      args: [label],\n    );\n  }\n\n  /// `Please enter a different port`\n  String get portConflictTip {\n    return Intl.message(\n      'Please enter a different port',\n      name: 'portConflictTip',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Import`\n  String get import {\n    return Intl.message('Import', name: 'import', desc: '', args: []);\n  }\n\n  /// `Import from file`\n  String get importFile {\n    return Intl.message(\n      'Import from file',\n      name: 'importFile',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Import from URL`\n  String get importUrl {\n    return Intl.message(\n      'Import from URL',\n      name: 'importUrl',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Auto set system DNS`\n  String get autoSetSystemDns {\n    return Intl.message(\n      'Auto set system DNS',\n      name: 'autoSetSystemDns',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `{label} details`\n  String details(Object label) {\n    return Intl.message(\n      '$label details',\n      name: 'details',\n      desc: '',\n      args: [label],\n    );\n  }\n\n  /// `Creation time`\n  String get creationTime {\n    return Intl.message(\n      'Creation time',\n      name: 'creationTime',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Process`\n  String get process {\n    return Intl.message('Process', name: 'process', desc: '', args: []);\n  }\n\n  /// `Host`\n  String get host {\n    return Intl.message('Host', name: 'host', desc: '', args: []);\n  }\n\n  /// `Destination`\n  String get destination {\n    return Intl.message('Destination', name: 'destination', desc: '', args: []);\n  }\n\n  /// `Destination GeoIP`\n  String get destinationGeoIP {\n    return Intl.message(\n      'Destination GeoIP',\n      name: 'destinationGeoIP',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Destination IPASN`\n  String get destinationIPASN {\n    return Intl.message(\n      'Destination IPASN',\n      name: 'destinationIPASN',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Special proxy`\n  String get specialProxy {\n    return Intl.message(\n      'Special proxy',\n      name: 'specialProxy',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `special rules`\n  String get specialRules {\n    return Intl.message(\n      'special rules',\n      name: 'specialRules',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Remote destination`\n  String get remoteDestination {\n    return Intl.message(\n      'Remote destination',\n      name: 'remoteDestination',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Network type`\n  String get networkType {\n    return Intl.message(\n      'Network type',\n      name: 'networkType',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Proxy chains`\n  String get proxyChains {\n    return Intl.message(\n      'Proxy chains',\n      name: 'proxyChains',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Log`\n  String get log {\n    return Intl.message('Log', name: 'log', desc: '', args: []);\n  }\n\n  /// `Connection`\n  String get connection {\n    return Intl.message('Connection', name: 'connection', desc: '', args: []);\n  }\n\n  /// `Request`\n  String get request {\n    return Intl.message('Request', name: 'request', desc: '', args: []);\n  }\n\n  /// `Connected`\n  String get connected {\n    return Intl.message('Connected', name: 'connected', desc: '', args: []);\n  }\n\n  /// `Disconnected`\n  String get disconnected {\n    return Intl.message(\n      'Disconnected',\n      name: 'disconnected',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Connecting...`\n  String get connecting {\n    return Intl.message(\n      'Connecting...',\n      name: 'connecting',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Are you sure you want to restart the core?`\n  String get restartCoreTip {\n    return Intl.message(\n      'Are you sure you want to restart the core?',\n      name: 'restartCoreTip',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Are you sure you want to force restart the core?`\n  String get forceRestartCoreTip {\n    return Intl.message(\n      'Are you sure you want to force restart the core?',\n      name: 'forceRestartCoreTip',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `DNS hijacking`\n  String get dnsHijacking {\n    return Intl.message(\n      'DNS hijacking',\n      name: 'dnsHijacking',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Core status`\n  String get coreStatus {\n    return Intl.message('Core status', name: 'coreStatus', desc: '', args: []);\n  }\n\n  /// `Data Collection Notice`\n  String get dataCollectionTip {\n    return Intl.message(\n      'Data Collection Notice',\n      name: 'dataCollectionTip',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `This app uses Firebase Crashlytics to collect crash information to improve app stability.\\nThe collected data includes device information and crash details, but does not contain personal sensitive data.\\nYou can disable this feature in settings.`\n  String get dataCollectionContent {\n    return Intl.message(\n      'This app uses Firebase Crashlytics to collect crash information to improve app stability.\\nThe collected data includes device information and crash details, but does not contain personal sensitive data.\\nYou can disable this feature in settings.',\n      name: 'dataCollectionContent',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Crash Analysis`\n  String get crashlytics {\n    return Intl.message(\n      'Crash Analysis',\n      name: 'crashlytics',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `When enabled, automatically uploads crash logs without sensitive information when the app crashes`\n  String get crashlyticsTip {\n    return Intl.message(\n      'When enabled, automatically uploads crash logs without sensitive information when the app crashes',\n      name: 'crashlyticsTip',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Append System DNS`\n  String get appendSystemDns {\n    return Intl.message(\n      'Append System DNS',\n      name: 'appendSystemDns',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Forcefully append system DNS to the configuration`\n  String get appendSystemDnsTip {\n    return Intl.message(\n      'Forcefully append system DNS to the configuration',\n      name: 'appendSystemDnsTip',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Edit rule`\n  String get editRule {\n    return Intl.message('Edit rule', name: 'editRule', desc: '', args: []);\n  }\n\n  /// `Override mode`\n  String get overrideMode {\n    return Intl.message(\n      'Override mode',\n      name: 'overrideMode',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Standard mode, override basic configuration, provide simple rule addition capability`\n  String get standardModeDesc {\n    return Intl.message(\n      'Standard mode, override basic configuration, provide simple rule addition capability',\n      name: 'standardModeDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Script mode, use external extension scripts, provide one-click override configuration capability`\n  String get scriptModeDesc {\n    return Intl.message(\n      'Script mode, use external extension scripts, provide one-click override configuration capability',\n      name: 'scriptModeDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Added rules`\n  String get addedRules {\n    return Intl.message('Added rules', name: 'addedRules', desc: '', args: []);\n  }\n\n  /// `Control global added rules`\n  String get controlGlobalAddedRules {\n    return Intl.message(\n      'Control global added rules',\n      name: 'controlGlobalAddedRules',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Override script`\n  String get overrideScript {\n    return Intl.message(\n      'Override script',\n      name: 'overrideScript',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Go to configure script`\n  String get goToConfigureScript {\n    return Intl.message(\n      'Go to configure script',\n      name: 'goToConfigureScript',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Edit global rules`\n  String get editGlobalRules {\n    return Intl.message(\n      'Edit global rules',\n      name: 'editGlobalRules',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `External fetch`\n  String get externalFetch {\n    return Intl.message(\n      'External fetch',\n      name: 'externalFetch',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Are you sure you want to force crash the core?`\n  String get confirmForceCrashCore {\n    return Intl.message(\n      'Are you sure you want to force crash the core?',\n      name: 'confirmForceCrashCore',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Are you sure you want to clear all data?`\n  String get confirmClearAllData {\n    return Intl.message(\n      'Are you sure you want to clear all data?',\n      name: 'confirmClearAllData',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Loading...`\n  String get loading {\n    return Intl.message('Loading...', name: 'loading', desc: '', args: []);\n  }\n\n  /// `Load test`\n  String get loadTest {\n    return Intl.message('Load test', name: 'loadTest', desc: '', args: []);\n  }\n\n  /// `{count, plural, =1{1 year ago} other{{count} years ago}}`\n  String yearsAgo(num count) {\n    return Intl.plural(\n      count,\n      one: '1 year ago',\n      other: '$count years ago',\n      name: 'yearsAgo',\n      desc: '',\n      args: [count],\n    );\n  }\n\n  /// `{count, plural, =1{1 month ago} other{{count} months ago}}`\n  String monthsAgo(num count) {\n    return Intl.plural(\n      count,\n      one: '1 month ago',\n      other: '$count months ago',\n      name: 'monthsAgo',\n      desc: '',\n      args: [count],\n    );\n  }\n\n  /// `{count, plural, =1{1 day ago} other{{count} days ago}}`\n  String daysAgo(num count) {\n    return Intl.plural(\n      count,\n      one: '1 day ago',\n      other: '$count days ago',\n      name: 'daysAgo',\n      desc: '',\n      args: [count],\n    );\n  }\n\n  /// `{count, plural, =1{1 hour ago} other{{count} hours ago}}`\n  String hoursAgo(num count) {\n    return Intl.plural(\n      count,\n      one: '1 hour ago',\n      other: '$count hours ago',\n      name: 'hoursAgo',\n      desc: '',\n      args: [count],\n    );\n  }\n\n  /// `{count, plural, =1{1 minute ago} other{{count} minutes ago}}`\n  String minutesAgo(num count) {\n    return Intl.plural(\n      count,\n      one: '1 minute ago',\n      other: '$count minutes ago',\n      name: 'minutesAgo',\n      desc: '',\n      args: [count],\n    );\n  }\n\n  /// `Just now`\n  String get justNow {\n    return Intl.message('Just now', name: 'justNow', desc: '', args: []);\n  }\n\n  /// `Don't remind again`\n  String get noLongerRemind {\n    return Intl.message(\n      'Don\\'t remind again',\n      name: 'noLongerRemind',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Access Control Settings`\n  String get accessControlSettings {\n    return Intl.message(\n      'Access Control Settings',\n      name: 'accessControlSettings',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Turn On`\n  String get turnOn {\n    return Intl.message('Turn On', name: 'turnOn', desc: '', args: []);\n  }\n\n  /// `Turn Off`\n  String get turnOff {\n    return Intl.message('Turn Off', name: 'turnOff', desc: '', args: []);\n  }\n\n  /// `Core configuration change detected`\n  String get coreConfigChangeDetected {\n    return Intl.message(\n      'Core configuration change detected',\n      name: 'coreConfigChangeDetected',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Reload`\n  String get reload {\n    return Intl.message('Reload', name: 'reload', desc: '', args: []);\n  }\n\n  /// `VPN configuration change detected`\n  String get vpnConfigChangeDetected {\n    return Intl.message(\n      'VPN configuration change detected',\n      name: 'vpnConfigChangeDetected',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Restart`\n  String get restart {\n    return Intl.message('Restart', name: 'restart', desc: '', args: []);\n  }\n\n  /// `Speed statistics`\n  String get speedStatistics {\n    return Intl.message(\n      'Speed statistics',\n      name: 'speedStatistics',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `The current page has changes. Are you sure you want to reset?`\n  String get resetPageChangesTip {\n    return Intl.message(\n      'The current page has changes. Are you sure you want to reset?',\n      name: 'resetPageChangesTip',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Custom`\n  String get overwriteTypeCustom {\n    return Intl.message(\n      'Custom',\n      name: 'overwriteTypeCustom',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Custom mode, fully customize proxy groups and rules`\n  String get overwriteTypeCustomDesc {\n    return Intl.message(\n      'Custom mode, fully customize proxy groups and rules',\n      name: 'overwriteTypeCustomDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Unknown network error`\n  String get unknownNetworkError {\n    return Intl.message(\n      'Unknown network error',\n      name: 'unknownNetworkError',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Network request exception, please try again later.`\n  String get networkRequestException {\n    return Intl.message(\n      'Network request exception, please try again later.',\n      name: 'networkRequestException',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Recovery exception`\n  String get restoreException {\n    return Intl.message(\n      'Recovery exception',\n      name: 'restoreException',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Network exception, please check your connection and try again`\n  String get networkException {\n    return Intl.message(\n      'Network exception, please check your connection and try again',\n      name: 'networkException',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Invalid backup file`\n  String get invalidBackupFile {\n    return Intl.message(\n      'Invalid backup file',\n      name: 'invalidBackupFile',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Prune cache`\n  String get pruneCache {\n    return Intl.message('Prune cache', name: 'pruneCache', desc: '', args: []);\n  }\n\n  /// `Backup and Restore`\n  String get backupAndRestore {\n    return Intl.message(\n      'Backup and Restore',\n      name: 'backupAndRestore',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Sync data via WebDAV or files`\n  String get backupAndRestoreDesc {\n    return Intl.message(\n      'Sync data via WebDAV or files',\n      name: 'backupAndRestoreDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Restore`\n  String get restore {\n    return Intl.message('Restore', name: 'restore', desc: '', args: []);\n  }\n\n  /// `Restore success`\n  String get restoreSuccess {\n    return Intl.message(\n      'Restore success',\n      name: 'restoreSuccess',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Restore data via WebDAV`\n  String get restoreFromWebDAVDesc {\n    return Intl.message(\n      'Restore data via WebDAV',\n      name: 'restoreFromWebDAVDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Restore data via file`\n  String get restoreFromFileDesc {\n    return Intl.message(\n      'Restore data via file',\n      name: 'restoreFromFileDesc',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Restore configuration files only`\n  String get restoreOnlyConfig {\n    return Intl.message(\n      'Restore configuration files only',\n      name: 'restoreOnlyConfig',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Restore all data`\n  String get restoreAllData {\n    return Intl.message(\n      'Restore all data',\n      name: 'restoreAllData',\n      desc: '',\n      args: [],\n    );\n  }\n\n  /// `Add Profile`\n  String get addProfile {\n    return Intl.message('Add Profile', name: 'addProfile', desc: '', args: []);\n  }\n\n  /// `Delay Test`\n  String get delayTest {\n    return Intl.message('Delay Test', name: 'delayTest', desc: '', args: []);\n  }\n}\n\nclass AppLocalizationDelegate extends LocalizationsDelegate<AppLocalizations> {\n  const AppLocalizationDelegate();\n\n  List<Locale> get supportedLocales {\n    return const <Locale>[\n      Locale.fromSubtags(languageCode: 'en'),\n      Locale.fromSubtags(languageCode: 'ja'),\n      Locale.fromSubtags(languageCode: 'ru'),\n      Locale.fromSubtags(languageCode: 'zh', countryCode: 'CN'),\n    ];\n  }\n\n  @override\n  bool isSupported(Locale locale) => _isSupported(locale);\n  @override\n  Future<AppLocalizations> load(Locale locale) => AppLocalizations.load(locale);\n  @override\n  bool shouldReload(AppLocalizationDelegate old) => false;\n\n  bool _isSupported(Locale locale) {\n    for (var supportedLocale in supportedLocales) {\n      if (supportedLocale.languageCode == locale.languageCode) {\n        return true;\n      }\n    }\n    return false;\n  }\n}\n"
  },
  {
    "path": "lib/main.dart",
    "content": "import 'dart:async';\nimport 'dart:io';\n\nimport 'package:fl_clash/pages/error.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nimport 'application.dart';\nimport 'common/common.dart';\n\nFuture<void> main() async {\n  try {\n    WidgetsFlutterBinding.ensureInitialized();\n    final version = await system.version;\n    final container = await globalState.init(version);\n    HttpOverrides.global = FlClashHttpOverrides();\n    runApp(\n      UncontrolledProviderScope(\n        container: container,\n        child: const Application(),\n      ),\n    );\n  } catch (e, s) {\n    return runApp(\n      MaterialApp(\n        home: InitErrorScreen(error: e, stack: s),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/manager/android_manager.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/core/core.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/plugins/app.dart';\nimport 'package:fl_clash/plugins/service.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass AndroidManager extends ConsumerStatefulWidget {\n  final Widget child;\n\n  const AndroidManager({super.key, required this.child});\n\n  @override\n  ConsumerState<AndroidManager> createState() => _AndroidContainerState();\n}\n\nclass _AndroidContainerState extends ConsumerState<AndroidManager>\n    with ServiceListener {\n  @override\n  void initState() {\n    super.initState();\n    ref.listenManual(appSettingProvider.select((state) => state.hidden), (\n      prev,\n      next,\n    ) {\n      app?.updateExcludeFromRecents(next);\n    }, fireImmediately: true);\n    ref.listenManual(sharedStateProvider, (prev, next) {\n      if (prev != next) {\n        debouncer.call(FunctionTag.saveSharedFile, () async {\n          preferences.saveShareState(next);\n        }, duration: Duration(seconds: 1));\n        if (prev?.needSyncSharedState != next.needSyncSharedState) {\n          service?.syncState(next.needSyncSharedState);\n        }\n      }\n    });\n    service?.addListener(this);\n  }\n\n  @override\n  Future<void> dispose() async {\n    service?.removeListener(this);\n    super.dispose();\n  }\n\n  @override\n  void onServiceEvent(CoreEvent event) {\n    coreEventManager.sendEvent(event);\n    super.onServiceEvent(event);\n  }\n\n  @override\n  void onServiceCrash(String message) {\n    coreEventManager.sendEvent(\n      CoreEvent(type: CoreEventType.crash, data: message),\n    );\n    super.onServiceCrash(message);\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return widget.child;\n  }\n}\n"
  },
  {
    "path": "lib/manager/app_manager.dart",
    "content": "import 'dart:async';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/manager/window_manager.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:intl/intl.dart';\n\nclass AppStateManager extends ConsumerStatefulWidget {\n  final Widget child;\n\n  const AppStateManager({super.key, required this.child});\n\n  @override\n  ConsumerState<AppStateManager> createState() => _AppStateManagerState();\n}\n\nclass _AppStateManagerState extends ConsumerState<AppStateManager>\n    with WidgetsBindingObserver {\n  @override\n  void initState() {\n    super.initState();\n    WidgetsBinding.instance.addObserver(this);\n    ref.listenManual(checkIpProvider, (prev, next) {\n      if (prev != next && next.a && next.c) {\n        ref.read(networkDetectionProvider.notifier).startCheck();\n      }\n    });\n    ref.listenManual(configProvider, (prev, next) {\n      if (prev != next) {\n        appController.savePreferencesDebounce();\n      }\n    });\n    ref.listenManual(needUpdateGroupsProvider, (prev, next) {\n      if (prev != next) {\n        appController.updateGroupsDebounce();\n      }\n    });\n    if (window == null) {\n      return;\n    }\n    ref.listenManual(autoSetSystemDnsStateProvider, (prev, next) async {\n      if (prev == next) {\n        return;\n      }\n      if (next.a == true && next.b == true) {\n        macOS?.updateDns(false);\n      } else {\n        macOS?.updateDns(true);\n      }\n    });\n  }\n\n  @override\n  void dispose() {\n    WidgetsBinding.instance.removeObserver(this);\n    super.dispose();\n  }\n\n  @override\n  Future<void> didChangeAppLifecycleState(AppLifecycleState state) async {\n    commonPrint.log('$state');\n    if (state == AppLifecycleState.resumed) {\n      render?.resume();\n      WidgetsBinding.instance.addPostFrameCallback((_) {\n        appController.tryCheckIp();\n        if (system.isAndroid) {\n          appController.tryStartCore();\n        }\n      });\n    }\n  }\n\n  @override\n  void didChangePlatformBrightness() {\n    appController.updateBrightness();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Listener(\n      onPointerHover: (_) {\n        render?.resume();\n      },\n      child: widget.child,\n    );\n  }\n}\n\nclass AppEnvManager extends StatelessWidget {\n  final Widget child;\n\n  const AppEnvManager({super.key, required this.child});\n\n  @override\n  Widget build(BuildContext context) {\n    if (kDebugMode) {\n      if (globalState.isPre) {\n        return Banner(\n          message: 'DEBUG',\n          location: BannerLocation.topEnd,\n          child: child,\n        );\n      }\n    }\n    if (globalState.isPre) {\n      return Banner(\n        message: 'PRE',\n        location: BannerLocation.topEnd,\n        child: child,\n      );\n    }\n    return child;\n  }\n}\n\nclass AppSidebarContainer extends ConsumerWidget {\n  final Widget child;\n\n  const AppSidebarContainer({super.key, required this.child});\n\n  // Widget _buildLoading() {\n  //   return Consumer(\n  //     builder: (_, ref, _) {\n  //       final loading = ref.watch(loadingProvider);\n  //       final isMobileView = ref.watch(isMobileViewProvider);\n  //       return loading && !isMobileView\n  //           ? RotatedBox(\n  //               quarterTurns: 1,\n  //               child: const LinearProgressIndicator(),\n  //             )\n  //           : Container();\n  //     },\n  //   );\n  // }\n\n  Widget _buildBackground({\n    required BuildContext context,\n    required Widget child,\n  }) {\n    return Material(color: context.colorScheme.surfaceContainer, child: child);\n    // if (!system.isMacOS) {\n    //   return Material(\n    //     color: context.colorScheme.surfaceContainer,\n    //     child: child,\n    //   );\n    // }\n    // return child;\n    // return TransparentMacOSSidebar(\n    //   child: Material(color: Colors.transparent, child: child),\n    // );\n  }\n\n  void _updateSideBarWidth(WidgetRef ref, double contentWidth) {\n    WidgetsBinding.instance.addPostFrameCallback((_) {\n      ref.read(sideWidthProvider.notifier).value =\n          ref.read(viewSizeProvider.select((state) => state.width)) -\n          contentWidth;\n    });\n  }\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final navigationState = ref.watch(navigationStateProvider);\n    final navigationItems = navigationState.navigationItems;\n    final isMobileView = navigationState.viewMode == ViewMode.mobile;\n    if (isMobileView) {\n      return child;\n    }\n    final currentIndex = navigationState.currentIndex;\n    final showLabel = ref.watch(appSettingProvider).showLabel;\n    return Row(\n      children: [\n        _buildBackground(\n          context: context,\n          child: SafeArea(\n            child: Column(\n              crossAxisAlignment: CrossAxisAlignment.center,\n              children: [\n                if (system.isMacOS) SizedBox(height: 22),\n                SizedBox(height: 10),\n                if (!system.isMacOS) ...[\n                  ClipRect(child: AppIcon()),\n                  SizedBox(height: 12),\n                ],\n                Expanded(\n                  child: ScrollConfiguration(\n                    behavior: HiddenBarScrollBehavior(),\n                    child: Column(\n                      crossAxisAlignment: CrossAxisAlignment.start,\n                      children: [\n                        Expanded(\n                          child: NavigationRail(\n                            scrollable: true,\n                            minExtendedWidth: 200,\n                            backgroundColor: Colors.transparent,\n                            selectedLabelTextStyle: context\n                                .textTheme\n                                .labelLarge!\n                                .copyWith(color: context.colorScheme.onSurface),\n                            unselectedLabelTextStyle: context\n                                .textTheme\n                                .labelLarge!\n                                .copyWith(color: context.colorScheme.onSurface),\n                            destinations: navigationItems\n                                .map(\n                                  (e) => NavigationRailDestination(\n                                    icon: e.icon,\n                                    label: Text(Intl.message(e.label.name)),\n                                  ),\n                                )\n                                .toList(),\n                            onDestinationSelected: (index) {\n                              appController.toPage(\n                                navigationItems[index].label,\n                              );\n                            },\n                            extended: false,\n                            selectedIndex: currentIndex,\n                            labelType: showLabel\n                                ? NavigationRailLabelType.all\n                                : NavigationRailLabelType.none,\n                          ),\n                        ),\n                      ],\n                    ),\n                  ),\n                ),\n                const SizedBox(height: 16),\n                IconButton(\n                  onPressed: () {\n                    ref\n                        .read(appSettingProvider.notifier)\n                        .update(\n                          (state) =>\n                              state.copyWith(showLabel: !state.showLabel),\n                        );\n                  },\n                  icon: Icon(\n                    Icons.menu,\n                    color: context.colorScheme.onSurfaceVariant,\n                  ),\n                ),\n                const SizedBox(height: 16),\n              ],\n            ),\n          ),\n        ),\n        Expanded(\n          flex: 1,\n          child: ClipRect(\n            child: LayoutBuilder(\n              builder: (_, constraints) {\n                _updateSideBarWidth(ref, constraints.maxWidth);\n                return child;\n              },\n            ),\n          ),\n        ),\n      ],\n    );\n  }\n}\n"
  },
  {
    "path": "lib/manager/connectivity_manager.dart",
    "content": "import 'dart:async';\n\nimport 'package:connectivity_plus/connectivity_plus.dart';\nimport 'package:flutter/material.dart';\n\nclass ConnectivityManager extends StatefulWidget {\n  final Function(List<ConnectivityResult> results)? onConnectivityChanged;\n  final Widget child;\n\n  const ConnectivityManager({\n    super.key,\n    this.onConnectivityChanged,\n    required this.child,\n  });\n\n  @override\n  State<ConnectivityManager> createState() => _ConnectivityManagerState();\n}\n\nclass _ConnectivityManagerState extends State<ConnectivityManager> {\n  late StreamSubscription subscription;\n\n  @override\n  void initState() {\n    super.initState();\n    subscription = Connectivity().onConnectivityChanged.listen((results) async {\n      if (widget.onConnectivityChanged != null) {\n        widget.onConnectivityChanged!(results);\n      }\n    });\n  }\n\n  @override\n  void dispose() {\n    subscription.cancel();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return widget.child;\n  }\n}\n"
  },
  {
    "path": "lib/manager/core_manager.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/core/core.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/providers/app.dart';\nimport 'package:fl_clash/providers/config.dart';\nimport 'package:fl_clash/providers/state.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass CoreManager extends ConsumerStatefulWidget {\n  final Widget child;\n\n  const CoreManager({super.key, required this.child});\n\n  @override\n  ConsumerState<CoreManager> createState() => _CoreContainerState();\n}\n\nclass _CoreContainerState extends ConsumerState<CoreManager>\n    with CoreEventListener {\n  @override\n  Widget build(BuildContext context) {\n    return widget.child;\n  }\n\n  @override\n  void initState() {\n    super.initState();\n    coreEventManager.addListener(this);\n    ref.listenManual(\n      currentSetupStateProvider.select((state) => state?.profileId),\n      (prev, next) {\n        if (prev != next) {\n          appController.fullSetup();\n        }\n      },\n    );\n    ref.listenManual(updateParamsProvider, (prev, next) {\n      if (prev != next) {\n        appController.updateConfigDebounce();\n      }\n    });\n    ref.listenManual(appSettingProvider.select((state) => state.openLogs), (\n      prev,\n      next,\n    ) {\n      if (next) {\n        coreController.startLog();\n      } else {\n        coreController.stopLog();\n      }\n    }, fireImmediately: true);\n  }\n\n  @override\n  Future<void> dispose() async {\n    coreEventManager.removeListener(this);\n    super.dispose();\n  }\n\n  @override\n  Future<void> onDelay(Delay delay) async {\n    super.onDelay(delay);\n    appController.setDelay(delay);\n    debouncer.call(FunctionTag.updateDelay, () async {\n      appController.updateGroupsDebounce();\n    }, duration: const Duration(milliseconds: 5000));\n  }\n\n  @override\n  void onLog(Log log) {\n    ref.read(logsProvider.notifier).addLog(log);\n    if (log.logLevel == LogLevel.error) {\n      globalState.showNotifier(log.payload);\n    }\n    super.onLog(log);\n  }\n\n  @override\n  void onRequest(TrackerInfo trackerInfo) async {\n    ref.read(requestsProvider.notifier).addRequest(trackerInfo);\n    super.onRequest(trackerInfo);\n  }\n\n  @override\n  Future<void> onLoaded(String providerName) async {\n    ref\n        .read(providersProvider.notifier)\n        .setProvider(await coreController.getExternalProvider(providerName));\n    debouncer.call(FunctionTag.loadedProvider, () async {\n      appController.updateGroupsDebounce();\n    }, duration: const Duration(milliseconds: 5000));\n    super.onLoaded(providerName);\n  }\n\n  @override\n  Future<void> onCrash(String message) async {\n    if (ref.read(coreStatusProvider) != CoreStatus.connected) {\n      return;\n    }\n    ref.read(coreStatusProvider.notifier).value = CoreStatus.disconnected;\n    if (WidgetsBinding.instance.lifecycleState == AppLifecycleState.resumed) {\n      context.showNotifier(message);\n    }\n    await coreController.shutdown(false);\n    super.onCrash(message);\n  }\n}\n"
  },
  {
    "path": "lib/manager/hotkey_manager.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/common.dart';\nimport 'package:fl_clash/providers/config.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/services.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:hotkey_manager/hotkey_manager.dart';\n\nclass HotKeyManager extends ConsumerStatefulWidget {\n  final Widget child;\n\n  const HotKeyManager({super.key, required this.child});\n\n  @override\n  ConsumerState<HotKeyManager> createState() => _HotKeyManagerState();\n}\n\nclass _HotKeyManagerState extends ConsumerState<HotKeyManager> {\n  @override\n  void initState() {\n    super.initState();\n    ref.listenManual(hotKeyActionsProvider, (prev, next) {\n      if (!hotKeyActionListEquality.equals(prev, next)) {\n        _updateHotKeys(hotKeyActions: next);\n      }\n    }, fireImmediately: true);\n  }\n\n  Future<void> _handleHotKeyAction(HotAction action) async {\n    switch (action) {\n      case HotAction.mode:\n        appController.updateMode();\n      case HotAction.start:\n        appController.updateStart();\n      case HotAction.view:\n        appController.updateVisible();\n      case HotAction.proxy:\n        appController.updateSystemProxy();\n      case HotAction.tun:\n        appController.updateTun();\n    }\n  }\n\n  Future<void> _updateHotKeys({\n    required List<HotKeyAction> hotKeyActions,\n  }) async {\n    await hotKeyManager.unregisterAll();\n    final hotkeyActionHandles = hotKeyActions\n        .where((hotKeyAction) {\n          return hotKeyAction.key != null && hotKeyAction.modifiers.isNotEmpty;\n        })\n        .map<Future>((hotKeyAction) async {\n          final modifiers = hotKeyAction.modifiers\n              .map((item) => item.toHotKeyModifier())\n              .toList();\n          final hotKey = HotKey(\n            key: PhysicalKeyboardKey(hotKeyAction.key!),\n            modifiers: modifiers,\n          );\n          return await hotKeyManager.register(\n            hotKey,\n            keyDownHandler: (_) {\n              _handleHotKeyAction(hotKeyAction.action);\n            },\n          );\n        });\n    await Future.wait(hotkeyActionHandles);\n  }\n\n  Shortcuts _buildShortcuts(Widget child) {\n    return Shortcuts(\n      shortcuts: {\n        utils.controlSingleActivator(LogicalKeyboardKey.keyW):\n            CloseWindowIntent(),\n      },\n      child: Actions(\n        actions: {\n          CloseWindowIntent: CallbackAction<CloseWindowIntent>(\n            onInvoke: (_) => appController.handleBackOrExit(),\n          ),\n          DoNothingIntent: CallbackAction<DoNothingIntent>(\n            onInvoke: (_) => null,\n          ),\n        },\n        child: child,\n      ),\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return _buildShortcuts(widget.child);\n  }\n}\n"
  },
  {
    "path": "lib/manager/manager.dart",
    "content": "export 'android_manager.dart';\nexport 'app_manager.dart';\nexport 'connectivity_manager.dart';\nexport 'core_manager.dart';\nexport 'proxy_manager.dart';\nexport 'status_manager.dart';\nexport 'theme_manager.dart';\nexport 'tile_manager.dart';\nexport 'tray_manager.dart';\nexport 'vpn_manager.dart';\nexport 'window_manager.dart';\n"
  },
  {
    "path": "lib/manager/proxy_manager.dart",
    "content": "import 'package:fl_clash/common/proxy.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/providers/state.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass ProxyManager extends ConsumerStatefulWidget {\n  final Widget child;\n\n  const ProxyManager({super.key, required this.child});\n\n  @override\n  ConsumerState createState() => _ProxyManagerState();\n}\n\nclass _ProxyManagerState extends ConsumerState<ProxyManager> {\n  Future<void> _updateProxy(ProxyState proxyState) async {\n    final isStart = proxyState.isStart;\n    final systemProxy = proxyState.systemProxy;\n    final port = proxyState.port;\n    if (isStart && systemProxy) {\n      proxy?.startProxy(port, proxyState.bassDomain);\n    } else {\n      proxy?.stopProxy();\n    }\n  }\n\n  @override\n  void initState() {\n    super.initState();\n    ref.listenManual(\n      proxyStateProvider,\n      (prev, next) {\n        if (prev != next) {\n          _updateProxy(next);\n        }\n      },\n      fireImmediately: true,\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return widget.child;\n  }\n}\n"
  },
  {
    "path": "lib/manager/status_manager.dart",
    "content": "import 'dart:async';\nimport 'dart:collection';\nimport 'dart:math';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/widgets/fade_box.dart';\nimport 'package:fl_clash/widgets/theme.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass StatusManager extends StatefulWidget {\n  final Widget child;\n\n  const StatusManager({super.key, required this.child});\n\n  @override\n  State<StatusManager> createState() => StatusManagerState();\n}\n\nclass StatusManagerState extends State<StatusManager> {\n  final _messagesNotifier = ValueNotifier<List<CommonMessage>>([]);\n  final _bufferMessages = Queue<CommonMessage>();\n  final _activeTimers = <String, Timer>{};\n  bool _isDisplayingMessage = false;\n\n  @override\n  void initState() {\n    super.initState();\n  }\n\n  @override\n  void dispose() {\n    _messagesNotifier.dispose();\n    for (final timer in _activeTimers.values) {\n      timer.cancel();\n    }\n    _activeTimers.clear();\n    _bufferMessages.clear();\n    super.dispose();\n  }\n\n  void message(String text, {MessageActionState? actionState}) {\n    final commonMessage = CommonMessage(\n      id: utils.uuidV4,\n      text: text,\n      actionState: actionState,\n    );\n    _bufferMessages.add(commonMessage);\n    commonPrint.log('message: $text');\n    _processQueue();\n  }\n\n  void _cancelMessage(String id) {\n    _bufferMessages.removeWhere((msg) => msg.id == id);\n    if (_activeTimers.containsKey(id)) {\n      _removeMessage(id);\n    }\n  }\n\n  void _processQueue() {\n    if (_isDisplayingMessage || _bufferMessages.isEmpty) {\n      return;\n    }\n    _isDisplayingMessage = true;\n    final message = _bufferMessages.removeFirst();\n    _messagesNotifier.value = List.from(_messagesNotifier.value)..add(message);\n    final timer = Timer(message.duration, () {\n      _removeMessage(message.id);\n    });\n    _activeTimers[message.id] = timer;\n  }\n\n  void _removeMessage(String id) {\n    _activeTimers.remove(id)?.cancel();\n    final currentMessages = List<CommonMessage>.from(_messagesNotifier.value);\n    currentMessages.removeWhere((msg) => msg.id == id);\n    _messagesNotifier.value = currentMessages;\n    _isDisplayingMessage = false;\n    _processQueue();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Stack(\n      children: [\n        widget.child,\n        Consumer(\n          builder: (_, ref, child) {\n            final top = ref.watch(overlayTopOffsetProvider);\n            return Container(\n              margin: EdgeInsets.only(\n                top: top + MediaQuery.of(context).viewPadding.top + 8,\n              ),\n              child: child,\n            );\n          },\n          child: Column(\n            mainAxisAlignment: MainAxisAlignment.start,\n            crossAxisAlignment: CrossAxisAlignment.end,\n            mainAxisSize: MainAxisSize.min,\n            children: [\n              Padding(\n                padding: EdgeInsets.symmetric(horizontal: 12),\n                child: AnimatedSize(\n                  duration: animateDuration,\n                  child: ValueListenableBuilder(\n                    valueListenable: _messagesNotifier,\n                    builder: (_, messages, _) {\n                      return FadeThroughBox(\n                        alignment: Alignment.centerRight,\n                        child: messages.isEmpty\n                            ? SizedBox()\n                            : LayoutBuilder(\n                                key: Key(messages.last.id),\n                                builder: (_, constraints) {\n                                  return Dismissible(\n                                    key: ValueKey(messages.last.id),\n                                    onDismissed: (_) {\n                                      _cancelMessage(messages.last.id);\n                                    },\n                                    child: Card(\n                                      shape: const RoundedSuperellipseBorder(\n                                        borderRadius: BorderRadius.all(\n                                          Radius.circular(14),\n                                        ),\n                                      ),\n                                      elevation: 10,\n                                      color: context\n                                          .colorScheme\n                                          .surfaceContainerHigh,\n                                      child: Container(\n                                        width: min(constraints.maxWidth, 500),\n                                        constraints: BoxConstraints(\n                                          minHeight: 54,\n                                        ),\n                                        padding: EdgeInsets.symmetric(\n                                          horizontal: 16,\n                                          vertical: 8,\n                                        ),\n                                        child: Row(\n                                          mainAxisAlignment:\n                                              MainAxisAlignment.spaceBetween,\n                                          children: [\n                                            Flexible(\n                                              child: Text(\n                                                messages.last.text,\n                                                maxLines: 3,\n                                                style: context\n                                                    .textTheme\n                                                    .labelLarge\n                                                    ?.copyWith(\n                                                      color: context\n                                                          .colorScheme\n                                                          .onSurfaceVariant,\n                                                    ),\n                                                overflow: TextOverflow.ellipsis,\n                                              ),\n                                            ),\n                                            SizedBox(width: 16),\n                                            if (messages.last.actionState !=\n                                                null)\n                                              CommonMinFilledButtonTheme(\n                                                child: FilledButton.tonal(\n                                                  onPressed: () async {\n                                                    _cancelMessage(\n                                                      messages.last.id,\n                                                    );\n                                                    messages.last.actionState!\n                                                        .action();\n                                                  },\n                                                  child: Text(\n                                                    messages\n                                                        .last\n                                                        .actionState!\n                                                        .actionText,\n                                                  ),\n                                                ),\n                                              ),\n                                          ],\n                                        ),\n                                      ),\n                                    ),\n                                  );\n                                },\n                              ),\n                      );\n                    },\n                  ),\n                ),\n              ),\n              // LoadingIndicator(),\n            ],\n          ),\n        ),\n      ],\n    );\n  }\n}\n\n// class LoadingIndicator extends ConsumerWidget {\n//   const LoadingIndicator({super.key});\n//\n//   @override\n//   Widget build(BuildContext context, ref) {\n//     final loading = ref.watch(loadingProvider);\n//     final isMobileView = ref.watch(isMobileViewProvider);\n//     return AnimatedSwitcher(\n//       switchInCurve: Curves.easeIn,\n//       switchOutCurve: Curves.easeOut,\n//       duration: midDuration,\n//       transitionBuilder: (Widget child, Animation<double> animation) {\n//         return SlideTransition(\n//           position: Tween<Offset>(\n//             begin: const Offset(1, 0),\n//             end: Offset.zero,\n//           ).animate(animation),\n//           child: child,\n//         );\n//       },\n//       child: loading && isMobileView\n//           ? Container(\n//               height: 54,\n//               margin: EdgeInsets.only(top: 8, left: 14, right: 14),\n//               child: Material(\n//                 elevation: 3,\n//                 color: context.colorScheme.surfaceContainer,\n//                 surfaceTintColor: context.colorScheme.surfaceTint,\n//                 shape: const RoundedSuperellipseBorder(\n//                   borderRadius: BorderRadius.all(Radius.circular(14)),\n//                 ),\n//                 child: Padding(\n//                   padding: EdgeInsets.symmetric(horizontal: 16),\n//                   child: Row(\n//                     mainAxisSize: MainAxisSize.min,\n//                     spacing: 12,\n//                     mainAxisAlignment: MainAxisAlignment.spaceBetween,\n//                     children: [\n//                       Flexible(\n//                         child: Text(\n//                           context.appLocalizations.loading,\n//                           style: context.textTheme.labelLarge?.copyWith(\n//                             color: context.colorScheme.onSurfaceVariant,\n//                           ),\n//                         ),\n//                       ),\n//                       SizedBox(\n//                         height: 32,\n//                         width: 32,\n//                         child: CommonCircleLoading(),\n//                       ),\n//                     ],\n//                   ),\n//                 ),\n//               ),\n//             )\n//           : SizedBox(),\n//     );\n//   }\n// }\n"
  },
  {
    "path": "lib/manager/theme_manager.dart",
    "content": "import 'dart:math';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/common/theme.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/providers/app.dart';\nimport 'package:fl_clash/providers/config.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/services.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nimport '../providers/state.dart';\n\nclass ThemeManager extends ConsumerWidget {\n  final Widget child;\n\n  const ThemeManager({super.key, required this.child});\n\n  Widget _buildSystemUi(Widget child) {\n    if (!system.isAndroid) {\n      return child;\n    }\n    return AnnotatedRegion<SystemUiMode>(\n      sized: false,\n      value: SystemUiMode.edgeToEdge,\n      child: Consumer(\n        builder: (context, ref, _) {\n          final brightness = ref.watch(currentBrightnessProvider);\n          final iconBrightness = brightness == Brightness.light\n              ? Brightness.dark\n              : Brightness.light;\n          WidgetsBinding.instance.addPostFrameCallback((_) {\n            ref\n                .read(systemUiOverlayStyleStateProvider.notifier)\n                .update(\n                  (state) => state.copyWith(\n                    statusBarColor: Colors.transparent,\n                    statusBarIconBrightness: iconBrightness,\n                    systemNavigationBarIconBrightness: iconBrightness,\n                    systemNavigationBarColor: context.colorScheme.surface,\n                    systemNavigationBarDividerColor: Colors.transparent,\n                  ),\n                );\n          });\n          return AnnotatedRegion<SystemUiOverlayStyle>(\n            value: SystemUiOverlayStyle(\n              statusBarColor: Colors.transparent,\n              statusBarIconBrightness: iconBrightness,\n              systemNavigationBarIconBrightness: iconBrightness,\n              systemNavigationBarColor: context.colorScheme.surface,\n              systemNavigationBarDividerColor: Colors.transparent,\n            ),\n            sized: false,\n            child: child,\n          );\n        },\n      ),\n    );\n  }\n\n  // _buildScrollbar(Widget child) {\n  //   return Consumer(\n  //     builder: (_, ref, child) {\n  //       final isMobileView = ref.read(isMobileViewProvider);\n  //       if (isMobileView) {\n  //         return ScrollConfiguration(\n  //           behavior: HiddenBarScrollBehavior(),\n  //           child: child!,\n  //         );\n  //       }\n  //       return child!;\n  //     },\n  //     child: child,\n  //   );\n  // }\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final textScale = ref.read(\n      themeSettingProvider.select((state) => state.textScale),\n    );\n    final double textScaleFactor = max(\n      min(\n        textScale.enable ? textScale.scale : defaultTextScaleFactor,\n        maxTextScale,\n      ),\n      minTextScale,\n    );\n\n    globalState.measure = Measure.of(context, textScaleFactor);\n    globalState.theme = CommonTheme.of(context, textScaleFactor);\n    final padding = MediaQuery.of(context).padding;\n    final height = MediaQuery.of(context).size.height;\n    return MediaQuery(\n      data: MediaQuery.of(context).copyWith(\n        textScaler: TextScaler.linear(textScaleFactor),\n        padding: padding.copyWith(\n          top: padding.top > height * 0.3 ? 20.0 : padding.top,\n        ),\n      ),\n      child: Theme(\n        data: Theme.of(context).copyWith(\n          floatingActionButtonTheme: Theme.of(context).floatingActionButtonTheme\n              .copyWith(\n                shape: const RoundedSuperellipseBorder(\n                  borderRadius: BorderRadius.all(Radius.circular(16.0)),\n                ),\n              ),\n        ),\n        child: LayoutBuilder(\n          builder: (_, container) {\n            appController.updateViewSize(\n              Size(container.maxWidth, container.maxHeight),\n            );\n            return _buildSystemUi(child);\n          },\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/manager/tile_manager.dart",
    "content": "import 'package:fl_clash/common/app_localizations.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/core/controller.dart';\nimport 'package:fl_clash/plugins/app.dart';\nimport 'package:fl_clash/plugins/tile.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass TileManager extends ConsumerStatefulWidget {\n  final Widget child;\n\n  const TileManager({super.key, required this.child});\n\n  @override\n  ConsumerState<TileManager> createState() => _TileContainerState();\n}\n\nclass _TileContainerState extends ConsumerState<TileManager> with TileListener {\n  @override\n  Widget build(BuildContext context) {\n    return widget.child;\n  }\n\n  bool get isStart => ref.read(isStartProvider);\n\n  @override\n  Future<void> onStart() async {\n    if (isStart && coreController.isCompleted) {\n      return;\n    }\n    appController.updateStatus(true);\n    app?.tip(appLocalizations.startVpn);\n    super.onStart();\n  }\n\n  @override\n  Future<void> onStop() async {\n    if (!isStart) {\n      return;\n    }\n    appController.updateStatus(false);\n    app?.tip(appLocalizations.stopVpn);\n    super.onStop();\n  }\n\n  @override\n  void initState() {\n    super.initState();\n    tile?.addListener(this);\n  }\n\n  @override\n  void dispose() {\n    tile?.removeListener(this);\n    super.dispose();\n  }\n}\n"
  },
  {
    "path": "lib/manager/tray_manager.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/providers/state.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:tray_manager/tray_manager.dart';\n\nclass TrayManager extends ConsumerStatefulWidget {\n  final Widget child;\n\n  const TrayManager({super.key, required this.child});\n\n  @override\n  ConsumerState<TrayManager> createState() => _TrayContainerState();\n}\n\nclass _TrayContainerState extends ConsumerState<TrayManager> with TrayListener {\n  @override\n  void initState() {\n    super.initState();\n    trayManager.addListener(this);\n    ref.listenManual(trayStateProvider, (prev, next) {\n      if (prev != next) {\n        appController.updateTray();\n      }\n    });\n    if (system.isMacOS) {\n      ref.listenManual(trayTitleStateProvider, (prev, next) {\n        if (prev != next) {\n          tray?.updateTrayTitle(\n            showTrayTitle: next.showTrayTitle,\n            traffic: next.traffic,\n          );\n        }\n      });\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return widget.child;\n  }\n\n  @override\n  void onTrayIconRightMouseDown() {\n    // ignore: deprecated_member_use\n    trayManager.popUpContextMenu(bringAppToFront: true);\n  }\n\n  @override\n  void onTrayMenuItemClick(MenuItem menuItem) {\n    render?.active();\n    super.onTrayMenuItemClick(menuItem);\n  }\n\n  @override\n  onTrayIconMouseDown() {\n    window?.show();\n  }\n\n  @override\n  dispose() {\n    trayManager.removeListener(this);\n    super.dispose();\n  }\n}\n"
  },
  {
    "path": "lib/manager/vpn_manager.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/providers/state.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass VpnManager extends ConsumerStatefulWidget {\n  final Widget child;\n\n  const VpnManager({super.key, required this.child});\n\n  @override\n  ConsumerState<VpnManager> createState() => _VpnContainerState();\n}\n\nclass _VpnContainerState extends ConsumerState<VpnManager> {\n  @override\n  void initState() {\n    super.initState();\n    ref.listenManual(vpnStateProvider, (prev, next) {\n      if (prev != next) {\n        showTip(next);\n      }\n    });\n  }\n\n  void showTip(VpnState state) {\n    throttler.call(\n      FunctionTag.vpnTip,\n      () {\n        if (!ref.read(isStartProvider) || state == globalState.lastVpnState) {\n          return;\n        }\n        globalState.showNotifier(\n          appLocalizations.vpnConfigChangeDetected,\n          actionState: MessageActionState(\n            actionText: appLocalizations.restart,\n            action: () async {\n              await globalState.handleStop();\n              await appController.updateStatus(true);\n            },\n          ),\n        );\n      },\n      duration: const Duration(seconds: 6),\n      fire: true,\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return widget.child;\n  }\n}\n"
  },
  {
    "path": "lib/manager/window_manager.dart",
    "content": "import 'dart:async';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:window_ext/window_ext.dart';\nimport 'package:window_manager/window_manager.dart';\n\nclass WindowManager extends ConsumerStatefulWidget {\n  final Widget child;\n\n  const WindowManager({super.key, required this.child});\n\n  @override\n  ConsumerState<WindowManager> createState() => _WindowContainerState();\n}\n\nclass _WindowContainerState extends ConsumerState<WindowManager>\n    with WindowListener, WindowExtListener {\n  @override\n  Widget build(BuildContext context) {\n    return widget.child;\n  }\n\n  @override\n  void initState() {\n    super.initState();\n    ref.listenManual(appSettingProvider.select((state) => state.autoLaunch), (\n      prev,\n      next,\n    ) {\n      if (prev != next) {\n        debouncer.call(FunctionTag.autoLaunch, () {\n          autoLaunch?.updateStatus(next);\n        });\n      }\n    });\n    windowExtManager.addListener(this);\n    windowManager.addListener(this);\n  }\n\n  @override\n  void onWindowClose() async {\n    await appController.handleBackOrExit();\n    super.onWindowClose();\n  }\n\n  @override\n  void onWindowFocus() {\n    super.onWindowFocus();\n    commonPrint.log('focus');\n    render?.resume();\n  }\n\n  @override\n  Future<void> onShouldTerminate() async {\n    await appController.handleExit();\n    super.onShouldTerminate();\n  }\n\n  @override\n  void onWindowMoved() {\n    super.onWindowMoved();\n    windowManager.getPosition().then((offset) {\n      ref.read(windowSettingProvider.notifier);\n      // .update((state) => state.copyWith(top: offset.dy, left: offset.dx));\n    });\n  }\n\n  @override\n  Future<void> onWindowResized() async {\n    super.onWindowResized();\n    final size = await windowManager.getSize();\n    ref\n        .read(windowSettingProvider.notifier)\n        .update(\n          (state) => state.copyWith(width: size.width, height: size.height),\n        );\n  }\n\n  @override\n  void onWindowMinimize() async {\n    appController.savePreferencesDebounce();\n    commonPrint.log('minimize');\n    render?.pause();\n    super.onWindowMinimize();\n  }\n\n  @override\n  void onWindowRestore() {\n    commonPrint.log('restore');\n    render?.resume();\n    super.onWindowRestore();\n  }\n\n  @override\n  Future<void> dispose() async {\n    windowManager.removeListener(this);\n    windowExtManager.removeListener(this);\n    super.dispose();\n  }\n}\n\nclass WindowHeaderContainer extends StatelessWidget {\n  final Widget child;\n\n  const WindowHeaderContainer({super.key, required this.child});\n\n  @override\n  Widget build(BuildContext context) {\n    return Consumer(\n      builder: (_, ref, child) {\n        final isMobileView = ref.watch(isMobileViewProvider);\n        final version = ref.watch(versionProvider);\n        if ((version <= 10 || !isMobileView) && system.isMacOS) {\n          return child!;\n        }\n        return Stack(\n          children: [\n            Column(\n              children: [\n                SizedBox(height: kHeaderHeight),\n                Expanded(flex: 1, child: child!),\n              ],\n            ),\n            const WindowHeader(),\n          ],\n        );\n      },\n      child: child,\n    );\n  }\n}\n\nclass WindowHeader extends StatefulWidget {\n  const WindowHeader({super.key});\n\n  @override\n  State<WindowHeader> createState() => _WindowHeaderState();\n}\n\nclass _WindowHeaderState extends State<WindowHeader> {\n  final isMaximizedNotifier = ValueNotifier<bool>(false);\n  final isPinNotifier = ValueNotifier<bool>(false);\n\n  @override\n  void initState() {\n    super.initState();\n    _initNotifier();\n  }\n\n  Future<void> _initNotifier() async {\n    isMaximizedNotifier.value = await windowManager.isMaximized();\n    isPinNotifier.value = await windowManager.isAlwaysOnTop();\n  }\n\n  @override\n  void dispose() {\n    isMaximizedNotifier.dispose();\n    isPinNotifier.dispose();\n    super.dispose();\n  }\n\n  Future<void> _updateMaximized() async {\n    final isMaximized = await windowManager.isMaximized();\n    switch (isMaximized) {\n      case true:\n        await windowManager.unmaximize();\n        break;\n      case false:\n        await windowManager.maximize();\n        break;\n    }\n    isMaximizedNotifier.value = await windowManager.isMaximized();\n  }\n\n  Future<void> _updatePin() async {\n    final isAlwaysOnTop = await windowManager.isAlwaysOnTop();\n    await windowManager.setAlwaysOnTop(!isAlwaysOnTop);\n    isPinNotifier.value = await windowManager.isAlwaysOnTop();\n  }\n\n  Widget _buildActions() {\n    return Row(\n      children: [\n        IconButton(\n          onPressed: () async {\n            _updatePin();\n          },\n          icon: ValueListenableBuilder(\n            valueListenable: isPinNotifier,\n            builder: (_, value, _) {\n              return value\n                  ? const Icon(Icons.push_pin)\n                  : const Icon(Icons.push_pin_outlined);\n            },\n          ),\n        ),\n        IconButton(\n          onPressed: () {\n            windowManager.minimize();\n          },\n          icon: const Icon(Icons.remove),\n        ),\n        IconButton(\n          onPressed: () async {\n            _updateMaximized();\n          },\n          icon: ValueListenableBuilder(\n            valueListenable: isMaximizedNotifier,\n            builder: (_, value, _) {\n              return value\n                  ? const Icon(Icons.filter_none, size: 20)\n                  : const Icon(Icons.crop_square);\n            },\n          ),\n        ),\n        IconButton(\n          onPressed: () {\n            appController.handleBackOrExit();\n          },\n          icon: const Icon(Icons.close),\n        ),\n        // const SizedBox(\n        //   width: 8,\n        // ),\n      ],\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Material(\n      child: Stack(\n        alignment: AlignmentDirectional.center,\n        children: [\n          Positioned(\n            child: GestureDetector(\n              onPanStart: (_) {\n                windowManager.startDragging();\n              },\n              onDoubleTap: () {\n                _updateMaximized();\n              },\n              child: Container(\n                color: context.colorScheme.secondary.opacity15,\n                alignment: Alignment.centerLeft,\n                height: kHeaderHeight,\n              ),\n            ),\n          ),\n          if (system.isMacOS)\n            const Text(appName)\n          else ...[\n            Positioned(right: 0, child: _buildActions()),\n          ],\n        ],\n      ),\n    );\n  }\n}\n\nclass AppIcon extends StatelessWidget {\n  const AppIcon({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Container(\n      decoration: ShapeDecoration(\n        color: context.colorScheme.surfaceContainerHighest,\n        shape: RoundedSuperellipseBorder(\n          borderRadius: BorderRadius.circular(14),\n        ),\n      ),\n      padding: EdgeInsets.all(8),\n      child: Transform.translate(\n        offset: Offset(0, -1),\n        child: Image.asset('assets/images/icon.png', width: 34, height: 34),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/models/app.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:flutter/services.dart';\nimport 'package:freezed_annotation/freezed_annotation.dart';\n\nimport 'common.dart';\nimport 'core.dart';\n\npart 'generated/app.freezed.dart';\n\ntypedef DelayMap = Map<String, Map<String, int?>>;\n\n@freezed\nabstract class AppState with _$AppState {\n  const factory AppState({\n    @Default(false) bool isInit,\n    @Default(false) bool backBlock,\n    @Default(PageLabel.dashboard) PageLabel pageLabel,\n    @Default([]) List<Package> packages,\n    @Default(0) int sortNum,\n    required Size viewSize,\n    @Default(0) double sideWidth,\n    @Default({}) DelayMap delayMap,\n    @Default([]) List<Group> groups,\n    @Default(0) int checkIpNum,\n    required Brightness brightness,\n    int? runTime,\n    @Default([]) List<ExternalProvider> providers,\n    String? localIp,\n    required FixedList<TrackerInfo> requests,\n    required int version,\n    required FixedList<Log> logs,\n    required FixedList<Traffic> traffics,\n    required Traffic totalTraffic,\n    @Default(false) bool realTunEnable,\n    @Default(false) bool loading,\n    required SystemUiOverlayStyle systemUiOverlayStyle,\n    @Default(CoreStatus.connecting) CoreStatus coreStatus,\n  }) = _AppState;\n}\n\nextension AppStateExt on AppState {\n  ViewMode get viewMode => utils.getViewMode(viewSize.width);\n\n  bool get isStart => runTime != null;\n}\n"
  },
  {
    "path": "lib/models/clash_config.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:freezed_annotation/freezed_annotation.dart';\n\npart 'generated/clash_config.freezed.dart';\npart 'generated/clash_config.g.dart';\n\nconst defaultClashConfig = ClashConfig();\n\nconst defaultTun = Tun();\nconst defaultDns = Dns();\nconst defaultGeoXUrl = GeoXUrl();\n\nconst defaultMixedPort = 7890;\nconst defaultKeepAliveInterval = 30;\n\nconst defaultBypassPrivateRouteAddress = [\n  '1.0.0.0/8',\n  '2.0.0.0/7',\n  '4.0.0.0/6',\n  '8.0.0.0/7',\n  '11.0.0.0/8',\n  '12.0.0.0/6',\n  '16.0.0.0/4',\n  '32.0.0.0/3',\n  '64.0.0.0/3',\n  '96.0.0.0/4',\n  '112.0.0.0/5',\n  '120.0.0.0/6',\n  '124.0.0.0/7',\n  '126.0.0.0/8',\n  '128.0.0.0/3',\n  '160.0.0.0/5',\n  '168.0.0.0/8',\n  '169.0.0.0/9',\n  '169.128.0.0/10',\n  '169.192.0.0/11',\n  '169.224.0.0/12',\n  '169.240.0.0/13',\n  '169.248.0.0/14',\n  '169.252.0.0/15',\n  '169.255.0.0/16',\n  '170.0.0.0/7',\n  '172.0.0.0/12',\n  '172.32.0.0/11',\n  '172.64.0.0/10',\n  '172.128.0.0/9',\n  '173.0.0.0/8',\n  '174.0.0.0/7',\n  '176.0.0.0/4',\n  '192.0.0.0/9',\n  '192.128.0.0/11',\n  '192.160.0.0/13',\n  '192.169.0.0/16',\n  '192.170.0.0/15',\n  '192.172.0.0/14',\n  '192.176.0.0/12',\n  '192.192.0.0/10',\n  '193.0.0.0/8',\n  '194.0.0.0/7',\n  '196.0.0.0/6',\n  '200.0.0.0/5',\n  '208.0.0.0/4',\n  '240.0.0.0/5',\n  '248.0.0.0/6',\n  '252.0.0.0/7',\n  '254.0.0.0/8',\n  '255.0.0.0/9',\n  '255.128.0.0/10',\n  '255.192.0.0/11',\n  '255.224.0.0/12',\n  '255.240.0.0/13',\n  '255.248.0.0/14',\n  '255.252.0.0/15',\n  '255.254.0.0/16',\n  '255.255.0.0/17',\n  '255.255.128.0/18',\n  '255.255.192.0/19',\n  '255.255.224.0/20',\n  '255.255.240.0/21',\n  '255.255.248.0/22',\n  '255.255.252.0/23',\n  '255.255.254.0/24',\n  '255.255.255.0/25',\n  '255.255.255.128/26',\n  '255.255.255.192/27',\n  '255.255.255.224/28',\n  '255.255.255.240/29',\n  '255.255.255.248/30',\n  '255.255.255.252/31',\n  '255.255.255.254/32',\n  '::/1',\n  '8000::/2',\n  'c000::/3',\n  'e000::/4',\n  'f000::/5',\n  'f800::/6',\n  'fe00::/9',\n  'fec0::/10',\n];\n\n@freezed\nabstract class ProxyGroup with _$ProxyGroup {\n  const factory ProxyGroup({\n    required String name,\n    @JsonKey(fromJson: GroupType.parseProfileType) required GroupType type,\n    List<String>? proxies,\n    List<String>? use,\n    int? interval,\n    bool? lazy,\n    String? url,\n    int? timeout,\n    @JsonKey(name: 'max-failed-times') int? maxFailedTimes,\n    String? filter,\n    @JsonKey(name: 'expected-filter') String? excludeFilter,\n    @JsonKey(name: 'exclude-type') String? excludeType,\n    @JsonKey(name: 'expected-status') dynamic expectedStatus,\n    bool? hidden,\n    String? icon,\n  }) = _ProxyGroup;\n\n  factory ProxyGroup.fromJson(Map<String, Object?> json) =>\n      _$ProxyGroupFromJson(json);\n}\n\n@freezed\nabstract class RuleProvider with _$RuleProvider {\n  const factory RuleProvider({required String name}) = _RuleProvider;\n\n  factory RuleProvider.fromJson(Map<String, Object?> json) =>\n      _$RuleProviderFromJson(json);\n}\n\n@freezed\nabstract class Sniffer with _$Sniffer {\n  const factory Sniffer({\n    @Default(false) bool enable,\n    @Default(true) @JsonKey(name: 'override-destination') bool overrideDest,\n    @Default([]) List<String> sniffing,\n    @Default([]) @JsonKey(name: 'force-domain') List<String> forceDomain,\n    @Default([]) @JsonKey(name: 'skip-src-address') List<String> skipSrcAddress,\n    @Default([]) @JsonKey(name: 'skip-dst-address') List<String> skipDstAddress,\n    @Default([]) @JsonKey(name: 'skip-domain') List<String> skipDomain,\n    @Default([]) @JsonKey(name: 'port-whitelist') List<String> port,\n    @Default(true) @JsonKey(name: 'force-dns-mapping') bool forceDnsMapping,\n    @Default(true) @JsonKey(name: 'parse-pure-ip') bool parsePureIp,\n    @Default({}) Map<String, SnifferConfig> sniff,\n  }) = _Sniffer;\n\n  factory Sniffer.fromJson(Map<String, Object?> json) =>\n      _$SnifferFromJson(json);\n}\n\nList<String> _formJsonPorts(List? ports) {\n  return ports?.map((item) => item.toString()).toList() ?? [];\n}\n\n@freezed\nabstract class SnifferConfig with _$SnifferConfig {\n  const factory SnifferConfig({\n    @Default([]) @JsonKey(fromJson: _formJsonPorts) List<String> ports,\n    @JsonKey(name: 'override-destination') bool? overrideDest,\n  }) = _SnifferConfig;\n\n  factory SnifferConfig.fromJson(Map<String, Object?> json) =>\n      _$SnifferConfigFromJson(json);\n}\n\n@freezed\nabstract class Tun with _$Tun {\n  const factory Tun({\n    @Default(false) bool enable,\n    @Default(appName) String device,\n    @JsonKey(name: 'auto-route') @Default(false) bool autoRoute,\n    @Default(TunStack.mixed) TunStack stack,\n    @JsonKey(name: 'dns-hijack') @Default(['any:53']) List<String> dnsHijack,\n    @JsonKey(name: 'route-address') @Default([]) List<String> routeAddress,\n  }) = _Tun;\n\n  factory Tun.fromJson(Map<String, Object?> json) => _$TunFromJson(json);\n\n  factory Tun.safeFormJson(Map<String, Object?>? json) {\n    if (json == null) {\n      return defaultTun;\n    }\n    try {\n      return Tun.fromJson(json);\n    } catch (_) {\n      return defaultTun;\n    }\n  }\n}\n\nextension TunExt on Tun {\n  Tun getRealTun(RouteMode routeMode) {\n    final mRouteAddress = routeMode == RouteMode.bypassPrivate\n        ? defaultBypassPrivateRouteAddress\n        : routeAddress;\n    return switch (system.isDesktop) {\n      true => copyWith(autoRoute: true, routeAddress: []),\n      false => copyWith(\n        autoRoute: mRouteAddress.isEmpty ? true : false,\n        routeAddress: mRouteAddress,\n      ),\n    };\n  }\n}\n\n@freezed\nabstract class FallbackFilter with _$FallbackFilter {\n  const factory FallbackFilter({\n    @Default(true) bool geoip,\n    @Default('CN') @JsonKey(name: 'geoip-code') String geoipCode,\n    @Default(['gfw']) List<String> geosite,\n    @Default(['240.0.0.0/4']) List<String> ipcidr,\n    @Default(['+.google.com', '+.facebook.com', '+.youtube.com'])\n    List<String> domain,\n  }) = _FallbackFilter;\n\n  factory FallbackFilter.fromJson(Map<String, Object?> json) =>\n      _$FallbackFilterFromJson(json);\n}\n\n@freezed\nabstract class Dns with _$Dns {\n  const factory Dns({\n    @Default(true) bool enable,\n    @Default('0.0.0.0:1053') String listen,\n    @Default(false) @JsonKey(name: 'prefer-h3') bool preferH3,\n    @Default(true) @JsonKey(name: 'use-hosts') bool useHosts,\n    @Default(true) @JsonKey(name: 'use-system-hosts') bool useSystemHosts,\n    @Default(false) @JsonKey(name: 'respect-rules') bool respectRules,\n    @Default(false) bool ipv6,\n    @Default(['223.5.5.5'])\n    @JsonKey(name: 'default-nameserver')\n    List<String> defaultNameserver,\n    @Default(DnsMode.fakeIp)\n    @JsonKey(name: 'enhanced-mode')\n    DnsMode enhancedMode,\n    @Default('198.18.0.1/16')\n    @JsonKey(name: 'fake-ip-range')\n    String fakeIpRange,\n    @Default(['*.lan', 'localhost.ptlogin2.qq.com'])\n    @JsonKey(name: 'fake-ip-filter')\n    List<String> fakeIpFilter,\n    @Default({\n      'www.baidu.com': '114.114.114.114',\n      '+.internal.crop.com': '10.0.0.1',\n      'geosite:cn': 'https://doh.pub/dns-query',\n    })\n    @JsonKey(name: 'nameserver-policy')\n    Map<String, String> nameserverPolicy,\n    @Default(['https://doh.pub/dns-query', 'https://dns.alidns.com/dns-query'])\n    List<String> nameserver,\n    @Default(['tls://8.8.4.4', 'tls://1.1.1.1']) List<String> fallback,\n    @Default(['https://doh.pub/dns-query'])\n    @JsonKey(name: 'proxy-server-nameserver')\n    List<String> proxyServerNameserver,\n    @Default(FallbackFilter())\n    @JsonKey(name: 'fallback-filter')\n    FallbackFilter fallbackFilter,\n  }) = _Dns;\n\n  factory Dns.fromJson(Map<String, Object?> json) => _$DnsFromJson(json);\n\n  factory Dns.safeDnsFromJson(Map<String, Object?> json) {\n    try {\n      return Dns.fromJson(json);\n    } catch (_) {\n      return const Dns();\n    }\n  }\n}\n\n@freezed\nabstract class GeoXUrl with _$GeoXUrl {\n  const factory GeoXUrl({\n    @Default(\n      'https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.metadb',\n    )\n    String mmdb,\n    @Default(\n      'https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/GeoLite2-ASN.mmdb',\n    )\n    String asn,\n    @Default(\n      'https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.dat',\n    )\n    String geoip,\n    @Default(\n      'https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat',\n    )\n    String geosite,\n  }) = _GeoXUrl;\n\n  factory GeoXUrl.fromJson(Map<String, Object?> json) =>\n      _$GeoXUrlFromJson(json);\n\n  factory GeoXUrl.safeFormJson(Map<String, Object?>? json) {\n    if (json == null) {\n      return defaultGeoXUrl;\n    }\n    try {\n      return GeoXUrl.fromJson(json);\n    } catch (_) {\n      return defaultGeoXUrl;\n    }\n  }\n}\n\n@freezed\nabstract class ParsedRule with _$ParsedRule {\n  const factory ParsedRule({\n    required RuleAction ruleAction,\n    String? content,\n    String? ruleTarget,\n    String? ruleProvider,\n    String? subRule,\n    @Default(false) bool noResolve,\n    @Default(false) bool src,\n  }) = _ParsedRule;\n\n  factory ParsedRule.parseString(String value) {\n    final splits = value.split(',');\n    final shortSplits = splits\n        .where((item) => !item.contains('src') && !item.contains('no-resolve'))\n        .toList();\n    final ruleAction = RuleAction.values.firstWhere(\n      (item) => item.value == shortSplits.first,\n      orElse: () => RuleAction.DOMAIN,\n    );\n    String? subRule;\n    String? ruleTarget;\n\n    if (ruleAction == RuleAction.SUB_RULE) {\n      subRule = shortSplits.last;\n    } else {\n      ruleTarget = shortSplits.last;\n    }\n\n    String? content;\n    String? ruleProvider;\n\n    if (ruleAction == RuleAction.RULE_SET) {\n      ruleProvider = shortSplits.sublist(1, shortSplits.length - 1).join(',');\n    } else {\n      content = shortSplits.sublist(1, shortSplits.length - 1).join(',');\n    }\n\n    return ParsedRule(\n      ruleAction: ruleAction,\n      content: content,\n      src: splits.contains('src'),\n      ruleProvider: ruleProvider,\n      noResolve: splits.contains('no-resolve'),\n      subRule: subRule,\n      ruleTarget: ruleTarget,\n    );\n  }\n}\n\nextension ParsedRuleExt on ParsedRule {\n  String get value {\n    return [\n      ruleAction.value,\n      ruleAction == RuleAction.RULE_SET ? ruleProvider : content,\n      ruleAction == RuleAction.SUB_RULE ? subRule : ruleTarget,\n      if (ruleAction.hasParams) ...[\n        if (src) 'src',\n        if (noResolve) 'no-resolve',\n      ],\n    ].join(',');\n  }\n}\n\n@freezed\nabstract class Rule with _$Rule {\n  const factory Rule({required int id, required String value, String? order}) =\n      _Rule;\n\n  factory Rule.value(String value) {\n    return Rule(value: value, id: snowflake.id);\n  }\n\n  factory Rule.fromJson(Map<String, Object?> json) => _$RuleFromJson(json);\n}\n\nextension RulesExt on List<Rule> {\n  List<Rule> copyAndPut(Rule rule) {\n    var newList = List<Rule>.from(this);\n    final index = newList.indexWhere((item) => item.id == rule.id);\n    if (index != -1) {\n      newList[index] = rule;\n    } else {\n      newList.insert(0, rule);\n    }\n    return newList;\n  }\n}\n\n@freezed\nabstract class SubRule with _$SubRule {\n  const factory SubRule({required String name}) = _SubRule;\n\n  factory SubRule.fromJson(Map<String, Object?> json) =>\n      _$SubRuleFromJson(json);\n}\n\nList<Rule> _genRule(List<dynamic>? rules) {\n  if (rules == null) {\n    return [];\n  }\n  return rules.map((item) => Rule.value(item)).toList();\n}\n\nList<RuleProvider> _genRuleProviders(Map<String, dynamic> json) {\n  return json.entries.map((entry) => RuleProvider(name: entry.key)).toList();\n}\n\nList<SubRule> _genSubRules(Map<String, dynamic> json) {\n  return json.entries.map((entry) => SubRule(name: entry.key)).toList();\n}\n\n@freezed\nabstract class ClashConfigSnippet with _$ClashConfigSnippet {\n  const factory ClashConfigSnippet({\n    @Default([]) @JsonKey(name: 'proxy-groups') List<ProxyGroup> proxyGroups,\n    @JsonKey(fromJson: _genRule, name: 'rules') @Default([]) List<Rule> rule,\n    @JsonKey(name: 'rule-providers', fromJson: _genRuleProviders)\n    @Default([])\n    List<RuleProvider> ruleProvider,\n    @JsonKey(name: 'sub-rules', fromJson: _genSubRules)\n    @Default([])\n    List<SubRule> subRules,\n  }) = _ClashConfigSnippet;\n\n  factory ClashConfigSnippet.fromJson(Map<String, Object?> json) =>\n      _$ClashConfigSnippetFromJson(json);\n}\n\n@freezed\nabstract class ClashConfig with _$ClashConfig {\n  const factory ClashConfig({\n    @Default(defaultMixedPort) @JsonKey(name: 'mixed-port') int mixedPort,\n    @Default(0) @JsonKey(name: 'socks-port') int socksPort,\n    @Default(0) @JsonKey(name: 'port') int port,\n    @Default(0) @JsonKey(name: 'redir-port') int redirPort,\n    @Default(0) @JsonKey(name: 'tproxy-port') int tproxyPort,\n    @Default(Mode.rule) Mode mode,\n    @Default(false) @JsonKey(name: 'allow-lan') bool allowLan,\n    @Default(LogLevel.error) @JsonKey(name: 'log-level') LogLevel logLevel,\n    @Default(false) bool ipv6,\n    @Default(FindProcessMode.always)\n    @JsonKey(\n      name: 'find-process-mode',\n      unknownEnumValue: FindProcessMode.always,\n    )\n    FindProcessMode findProcessMode,\n    @Default(defaultKeepAliveInterval)\n    @JsonKey(name: 'keep-alive-interval')\n    int keepAliveInterval,\n    @Default(true) @JsonKey(name: 'unified-delay') bool unifiedDelay,\n    @Default(true) @JsonKey(name: 'tcp-concurrent') bool tcpConcurrent,\n    @Default(defaultTun) @JsonKey(fromJson: Tun.safeFormJson) Tun tun,\n    @Default(defaultDns) @JsonKey(fromJson: Dns.safeDnsFromJson) Dns dns,\n    @Default(defaultGeoXUrl)\n    @JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson)\n    GeoXUrl geoXUrl,\n    @Default(GeodataLoader.memconservative)\n    @JsonKey(name: 'geodata-loader')\n    GeodataLoader geodataLoader,\n    @Default([]) @JsonKey(name: 'proxy-groups') List<ProxyGroup> proxyGroups,\n    @Default([]) List<String> rule,\n    @JsonKey(name: 'global-ua') String? globalUa,\n    @Default(ExternalControllerStatus.close)\n    @JsonKey(name: 'external-controller')\n    ExternalControllerStatus externalController,\n    @Default({}) Map<String, String> hosts,\n  }) = _ClashConfig;\n\n  factory ClashConfig.fromJson(Map<String, Object?> json) =>\n      _$ClashConfigFromJson(json);\n\n  factory ClashConfig.safeFormJson(Map<String, Object?>? json) {\n    if (json == null) {\n      return defaultClashConfig;\n    }\n    try {\n      return ClashConfig.fromJson(json);\n    } catch (_) {\n      return defaultClashConfig;\n    }\n  }\n}\n"
  },
  {
    "path": "lib/models/common.dart",
    "content": "import 'dart:io';\n\nimport 'package:collection/collection.dart';\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:flutter/material.dart';\nimport 'package:freezed_annotation/freezed_annotation.dart';\n\npart 'generated/common.freezed.dart';\npart 'generated/common.g.dart';\n\n@freezed\nabstract class NavigationItem with _$NavigationItem {\n  const factory NavigationItem({\n    required Icon icon,\n    required PageLabel label,\n    final String? description,\n    required WidgetBuilder builder,\n    @Default(true) bool keep,\n    String? path,\n    @Default([NavigationItemMode.mobile, NavigationItemMode.desktop])\n    List<NavigationItemMode> modes,\n  }) = _NavigationItem;\n}\n\n@freezed\nabstract class Package with _$Package {\n  const factory Package({\n    required String packageName,\n    required String label,\n    required bool system,\n    required bool internet,\n    required int lastUpdateTime,\n  }) = _Package;\n\n  factory Package.fromJson(Map<String, Object?> json) =>\n      _$PackageFromJson(json);\n}\n\nextension PackagesExt on List<Package> {\n  List<Package> getViewList({\n    required List<String> pinedList,\n    required AccessSortType sortType,\n    required bool isFilterSystemApp,\n    required bool isFilterNonInternetApp,\n  }) {\n    return where(\n      (item) =>\n          (isFilterSystemApp ? item.system == false : true) &&\n          (isFilterNonInternetApp ? item.internet == true : true),\n    ).sorted((a, b) {\n      final isSelectA = pinedList.contains(a.packageName);\n      final isSelectB = pinedList.contains(b.packageName);\n\n      if (isSelectA != isSelectB) {\n        return isSelectA ? -1 : 1;\n      }\n      return switch (sortType) {\n        AccessSortType.none => 0,\n        AccessSortType.name => a.label.compareTo(b.label),\n        AccessSortType.time => b.lastUpdateTime.compareTo(a.lastUpdateTime),\n      };\n    });\n  }\n}\n\n@freezed\nabstract class Metadata with _$Metadata {\n  const factory Metadata({\n    @Default(0) int uid,\n    @Default('') String network,\n    @Default('') String sourceIP,\n    @Default('') String sourcePort,\n    @Default('') String destinationIP,\n    @Default('') String destinationPort,\n    @Default('') String host,\n    DnsMode? dnsMode,\n    @Default('') String process,\n    @Default('') String processPath,\n    @Default('') String remoteDestination,\n    @Default([]) List<String> sourceGeoIP,\n    @Default([]) List<String> destinationGeoIP,\n    @Default('') String destinationIPASN,\n    @Default('') String sourceIPASN,\n    @Default('') String specialRules,\n    @Default('') String specialProxy,\n  }) = _Metadata;\n\n  factory Metadata.fromJson(Map<String, Object?> json) =>\n      _$MetadataFromJson(json);\n}\n\n@freezed\nabstract class TrackerInfo with _$TrackerInfo {\n  const factory TrackerInfo({\n    required String id,\n    @Default(0) int upload,\n    @Default(0) int download,\n    required DateTime start,\n    required Metadata metadata,\n    required List<String> chains,\n    required String rule,\n    required String rulePayload,\n    int? downloadSpeed,\n    int? uploadSpeed,\n  }) = _TrackerInfo;\n\n  factory TrackerInfo.fromJson(Map<String, Object?> json) =>\n      _$TrackerInfoFromJson(json);\n}\n\nextension TrackerInfoExt on TrackerInfo {\n  String get desc {\n    var text = '${metadata.network}://';\n    final ips = [\n      metadata.host,\n      metadata.destinationIP,\n    ].where((ip) => ip.isNotEmpty);\n    text += ips.join('/');\n    text += ':${metadata.destinationPort}';\n    return text;\n  }\n\n  String get progressText {\n    final process = metadata.process;\n    final uid = metadata.uid;\n    if (uid != 0) {\n      return '$process($uid)'.trim();\n    }\n    return process.trim();\n  }\n}\n\nString _logDateTime(dynamic _) {\n  return DateTime.now().showFull;\n}\n\n// String _logId(_) {\n//   return utils.id;\n// }\n\n@freezed\nabstract class Log with _$Log {\n  const factory Log({\n    // @JsonKey(fromJson: _logId) required String id,\n    @JsonKey(name: 'LogLevel') @Default(LogLevel.info) LogLevel logLevel,\n    @JsonKey(name: 'Payload') @Default('') String payload,\n    @JsonKey(fromJson: _logDateTime) required String dateTime,\n  }) = _Log;\n\n  factory Log.app(String payload) {\n    return Log(\n      payload: payload,\n      dateTime: _logDateTime(null),\n      // id: _logId(null),\n    );\n  }\n\n  factory Log.fromJson(Map<String, Object?> json) => _$LogFromJson(json);\n}\n\n@freezed\nabstract class LogsState with _$LogsState {\n  const factory LogsState({\n    @Default([]) List<Log> logs,\n    @Default([]) List<String> keywords,\n    @Default('') String query,\n    @Default(true) bool autoScrollToEnd,\n  }) = _LogsState;\n}\n\nextension LogsStateExt on LogsState {\n  List<Log> get list {\n    final lowQuery = query.toLowerCase();\n    return logs.where((log) {\n      final logLevelName = log.logLevel.name;\n      return {logLevelName}.containsAll(keywords) &&\n          ((log.payload.toLowerCase().contains(lowQuery)) ||\n              logLevelName.contains(lowQuery));\n    }).toList();\n  }\n}\n\n@freezed\nabstract class TrackerInfosState with _$TrackerInfosState {\n  const factory TrackerInfosState({\n    @Default([]) List<TrackerInfo> trackerInfos,\n    @Default([]) List<String> keywords,\n    @Default('') String query,\n    @Default(true) bool autoScrollToEnd,\n  }) = _TrackerInfosState;\n}\n\nextension TrackerInfosStateExt on TrackerInfosState {\n  List<TrackerInfo> get list {\n    final lowerQuery = query.toLowerCase().trim();\n    final lowQuery = query.toLowerCase();\n    return trackerInfos.where((trackerInfo) {\n      final chains = trackerInfo.chains;\n      final process = trackerInfo.metadata.process;\n      final networkText = trackerInfo.metadata.network.toLowerCase();\n      final hostText = trackerInfo.metadata.host.toLowerCase();\n      final destinationIPText = trackerInfo.metadata.destinationIP\n          .toLowerCase();\n      final processText = trackerInfo.metadata.process.toLowerCase();\n      final chainsText = chains.join('').toLowerCase();\n      return {...chains, process}.containsAll(keywords) &&\n          (networkText.contains(lowerQuery) ||\n              hostText.contains(lowerQuery) ||\n              destinationIPText.contains(lowQuery) ||\n              processText.contains(lowerQuery) ||\n              chainsText.contains(lowerQuery));\n    }).toList();\n  }\n}\n\nconst defaultDavFileName = 'backup.zip';\n\n@freezed\nabstract class DAVProps with _$DAVProps {\n  const factory DAVProps({\n    required String uri,\n    required String user,\n    required String password,\n    @Default(defaultDavFileName) String fileName,\n  }) = _DAVProps;\n\n  factory DAVProps.fromJson(Map<String, Object?> json) =>\n      _$DAVPropsFromJson(json);\n}\n\n@freezed\nabstract class FileInfo with _$FileInfo {\n  const factory FileInfo({required int size, required DateTime lastModified}) =\n      _FileInfo;\n}\n\nextension FileInfoExt on FileInfo {\n  String get desc =>\n      '${size.traffic.show}  ·  ${lastModified.lastUpdateTimeDesc}';\n}\n\n@freezed\nabstract class VersionInfo with _$VersionInfo {\n  const factory VersionInfo({\n    @Default('') String clashName,\n    @Default('') String version,\n  }) = _VersionInfo;\n\n  factory VersionInfo.fromJson(Map<String, Object?> json) =>\n      _$VersionInfoFromJson(json);\n}\n\n@freezed\nabstract class Traffic with _$Traffic {\n  const factory Traffic({@Default(0) num up, @Default(0) num down}) = _Traffic;\n\n  factory Traffic.fromJson(Map<String, Object?> json) =>\n      _$TrafficFromJson(json);\n}\n\nextension TrafficExt on Traffic {\n  String get speedText {\n    return '↑ ${up.traffic.show}/s   ↓ ${down.traffic.show}/s';\n  }\n\n  String get desc {\n    return '${up.traffic.show} ↑ ${down.traffic.show} ↓';\n  }\n\n  String get trayTitle {\n    return '${up.shortTraffic.show}/s \\n ${down.shortTraffic.show}/s';\n  }\n\n  num get speed => up + down;\n}\n\n@freezed\nabstract class TrafficShow with _$TrafficShow {\n  const factory TrafficShow({required String value, required String unit}) =\n      _TrafficShow;\n}\n\nextension TrafficShowExt on TrafficShow {\n  String get show => '$value$unit';\n}\n\n@freezed\nabstract class Proxy with _$Proxy {\n  const factory Proxy({\n    required String name,\n    required String type,\n    String? now,\n  }) = _Proxy;\n\n  factory Proxy.fromJson(Map<String, Object?> json) => _$ProxyFromJson(json);\n}\n\n@freezed\nabstract class Group with _$Group {\n  const factory Group({\n    required GroupType type,\n    @Default([]) List<Proxy> all,\n    String? now,\n    bool? hidden,\n    String? testUrl,\n    @Default('') String icon,\n    required String name,\n  }) = _Group;\n\n  factory Group.fromJson(Map<String, Object?> json) => _$GroupFromJson(json);\n}\n\nextension GroupsExt on List<Group> {\n  Group? getGroup(String groupName) {\n    final index = indexWhere((element) => element.name == groupName);\n    return index != -1 ? this[index] : null;\n  }\n}\n\nextension GroupExt on Group {\n  String get realNow => now ?? '';\n\n  String getCurrentSelectedName(String proxyName) {\n    if (type.isComputedSelected) {\n      return realNow.isNotEmpty ? realNow : proxyName;\n    }\n    return proxyName.isNotEmpty ? proxyName : realNow;\n  }\n}\n\n@freezed\nabstract class ColorSchemes with _$ColorSchemes {\n  const factory ColorSchemes({\n    ColorScheme? lightColorScheme,\n    ColorScheme? darkColorScheme,\n  }) = _ColorSchemes;\n}\n\nextension ColorSchemesExt on ColorSchemes {\n  ColorScheme getColorSchemeForBrightness(\n    Brightness brightness,\n    DynamicSchemeVariant schemeVariant,\n  ) {\n    if (brightness == Brightness.dark) {\n      return darkColorScheme != null\n          ? ColorScheme.fromSeed(\n              seedColor: darkColorScheme!.primary,\n              brightness: Brightness.dark,\n              dynamicSchemeVariant: schemeVariant,\n            )\n          : ColorScheme.fromSeed(\n              seedColor: Color(defaultPrimaryColor),\n              brightness: Brightness.dark,\n              dynamicSchemeVariant: schemeVariant,\n            );\n    }\n    return lightColorScheme != null\n        ? ColorScheme.fromSeed(\n            seedColor: lightColorScheme!.primary,\n            dynamicSchemeVariant: schemeVariant,\n          )\n        : ColorScheme.fromSeed(\n            seedColor: Color(defaultPrimaryColor),\n            dynamicSchemeVariant: schemeVariant,\n          );\n  }\n}\n\n@freezed\nabstract class IpInfo with _$IpInfo {\n  const factory IpInfo({required String ip, required String countryCode}) =\n      _IpInfo;\n\n  static IpInfo fromIpInfoIoJson(Map<String, dynamic> json) {\n    return switch (json) {\n      {'ip': final String ip, 'country': final String country} => IpInfo(\n        ip: ip,\n        countryCode: country,\n      ),\n      _ => throw const FormatException('invalid json'),\n    };\n  }\n\n  static IpInfo fromIpApiCoJson(Map<String, dynamic> json) {\n    return switch (json) {\n      {'ip': final String ip, 'country_code': final String countryCode} =>\n        IpInfo(ip: ip, countryCode: countryCode),\n      _ => throw const FormatException('invalid json'),\n    };\n  }\n\n  static IpInfo fromIpSbJson(Map<String, dynamic> json) {\n    return switch (json) {\n      {'ip': final String ip, 'country_code': final String countryCode} =>\n        IpInfo(ip: ip, countryCode: countryCode),\n      _ => throw const FormatException('invalid json'),\n    };\n  }\n\n  static IpInfo fromIpWhoIsJson(Map<String, dynamic> json) {\n    return switch (json) {\n      {'ip': final String ip, 'country_code': final String countryCode} =>\n        IpInfo(ip: ip, countryCode: countryCode),\n      _ => throw const FormatException('invalid json'),\n    };\n  }\n\n  static IpInfo fromMyIpJson(Map<String, dynamic> json) {\n    return switch (json) {\n      {'ip': final String ip, 'cc': final String countryCode} => IpInfo(\n        ip: ip,\n        countryCode: countryCode,\n      ),\n      _ => throw const FormatException('invalid json'),\n    };\n  }\n\n  static IpInfo fromIpAPIJson(Map<String, dynamic> json) {\n    return switch (json) {\n      {'query': final String ip, 'countryCode': final String countryCode} =>\n        IpInfo(ip: ip, countryCode: countryCode),\n      _ => throw const FormatException('invalid json'),\n    };\n  }\n\n  static IpInfo fromIdentMeJson(Map<String, dynamic> json) {\n    return switch (json) {\n      {'ip': final String ip, 'cc': final String countryCode} => IpInfo(\n        ip: ip,\n        countryCode: countryCode,\n      ),\n      _ => throw const FormatException('invalid json'),\n    };\n  }\n}\n\n@freezed\nabstract class HotKeyAction with _$HotKeyAction {\n  const factory HotKeyAction({\n    required HotAction action,\n    int? key,\n    @Default({}) Set<KeyboardModifier> modifiers,\n  }) = _HotKeyAction;\n\n  factory HotKeyAction.fromJson(Map<String, Object?> json) =>\n      _$HotKeyActionFromJson(json);\n}\n\ntypedef Validator = String? Function(String? value);\n\n@freezed\nabstract class Field with _$Field {\n  const factory Field({\n    required String label,\n    required String value,\n    Validator? validator,\n  }) = _Field;\n}\n\nclass PopupMenuItemData {\n  const PopupMenuItemData({\n    this.icon,\n    required this.label,\n    this.onPressed,\n    this.danger = false,\n    this.subItems = const [],\n  });\n\n  final String label;\n  final VoidCallback? onPressed;\n  final IconData? icon;\n  final bool danger;\n  final List<PopupMenuItemData> subItems;\n}\n\nclass CloseWindowIntent extends Intent {\n  const CloseWindowIntent();\n}\n\n@freezed\nabstract class Result<T> with _$Result<T> {\n  const factory Result({\n    required T? data,\n    required ResultType type,\n    required String message,\n  }) = _Result;\n\n  factory Result.success(T data) =>\n      Result(data: data, type: ResultType.success, message: '');\n\n  factory Result.error(String message) =>\n      Result(data: null, type: ResultType.error, message: message);\n}\n\nextension ResultExt on Result {\n  bool get isError => type == ResultType.error;\n\n  bool get isSuccess => type == ResultType.success;\n}\n\n@freezed\nabstract class Script with _$Script {\n  const factory Script({\n    required int id,\n    required String label,\n    required DateTime lastUpdateTime,\n  }) = _Script;\n\n  factory Script.fromJson(Map<String, Object?> json) => _$ScriptFromJson(json);\n\n  factory Script.create({required String label}) {\n    return Script(\n      id: snowflake.id,\n      label: label,\n      lastUpdateTime: DateTime.now(),\n    );\n  }\n}\n\nextension ScriptsExt on List<Script> {\n  Script? get(int? id) {\n    if (id == null) {\n      return null;\n    }\n    final index = indexWhere((script) => script.id == id);\n    if (index != -1) {\n      return this[index];\n    }\n    return null;\n  }\n}\n\nextension ScriptExt on Script {\n  String get fileName => '$id.js';\n\n  Future<String> get path async => await appPath.getScriptPath(id.toString());\n\n  Future<String?> get content async {\n    final file = File(await path);\n    if (await file.exists()) {\n      return file.readAsString();\n    }\n    return null;\n  }\n\n  Future<Script> save(String content) async {\n    final file = File(await path);\n    if (!await file.exists()) {\n      await file.create(recursive: true);\n    }\n    await file.writeAsString(content);\n    return copyWith(lastUpdateTime: DateTime.now());\n  }\n\n  Future<Script> saveWithPath(String copyPath) async {\n    final file = File(await path);\n    if (!await file.exists()) {\n      await file.create(recursive: true);\n    }\n    await File(copyPath).copy(copyPath);\n    return copyWith(lastUpdateTime: DateTime.now());\n  }\n}\n\n@freezed\nabstract class DelayState with _$DelayState {\n  const factory DelayState({required int delay, required bool group}) =\n      _DelayState;\n}\n\nextension DelayStateExt on DelayState {\n  int get priority {\n    if (delay > 0) return 0;\n    if (delay == 0) return 1;\n    return 2;\n  }\n\n  int compareTo(DelayState other) {\n    if (priority != other.priority) {\n      return priority.compareTo(other.priority);\n    }\n    if (delay != other.delay) {\n      return delay.compareTo(other.delay);\n    }\n    if (group && !group) return -1;\n    if (!group && group) return 1;\n    return 0;\n  }\n}\n\n@freezed\nabstract class UpdatingMessage with _$UpdatingMessage {\n  const factory UpdatingMessage({\n    required String label,\n    required String message,\n  }) = _UpdatingMessage;\n}\n"
  },
  {
    "path": "lib/models/config.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:flutter/material.dart';\nimport 'package:freezed_annotation/freezed_annotation.dart';\n\nimport 'models.dart';\n\npart 'generated/config.freezed.dart';\npart 'generated/config.g.dart';\n\nconst defaultBypassDomain = [\n  '*zhihu.com',\n  '*zhimg.com',\n  '*jd.com',\n  '100ime-iat-api.xfyun.cn',\n  '*360buyimg.com',\n  'localhost',\n  '*.local',\n  '127.*',\n  '10.*',\n  '172.16.*',\n  '172.17.*',\n  '172.18.*',\n  '172.19.*',\n  '172.2*',\n  '172.30.*',\n  '172.31.*',\n  '192.168.*',\n];\n\nconst defaultAppSettingProps = AppSettingProps();\nconst defaultVpnProps = VpnProps();\nconst defaultNetworkProps = NetworkProps();\nconst defaultProxiesStyleProps = ProxiesStyleProps();\nconst defaultWindowProps = WindowProps();\nconst defaultAccessControlProps = AccessControlProps();\nfinal defaultThemeProps = ThemeProps(primaryColor: defaultPrimaryColor);\n\nconst List<DashboardWidget> defaultDashboardWidgets = [\n  DashboardWidget.networkSpeed,\n  DashboardWidget.systemProxyButton,\n  DashboardWidget.tunButton,\n  DashboardWidget.outboundMode,\n  DashboardWidget.networkDetection,\n  DashboardWidget.trafficUsage,\n  DashboardWidget.intranetIp,\n];\n\nList<DashboardWidget> dashboardWidgetsSafeFormJson(\n  List<dynamic>? dashboardWidgets,\n) {\n  try {\n    return dashboardWidgets\n            ?.map((e) => $enumDecode(_$DashboardWidgetEnumMap, e))\n            .toList() ??\n        defaultDashboardWidgets;\n  } catch (_) {\n    return defaultDashboardWidgets;\n  }\n}\n\n@freezed\nabstract class AppSettingProps with _$AppSettingProps {\n  const factory AppSettingProps({\n    String? locale,\n    @Default(defaultDashboardWidgets)\n    @JsonKey(fromJson: dashboardWidgetsSafeFormJson)\n    List<DashboardWidget> dashboardWidgets,\n    @Default(false) bool onlyStatisticsProxy,\n    @Default(false) bool autoLaunch,\n    @Default(false) bool silentLaunch,\n    @Default(false) bool autoRun,\n    @Default(false) bool openLogs,\n    @Default(true) bool closeConnections,\n    @Default(defaultTestUrl) String testUrl,\n    @Default(true) bool isAnimateToPage,\n    @Default(true) bool autoCheckUpdate,\n    @Default(false) bool showLabel,\n    @Default(false) bool disclaimerAccepted,\n    @Default(false) bool crashlyticsTip,\n    @Default(false) bool crashlytics,\n    @Default(true) bool minimizeOnExit,\n    @Default(false) bool hidden,\n    @Default(false) bool developerMode,\n    @Default(RestoreStrategy.compatible) RestoreStrategy restoreStrategy,\n    @Default(true) bool showTrayTitle,\n  }) = _AppSettingProps;\n\n  factory AppSettingProps.fromJson(Map<String, Object?> json) =>\n      _$AppSettingPropsFromJson(json);\n\n  factory AppSettingProps.safeFromJson(Map<String, Object?>? json) {\n    return json == null\n        ? defaultAppSettingProps\n        : AppSettingProps.fromJson(json);\n  }\n}\n\n@freezed\nabstract class AccessControlProps with _$AccessControlProps {\n  const factory AccessControlProps({\n    @Default(false) bool enable,\n    @Default(AccessControlMode.rejectSelected) AccessControlMode mode,\n    @Default([]) List<String> acceptList,\n    @Default([]) List<String> rejectList,\n    @Default(AccessSortType.none) AccessSortType sort,\n    @Default(true) bool isFilterSystemApp,\n    @Default(true) bool isFilterNonInternetApp,\n  }) = _AccessControlProps;\n\n  factory AccessControlProps.fromJson(Map<String, Object?> json) =>\n      _$AccessControlPropsFromJson(json);\n}\n\nextension AccessControlPropsExt on AccessControlProps {\n  List<String> get currentList => switch (mode) {\n    AccessControlMode.acceptSelected => acceptList,\n    AccessControlMode.rejectSelected => rejectList,\n  };\n\n  AccessControlProps copyWithNewList(List<String> value) => switch (mode) {\n    AccessControlMode.acceptSelected => copyWith(acceptList: value),\n    AccessControlMode.rejectSelected => copyWith(rejectList: value),\n  };\n}\n\n@freezed\nabstract class WindowProps with _$WindowProps {\n  const factory WindowProps({\n    @Default(0) double width,\n    @Default(0) double height,\n    double? top,\n    double? left,\n  }) = _WindowProps;\n\n  factory WindowProps.fromJson(Map<String, Object?>? json) =>\n      json == null ? const WindowProps() : _$WindowPropsFromJson(json);\n}\n\nextension WindowPropsExt on WindowProps {\n  Size get _size => Size(width, height);\n\n  Size get size => _size.isEmpty ? Size(680, 580) : _size;\n}\n\n@freezed\nabstract class VpnProps with _$VpnProps {\n  const factory VpnProps({\n    @Default(true) bool enable,\n    @Default(true) bool systemProxy,\n    @Default(false) bool ipv6,\n    @Default(true) bool allowBypass,\n    @Default(false) bool dnsHijacking,\n    @Default(defaultAccessControlProps) AccessControlProps accessControlProps,\n  }) = _VpnProps;\n\n  factory VpnProps.fromJson(Map<String, Object?>? json) =>\n      json == null ? defaultVpnProps : _$VpnPropsFromJson(json);\n}\n\n@freezed\nabstract class NetworkProps with _$NetworkProps {\n  const factory NetworkProps({\n    @Default(true) bool systemProxy,\n    @Default(defaultBypassDomain) List<String> bypassDomain,\n    @Default(RouteMode.config) RouteMode routeMode,\n    @Default(true) bool autoSetSystemDns,\n    @Default(false) bool appendSystemDns,\n  }) = _NetworkProps;\n\n  factory NetworkProps.fromJson(Map<String, Object?>? json) =>\n      json == null ? const NetworkProps() : _$NetworkPropsFromJson(json);\n}\n\n@freezed\nabstract class ProxiesStyleProps with _$ProxiesStyleProps {\n  const factory ProxiesStyleProps({\n    @Default(ProxiesType.tab) ProxiesType type,\n    @Default(ProxiesSortType.none) ProxiesSortType sortType,\n    @Default(ProxiesLayout.standard) ProxiesLayout layout,\n    @Default(ProxiesIconStyle.standard) ProxiesIconStyle iconStyle,\n    @Default(ProxyCardType.expand) ProxyCardType cardType,\n  }) = _ProxiesStyleProps;\n\n  factory ProxiesStyleProps.fromJson(Map<String, Object?>? json) => json == null\n      ? defaultProxiesStyleProps\n      : _$ProxiesStylePropsFromJson(json);\n}\n\n@freezed\nabstract class TextScale with _$TextScale {\n  const factory TextScale({\n    @Default(false) bool enable,\n    @Default(1.0) double scale,\n  }) = _TextScale;\n\n  factory TextScale.fromJson(Map<String, Object?> json) =>\n      _$TextScaleFromJson(json);\n}\n\n@freezed\nabstract class ThemeProps with _$ThemeProps {\n  const factory ThemeProps({\n    int? primaryColor,\n    @Default(defaultPrimaryColors) List<int> primaryColors,\n    @Default(ThemeMode.dark) ThemeMode themeMode,\n    @Default(DynamicSchemeVariant.content) DynamicSchemeVariant schemeVariant,\n    @Default(false) bool pureBlack,\n    @Default(TextScale()) TextScale textScale,\n  }) = _ThemeProps;\n\n  factory ThemeProps.fromJson(Map<String, Object?> json) =>\n      _$ThemePropsFromJson(json);\n\n  factory ThemeProps.safeFromJson(Map<String, Object?>? json) {\n    if (json == null) {\n      return defaultThemeProps;\n    }\n    try {\n      return ThemeProps.fromJson(json);\n    } catch (_) {\n      return defaultThemeProps;\n    }\n  }\n}\n\n@freezed\nabstract class Config with _$Config {\n  const factory Config({\n    int? currentProfileId,\n    @Default(false) bool overrideDns,\n    @Default([]) List<HotKeyAction> hotKeyActions,\n    @JsonKey(fromJson: AppSettingProps.safeFromJson)\n    @Default(defaultAppSettingProps)\n    AppSettingProps appSettingProps,\n    DAVProps? davProps,\n    @Default(defaultNetworkProps) NetworkProps networkProps,\n    @Default(defaultVpnProps) VpnProps vpnProps,\n    @JsonKey(fromJson: ThemeProps.safeFromJson) required ThemeProps themeProps,\n    @Default(defaultProxiesStyleProps) ProxiesStyleProps proxiesStyleProps,\n    @Default(defaultWindowProps) WindowProps windowProps,\n    @Default(defaultClashConfig) ClashConfig patchClashConfig,\n  }) = _Config;\n\n  factory Config.fromJson(Map<String, Object?> json) => _$ConfigFromJson(json);\n\n  factory Config.realFromJson(Map<String, Object?>? json) {\n    if (json == null) {\n      return Config(themeProps: defaultThemeProps);\n    }\n    return _$ConfigFromJson(json);\n  }\n}\n"
  },
  {
    "path": "lib/models/core.dart",
    "content": "import 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:freezed_annotation/freezed_annotation.dart';\n\npart 'generated/core.freezed.dart';\npart 'generated/core.g.dart';\n\n@freezed\nabstract class SetupParams with _$SetupParams {\n  const factory SetupParams({\n    @JsonKey(name: 'selected-map') required Map<String, String> selectedMap,\n    @JsonKey(name: 'test-url') required String testUrl,\n  }) = _SetupParams;\n\n  factory SetupParams.fromJson(Map<String, dynamic> json) =>\n      _$SetupParamsFromJson(json);\n}\n\n@freezed\nabstract class UpdateParams with _$UpdateParams {\n  const factory UpdateParams({\n    required Tun tun,\n    @JsonKey(name: 'mixed-port') required int mixedPort,\n    @JsonKey(name: 'allow-lan') required bool allowLan,\n    @JsonKey(name: 'find-process-mode')\n    required FindProcessMode findProcessMode,\n    required Mode mode,\n    @JsonKey(name: 'log-level') required LogLevel logLevel,\n    required bool ipv6,\n    @JsonKey(name: 'tcp-concurrent') required bool tcpConcurrent,\n    @JsonKey(name: 'external-controller')\n    required ExternalControllerStatus externalController,\n    @JsonKey(name: 'unified-delay') required bool unifiedDelay,\n  }) = _UpdateParams;\n\n  factory UpdateParams.fromJson(Map<String, dynamic> json) =>\n      _$UpdateParamsFromJson(json);\n}\n\n@freezed\nabstract class VpnOptions with _$VpnOptions {\n  const factory VpnOptions({\n    required bool enable,\n    required int port,\n    required bool ipv6,\n    required bool dnsHijacking,\n    required AccessControlProps accessControlProps,\n    required bool allowBypass,\n    required bool systemProxy,\n    required List<String> bypassDomain,\n    required String stack,\n    @Default([]) List<String> routeAddress,\n  }) = _VpnOptions;\n\n  factory VpnOptions.fromJson(Map<String, Object?> json) =>\n      _$VpnOptionsFromJson(json);\n}\n\n@freezed\nabstract class InitParams with _$InitParams {\n  const factory InitParams({\n    @JsonKey(name: 'home-dir') required String homeDir,\n    required int version,\n  }) = _InitParams;\n\n  factory InitParams.fromJson(Map<String, Object?> json) =>\n      _$InitParamsFromJson(json);\n}\n\n@freezed\nabstract class ChangeProxyParams with _$ChangeProxyParams {\n  const factory ChangeProxyParams({\n    @JsonKey(name: 'group-name') required String groupName,\n    @JsonKey(name: 'proxy-name') required String proxyName,\n  }) = _ChangeProxyParams;\n\n  factory ChangeProxyParams.fromJson(Map<String, Object?> json) =>\n      _$ChangeProxyParamsFromJson(json);\n}\n\n@freezed\nabstract class UpdateGeoDataParams with _$UpdateGeoDataParams {\n  const factory UpdateGeoDataParams({\n    @JsonKey(name: 'geo-type') required String geoType,\n    @JsonKey(name: 'geo-name') required String geoName,\n  }) = _UpdateGeoDataParams;\n\n  factory UpdateGeoDataParams.fromJson(Map<String, Object?> json) =>\n      _$UpdateGeoDataParamsFromJson(json);\n}\n\n@freezed\nabstract class CoreEvent with _$CoreEvent {\n  const factory CoreEvent({required CoreEventType type, dynamic data}) =\n      _CoreEvent;\n\n  factory CoreEvent.fromJson(Map<String, Object?> json) =>\n      _$CoreEventFromJson(json);\n}\n\n@freezed\nabstract class InvokeMessage with _$InvokeMessage {\n  const factory InvokeMessage({required InvokeMessageType type, dynamic data}) =\n      _InvokeMessage;\n\n  factory InvokeMessage.fromJson(Map<String, Object?> json) =>\n      _$InvokeMessageFromJson(json);\n}\n\n@freezed\nabstract class Delay with _$Delay {\n  const factory Delay({required String name, required String url, int? value}) =\n      _Delay;\n\n  factory Delay.fromJson(Map<String, Object?> json) => _$DelayFromJson(json);\n}\n\n@freezed\nabstract class Now with _$Now {\n  const factory Now({required String name, required String value}) = _Now;\n\n  factory Now.fromJson(Map<String, Object?> json) => _$NowFromJson(json);\n}\n\n@freezed\nabstract class ProviderSubscriptionInfo with _$ProviderSubscriptionInfo {\n  const factory ProviderSubscriptionInfo({\n    @JsonKey(name: 'UPLOAD') @Default(0) int upload,\n    @JsonKey(name: 'DOWNLOAD') @Default(0) int download,\n    @JsonKey(name: 'TOTAL') @Default(0) int total,\n    @JsonKey(name: 'EXPIRE') @Default(0) int expire,\n  }) = _ProviderSubscriptionInfo;\n\n  factory ProviderSubscriptionInfo.fromJson(Map<String, Object?> json) =>\n      _$ProviderSubscriptionInfoFromJson(json);\n}\n\nSubscriptionInfo? subscriptionInfoFormCore(Map<String, Object?>? json) {\n  if (json == null) return null;\n  return SubscriptionInfo(\n    upload: (json['Upload'] as num?)?.toInt() ?? 0,\n    download: (json['Download'] as num?)?.toInt() ?? 0,\n    total: (json['Total'] as num?)?.toInt() ?? 0,\n    expire: (json['Expire'] as num?)?.toInt() ?? 0,\n  );\n}\n\n@freezed\nabstract class ExternalProvider with _$ExternalProvider {\n  const factory ExternalProvider({\n    required String name,\n    required String type,\n    String? path,\n    required int count,\n    @JsonKey(name: 'subscription-info', fromJson: subscriptionInfoFormCore)\n    SubscriptionInfo? subscriptionInfo,\n    @JsonKey(name: 'vehicle-type') required String vehicleType,\n    @JsonKey(name: 'update-at') required DateTime updateAt,\n  }) = _ExternalProvider;\n\n  factory ExternalProvider.fromJson(Map<String, Object?> json) =>\n      _$ExternalProviderFromJson(json);\n}\n\nextension ExternalProviderExt on ExternalProvider {\n  String get updatingKey => 'provider_$name';\n}\n\n@freezed\nabstract class Action with _$Action {\n  const factory Action({\n    required ActionMethod method,\n    required dynamic data,\n    required String id,\n  }) = _Action;\n\n  factory Action.fromJson(Map<String, Object?> json) => _$ActionFromJson(json);\n}\n\n@freezed\nabstract class ProxiesData with _$ProxiesData {\n  const factory ProxiesData({\n    required Map<String, dynamic> proxies,\n    required List<String> all,\n  }) = _ProxiesData;\n\n  factory ProxiesData.fromJson(Map<String, Object?> json) =>\n      _$ProxiesDataFromJson(json);\n}\n\n@freezed\nabstract class ActionResult with _$ActionResult {\n  const factory ActionResult({\n    required ActionMethod method,\n    required dynamic data,\n    String? id,\n    @Default(ResultType.success) ResultType code,\n  }) = _ActionResult;\n\n  factory ActionResult.fromJson(Map<String, Object?> json) =>\n      _$ActionResultFromJson(json);\n}\n\nextension ActionResultExt on ActionResult {\n  Result get toResult {\n    if (code == ResultType.success) {\n      return Result.success(data);\n    } else {\n      return Result.error('$data');\n    }\n  }\n}\n"
  },
  {
    "path": "lib/models/generated/app.freezed.dart",
    "content": "// GENERATED CODE - DO NOT MODIFY BY HAND\n// coverage:ignore-file\n// ignore_for_file: type=lint\n// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark\n\npart of '../app.dart';\n\n// **************************************************************************\n// FreezedGenerator\n// **************************************************************************\n\n// dart format off\nT _$identity<T>(T value) => value;\n/// @nodoc\nmixin _$AppState {\n\n bool get isInit; bool get backBlock; PageLabel get pageLabel; List<Package> get packages; int get sortNum; Size get viewSize; double get sideWidth; DelayMap get delayMap; List<Group> get groups; int get checkIpNum; Brightness get brightness; int? get runTime; List<ExternalProvider> get providers; String? get localIp; FixedList<TrackerInfo> get requests; int get version; FixedList<Log> get logs; FixedList<Traffic> get traffics; Traffic get totalTraffic; bool get realTunEnable; bool get loading; SystemUiOverlayStyle get systemUiOverlayStyle; CoreStatus get coreStatus;\n/// Create a copy of AppState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$AppStateCopyWith<AppState> get copyWith => _$AppStateCopyWithImpl<AppState>(this as AppState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is AppState&&(identical(other.isInit, isInit) || other.isInit == isInit)&&(identical(other.backBlock, backBlock) || other.backBlock == backBlock)&&(identical(other.pageLabel, pageLabel) || other.pageLabel == pageLabel)&&const DeepCollectionEquality().equals(other.packages, packages)&&(identical(other.sortNum, sortNum) || other.sortNum == sortNum)&&(identical(other.viewSize, viewSize) || other.viewSize == viewSize)&&(identical(other.sideWidth, sideWidth) || other.sideWidth == sideWidth)&&const DeepCollectionEquality().equals(other.delayMap, delayMap)&&const DeepCollectionEquality().equals(other.groups, groups)&&(identical(other.checkIpNum, checkIpNum) || other.checkIpNum == checkIpNum)&&(identical(other.brightness, brightness) || other.brightness == brightness)&&(identical(other.runTime, runTime) || other.runTime == runTime)&&const DeepCollectionEquality().equals(other.providers, providers)&&(identical(other.localIp, localIp) || other.localIp == localIp)&&(identical(other.requests, requests) || other.requests == requests)&&(identical(other.version, version) || other.version == version)&&(identical(other.logs, logs) || other.logs == logs)&&(identical(other.traffics, traffics) || other.traffics == traffics)&&(identical(other.totalTraffic, totalTraffic) || other.totalTraffic == totalTraffic)&&(identical(other.realTunEnable, realTunEnable) || other.realTunEnable == realTunEnable)&&(identical(other.loading, loading) || other.loading == loading)&&(identical(other.systemUiOverlayStyle, systemUiOverlayStyle) || other.systemUiOverlayStyle == systemUiOverlayStyle)&&(identical(other.coreStatus, coreStatus) || other.coreStatus == coreStatus));\n}\n\n\n@override\nint get hashCode => Object.hashAll([runtimeType,isInit,backBlock,pageLabel,const DeepCollectionEquality().hash(packages),sortNum,viewSize,sideWidth,const DeepCollectionEquality().hash(delayMap),const DeepCollectionEquality().hash(groups),checkIpNum,brightness,runTime,const DeepCollectionEquality().hash(providers),localIp,requests,version,logs,traffics,totalTraffic,realTunEnable,loading,systemUiOverlayStyle,coreStatus]);\n\n@override\nString toString() {\n  return 'AppState(isInit: $isInit, backBlock: $backBlock, pageLabel: $pageLabel, packages: $packages, sortNum: $sortNum, viewSize: $viewSize, sideWidth: $sideWidth, delayMap: $delayMap, groups: $groups, checkIpNum: $checkIpNum, brightness: $brightness, runTime: $runTime, providers: $providers, localIp: $localIp, requests: $requests, version: $version, logs: $logs, traffics: $traffics, totalTraffic: $totalTraffic, realTunEnable: $realTunEnable, loading: $loading, systemUiOverlayStyle: $systemUiOverlayStyle, coreStatus: $coreStatus)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $AppStateCopyWith<$Res>  {\n  factory $AppStateCopyWith(AppState value, $Res Function(AppState) _then) = _$AppStateCopyWithImpl;\n@useResult\n$Res call({\n bool isInit, bool backBlock, PageLabel pageLabel, List<Package> packages, int sortNum, Size viewSize, double sideWidth, DelayMap delayMap, List<Group> groups, int checkIpNum, Brightness brightness, int? runTime, List<ExternalProvider> providers, String? localIp, FixedList<TrackerInfo> requests, int version, FixedList<Log> logs, FixedList<Traffic> traffics, Traffic totalTraffic, bool realTunEnable, bool loading, SystemUiOverlayStyle systemUiOverlayStyle, CoreStatus coreStatus\n});\n\n\n$TrafficCopyWith<$Res> get totalTraffic;\n\n}\n/// @nodoc\nclass _$AppStateCopyWithImpl<$Res>\n    implements $AppStateCopyWith<$Res> {\n  _$AppStateCopyWithImpl(this._self, this._then);\n\n  final AppState _self;\n  final $Res Function(AppState) _then;\n\n/// Create a copy of AppState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? isInit = null,Object? backBlock = null,Object? pageLabel = null,Object? packages = null,Object? sortNum = null,Object? viewSize = null,Object? sideWidth = null,Object? delayMap = null,Object? groups = null,Object? checkIpNum = null,Object? brightness = null,Object? runTime = freezed,Object? providers = null,Object? localIp = freezed,Object? requests = null,Object? version = null,Object? logs = null,Object? traffics = null,Object? totalTraffic = null,Object? realTunEnable = null,Object? loading = null,Object? systemUiOverlayStyle = null,Object? coreStatus = null,}) {\n  return _then(_self.copyWith(\nisInit: null == isInit ? _self.isInit : isInit // ignore: cast_nullable_to_non_nullable\nas bool,backBlock: null == backBlock ? _self.backBlock : backBlock // ignore: cast_nullable_to_non_nullable\nas bool,pageLabel: null == pageLabel ? _self.pageLabel : pageLabel // ignore: cast_nullable_to_non_nullable\nas PageLabel,packages: null == packages ? _self.packages : packages // ignore: cast_nullable_to_non_nullable\nas List<Package>,sortNum: null == sortNum ? _self.sortNum : sortNum // ignore: cast_nullable_to_non_nullable\nas int,viewSize: null == viewSize ? _self.viewSize : viewSize // ignore: cast_nullable_to_non_nullable\nas Size,sideWidth: null == sideWidth ? _self.sideWidth : sideWidth // ignore: cast_nullable_to_non_nullable\nas double,delayMap: null == delayMap ? _self.delayMap : delayMap // ignore: cast_nullable_to_non_nullable\nas DelayMap,groups: null == groups ? _self.groups : groups // ignore: cast_nullable_to_non_nullable\nas List<Group>,checkIpNum: null == checkIpNum ? _self.checkIpNum : checkIpNum // ignore: cast_nullable_to_non_nullable\nas int,brightness: null == brightness ? _self.brightness : brightness // ignore: cast_nullable_to_non_nullable\nas Brightness,runTime: freezed == runTime ? _self.runTime : runTime // ignore: cast_nullable_to_non_nullable\nas int?,providers: null == providers ? _self.providers : providers // ignore: cast_nullable_to_non_nullable\nas List<ExternalProvider>,localIp: freezed == localIp ? _self.localIp : localIp // ignore: cast_nullable_to_non_nullable\nas String?,requests: null == requests ? _self.requests : requests // ignore: cast_nullable_to_non_nullable\nas FixedList<TrackerInfo>,version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable\nas int,logs: null == logs ? _self.logs : logs // ignore: cast_nullable_to_non_nullable\nas FixedList<Log>,traffics: null == traffics ? _self.traffics : traffics // ignore: cast_nullable_to_non_nullable\nas FixedList<Traffic>,totalTraffic: null == totalTraffic ? _self.totalTraffic : totalTraffic // ignore: cast_nullable_to_non_nullable\nas Traffic,realTunEnable: null == realTunEnable ? _self.realTunEnable : realTunEnable // ignore: cast_nullable_to_non_nullable\nas bool,loading: null == loading ? _self.loading : loading // ignore: cast_nullable_to_non_nullable\nas bool,systemUiOverlayStyle: null == systemUiOverlayStyle ? _self.systemUiOverlayStyle : systemUiOverlayStyle // ignore: cast_nullable_to_non_nullable\nas SystemUiOverlayStyle,coreStatus: null == coreStatus ? _self.coreStatus : coreStatus // ignore: cast_nullable_to_non_nullable\nas CoreStatus,\n  ));\n}\n/// Create a copy of AppState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$TrafficCopyWith<$Res> get totalTraffic {\n  \n  return $TrafficCopyWith<$Res>(_self.totalTraffic, (value) {\n    return _then(_self.copyWith(totalTraffic: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [AppState].\nextension AppStatePatterns on AppState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _AppState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _AppState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _AppState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _AppState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _AppState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _AppState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isInit,  bool backBlock,  PageLabel pageLabel,  List<Package> packages,  int sortNum,  Size viewSize,  double sideWidth,  DelayMap delayMap,  List<Group> groups,  int checkIpNum,  Brightness brightness,  int? runTime,  List<ExternalProvider> providers,  String? localIp,  FixedList<TrackerInfo> requests,  int version,  FixedList<Log> logs,  FixedList<Traffic> traffics,  Traffic totalTraffic,  bool realTunEnable,  bool loading,  SystemUiOverlayStyle systemUiOverlayStyle,  CoreStatus coreStatus)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _AppState() when $default != null:\nreturn $default(_that.isInit,_that.backBlock,_that.pageLabel,_that.packages,_that.sortNum,_that.viewSize,_that.sideWidth,_that.delayMap,_that.groups,_that.checkIpNum,_that.brightness,_that.runTime,_that.providers,_that.localIp,_that.requests,_that.version,_that.logs,_that.traffics,_that.totalTraffic,_that.realTunEnable,_that.loading,_that.systemUiOverlayStyle,_that.coreStatus);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isInit,  bool backBlock,  PageLabel pageLabel,  List<Package> packages,  int sortNum,  Size viewSize,  double sideWidth,  DelayMap delayMap,  List<Group> groups,  int checkIpNum,  Brightness brightness,  int? runTime,  List<ExternalProvider> providers,  String? localIp,  FixedList<TrackerInfo> requests,  int version,  FixedList<Log> logs,  FixedList<Traffic> traffics,  Traffic totalTraffic,  bool realTunEnable,  bool loading,  SystemUiOverlayStyle systemUiOverlayStyle,  CoreStatus coreStatus)  $default,) {final _that = this;\nswitch (_that) {\ncase _AppState():\nreturn $default(_that.isInit,_that.backBlock,_that.pageLabel,_that.packages,_that.sortNum,_that.viewSize,_that.sideWidth,_that.delayMap,_that.groups,_that.checkIpNum,_that.brightness,_that.runTime,_that.providers,_that.localIp,_that.requests,_that.version,_that.logs,_that.traffics,_that.totalTraffic,_that.realTunEnable,_that.loading,_that.systemUiOverlayStyle,_that.coreStatus);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isInit,  bool backBlock,  PageLabel pageLabel,  List<Package> packages,  int sortNum,  Size viewSize,  double sideWidth,  DelayMap delayMap,  List<Group> groups,  int checkIpNum,  Brightness brightness,  int? runTime,  List<ExternalProvider> providers,  String? localIp,  FixedList<TrackerInfo> requests,  int version,  FixedList<Log> logs,  FixedList<Traffic> traffics,  Traffic totalTraffic,  bool realTunEnable,  bool loading,  SystemUiOverlayStyle systemUiOverlayStyle,  CoreStatus coreStatus)?  $default,) {final _that = this;\nswitch (_that) {\ncase _AppState() when $default != null:\nreturn $default(_that.isInit,_that.backBlock,_that.pageLabel,_that.packages,_that.sortNum,_that.viewSize,_that.sideWidth,_that.delayMap,_that.groups,_that.checkIpNum,_that.brightness,_that.runTime,_that.providers,_that.localIp,_that.requests,_that.version,_that.logs,_that.traffics,_that.totalTraffic,_that.realTunEnable,_that.loading,_that.systemUiOverlayStyle,_that.coreStatus);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _AppState implements AppState {\n  const _AppState({this.isInit = false, this.backBlock = false, this.pageLabel = PageLabel.dashboard, final  List<Package> packages = const [], this.sortNum = 0, required this.viewSize, this.sideWidth = 0, final  DelayMap delayMap = const {}, final  List<Group> groups = const [], this.checkIpNum = 0, required this.brightness, this.runTime, final  List<ExternalProvider> providers = const [], this.localIp, required this.requests, required this.version, required this.logs, required this.traffics, required this.totalTraffic, this.realTunEnable = false, this.loading = false, required this.systemUiOverlayStyle, this.coreStatus = CoreStatus.connecting}): _packages = packages,_delayMap = delayMap,_groups = groups,_providers = providers;\n  \n\n@override@JsonKey() final  bool isInit;\n@override@JsonKey() final  bool backBlock;\n@override@JsonKey() final  PageLabel pageLabel;\n final  List<Package> _packages;\n@override@JsonKey() List<Package> get packages {\n  if (_packages is EqualUnmodifiableListView) return _packages;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_packages);\n}\n\n@override@JsonKey() final  int sortNum;\n@override final  Size viewSize;\n@override@JsonKey() final  double sideWidth;\n final  DelayMap _delayMap;\n@override@JsonKey() DelayMap get delayMap {\n  if (_delayMap is EqualUnmodifiableMapView) return _delayMap;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableMapView(_delayMap);\n}\n\n final  List<Group> _groups;\n@override@JsonKey() List<Group> get groups {\n  if (_groups is EqualUnmodifiableListView) return _groups;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_groups);\n}\n\n@override@JsonKey() final  int checkIpNum;\n@override final  Brightness brightness;\n@override final  int? runTime;\n final  List<ExternalProvider> _providers;\n@override@JsonKey() List<ExternalProvider> get providers {\n  if (_providers is EqualUnmodifiableListView) return _providers;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_providers);\n}\n\n@override final  String? localIp;\n@override final  FixedList<TrackerInfo> requests;\n@override final  int version;\n@override final  FixedList<Log> logs;\n@override final  FixedList<Traffic> traffics;\n@override final  Traffic totalTraffic;\n@override@JsonKey() final  bool realTunEnable;\n@override@JsonKey() final  bool loading;\n@override final  SystemUiOverlayStyle systemUiOverlayStyle;\n@override@JsonKey() final  CoreStatus coreStatus;\n\n/// Create a copy of AppState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$AppStateCopyWith<_AppState> get copyWith => __$AppStateCopyWithImpl<_AppState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppState&&(identical(other.isInit, isInit) || other.isInit == isInit)&&(identical(other.backBlock, backBlock) || other.backBlock == backBlock)&&(identical(other.pageLabel, pageLabel) || other.pageLabel == pageLabel)&&const DeepCollectionEquality().equals(other._packages, _packages)&&(identical(other.sortNum, sortNum) || other.sortNum == sortNum)&&(identical(other.viewSize, viewSize) || other.viewSize == viewSize)&&(identical(other.sideWidth, sideWidth) || other.sideWidth == sideWidth)&&const DeepCollectionEquality().equals(other._delayMap, _delayMap)&&const DeepCollectionEquality().equals(other._groups, _groups)&&(identical(other.checkIpNum, checkIpNum) || other.checkIpNum == checkIpNum)&&(identical(other.brightness, brightness) || other.brightness == brightness)&&(identical(other.runTime, runTime) || other.runTime == runTime)&&const DeepCollectionEquality().equals(other._providers, _providers)&&(identical(other.localIp, localIp) || other.localIp == localIp)&&(identical(other.requests, requests) || other.requests == requests)&&(identical(other.version, version) || other.version == version)&&(identical(other.logs, logs) || other.logs == logs)&&(identical(other.traffics, traffics) || other.traffics == traffics)&&(identical(other.totalTraffic, totalTraffic) || other.totalTraffic == totalTraffic)&&(identical(other.realTunEnable, realTunEnable) || other.realTunEnable == realTunEnable)&&(identical(other.loading, loading) || other.loading == loading)&&(identical(other.systemUiOverlayStyle, systemUiOverlayStyle) || other.systemUiOverlayStyle == systemUiOverlayStyle)&&(identical(other.coreStatus, coreStatus) || other.coreStatus == coreStatus));\n}\n\n\n@override\nint get hashCode => Object.hashAll([runtimeType,isInit,backBlock,pageLabel,const DeepCollectionEquality().hash(_packages),sortNum,viewSize,sideWidth,const DeepCollectionEquality().hash(_delayMap),const DeepCollectionEquality().hash(_groups),checkIpNum,brightness,runTime,const DeepCollectionEquality().hash(_providers),localIp,requests,version,logs,traffics,totalTraffic,realTunEnable,loading,systemUiOverlayStyle,coreStatus]);\n\n@override\nString toString() {\n  return 'AppState(isInit: $isInit, backBlock: $backBlock, pageLabel: $pageLabel, packages: $packages, sortNum: $sortNum, viewSize: $viewSize, sideWidth: $sideWidth, delayMap: $delayMap, groups: $groups, checkIpNum: $checkIpNum, brightness: $brightness, runTime: $runTime, providers: $providers, localIp: $localIp, requests: $requests, version: $version, logs: $logs, traffics: $traffics, totalTraffic: $totalTraffic, realTunEnable: $realTunEnable, loading: $loading, systemUiOverlayStyle: $systemUiOverlayStyle, coreStatus: $coreStatus)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$AppStateCopyWith<$Res> implements $AppStateCopyWith<$Res> {\n  factory _$AppStateCopyWith(_AppState value, $Res Function(_AppState) _then) = __$AppStateCopyWithImpl;\n@override @useResult\n$Res call({\n bool isInit, bool backBlock, PageLabel pageLabel, List<Package> packages, int sortNum, Size viewSize, double sideWidth, DelayMap delayMap, List<Group> groups, int checkIpNum, Brightness brightness, int? runTime, List<ExternalProvider> providers, String? localIp, FixedList<TrackerInfo> requests, int version, FixedList<Log> logs, FixedList<Traffic> traffics, Traffic totalTraffic, bool realTunEnable, bool loading, SystemUiOverlayStyle systemUiOverlayStyle, CoreStatus coreStatus\n});\n\n\n@override $TrafficCopyWith<$Res> get totalTraffic;\n\n}\n/// @nodoc\nclass __$AppStateCopyWithImpl<$Res>\n    implements _$AppStateCopyWith<$Res> {\n  __$AppStateCopyWithImpl(this._self, this._then);\n\n  final _AppState _self;\n  final $Res Function(_AppState) _then;\n\n/// Create a copy of AppState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? isInit = null,Object? backBlock = null,Object? pageLabel = null,Object? packages = null,Object? sortNum = null,Object? viewSize = null,Object? sideWidth = null,Object? delayMap = null,Object? groups = null,Object? checkIpNum = null,Object? brightness = null,Object? runTime = freezed,Object? providers = null,Object? localIp = freezed,Object? requests = null,Object? version = null,Object? logs = null,Object? traffics = null,Object? totalTraffic = null,Object? realTunEnable = null,Object? loading = null,Object? systemUiOverlayStyle = null,Object? coreStatus = null,}) {\n  return _then(_AppState(\nisInit: null == isInit ? _self.isInit : isInit // ignore: cast_nullable_to_non_nullable\nas bool,backBlock: null == backBlock ? _self.backBlock : backBlock // ignore: cast_nullable_to_non_nullable\nas bool,pageLabel: null == pageLabel ? _self.pageLabel : pageLabel // ignore: cast_nullable_to_non_nullable\nas PageLabel,packages: null == packages ? _self._packages : packages // ignore: cast_nullable_to_non_nullable\nas List<Package>,sortNum: null == sortNum ? _self.sortNum : sortNum // ignore: cast_nullable_to_non_nullable\nas int,viewSize: null == viewSize ? _self.viewSize : viewSize // ignore: cast_nullable_to_non_nullable\nas Size,sideWidth: null == sideWidth ? _self.sideWidth : sideWidth // ignore: cast_nullable_to_non_nullable\nas double,delayMap: null == delayMap ? _self._delayMap : delayMap // ignore: cast_nullable_to_non_nullable\nas DelayMap,groups: null == groups ? _self._groups : groups // ignore: cast_nullable_to_non_nullable\nas List<Group>,checkIpNum: null == checkIpNum ? _self.checkIpNum : checkIpNum // ignore: cast_nullable_to_non_nullable\nas int,brightness: null == brightness ? _self.brightness : brightness // ignore: cast_nullable_to_non_nullable\nas Brightness,runTime: freezed == runTime ? _self.runTime : runTime // ignore: cast_nullable_to_non_nullable\nas int?,providers: null == providers ? _self._providers : providers // ignore: cast_nullable_to_non_nullable\nas List<ExternalProvider>,localIp: freezed == localIp ? _self.localIp : localIp // ignore: cast_nullable_to_non_nullable\nas String?,requests: null == requests ? _self.requests : requests // ignore: cast_nullable_to_non_nullable\nas FixedList<TrackerInfo>,version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable\nas int,logs: null == logs ? _self.logs : logs // ignore: cast_nullable_to_non_nullable\nas FixedList<Log>,traffics: null == traffics ? _self.traffics : traffics // ignore: cast_nullable_to_non_nullable\nas FixedList<Traffic>,totalTraffic: null == totalTraffic ? _self.totalTraffic : totalTraffic // ignore: cast_nullable_to_non_nullable\nas Traffic,realTunEnable: null == realTunEnable ? _self.realTunEnable : realTunEnable // ignore: cast_nullable_to_non_nullable\nas bool,loading: null == loading ? _self.loading : loading // ignore: cast_nullable_to_non_nullable\nas bool,systemUiOverlayStyle: null == systemUiOverlayStyle ? _self.systemUiOverlayStyle : systemUiOverlayStyle // ignore: cast_nullable_to_non_nullable\nas SystemUiOverlayStyle,coreStatus: null == coreStatus ? _self.coreStatus : coreStatus // ignore: cast_nullable_to_non_nullable\nas CoreStatus,\n  ));\n}\n\n/// Create a copy of AppState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$TrafficCopyWith<$Res> get totalTraffic {\n  \n  return $TrafficCopyWith<$Res>(_self.totalTraffic, (value) {\n    return _then(_self.copyWith(totalTraffic: value));\n  });\n}\n}\n\n// dart format on\n"
  },
  {
    "path": "lib/models/generated/clash_config.freezed.dart",
    "content": "// GENERATED CODE - DO NOT MODIFY BY HAND\n// coverage:ignore-file\n// ignore_for_file: type=lint\n// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark\n\npart of '../clash_config.dart';\n\n// **************************************************************************\n// FreezedGenerator\n// **************************************************************************\n\n// dart format off\nT _$identity<T>(T value) => value;\n\n/// @nodoc\nmixin _$ProxyGroup {\n\n String get name;@JsonKey(fromJson: GroupType.parseProfileType) GroupType get type; List<String>? get proxies; List<String>? get use; int? get interval; bool? get lazy; String? get url; int? get timeout;@JsonKey(name: 'max-failed-times') int? get maxFailedTimes; String? get filter;@JsonKey(name: 'expected-filter') String? get excludeFilter;@JsonKey(name: 'exclude-type') String? get excludeType;@JsonKey(name: 'expected-status') dynamic get expectedStatus; bool? get hidden; String? get icon;\n/// Create a copy of ProxyGroup\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ProxyGroupCopyWith<ProxyGroup> get copyWith => _$ProxyGroupCopyWithImpl<ProxyGroup>(this as ProxyGroup, _$identity);\n\n  /// Serializes this ProxyGroup to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ProxyGroup&&(identical(other.name, name) || other.name == name)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other.proxies, proxies)&&const DeepCollectionEquality().equals(other.use, use)&&(identical(other.interval, interval) || other.interval == interval)&&(identical(other.lazy, lazy) || other.lazy == lazy)&&(identical(other.url, url) || other.url == url)&&(identical(other.timeout, timeout) || other.timeout == timeout)&&(identical(other.maxFailedTimes, maxFailedTimes) || other.maxFailedTimes == maxFailedTimes)&&(identical(other.filter, filter) || other.filter == filter)&&(identical(other.excludeFilter, excludeFilter) || other.excludeFilter == excludeFilter)&&(identical(other.excludeType, excludeType) || other.excludeType == excludeType)&&const DeepCollectionEquality().equals(other.expectedStatus, expectedStatus)&&(identical(other.hidden, hidden) || other.hidden == hidden)&&(identical(other.icon, icon) || other.icon == icon));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,name,type,const DeepCollectionEquality().hash(proxies),const DeepCollectionEquality().hash(use),interval,lazy,url,timeout,maxFailedTimes,filter,excludeFilter,excludeType,const DeepCollectionEquality().hash(expectedStatus),hidden,icon);\n\n@override\nString toString() {\n  return 'ProxyGroup(name: $name, type: $type, proxies: $proxies, use: $use, interval: $interval, lazy: $lazy, url: $url, timeout: $timeout, maxFailedTimes: $maxFailedTimes, filter: $filter, excludeFilter: $excludeFilter, excludeType: $excludeType, expectedStatus: $expectedStatus, hidden: $hidden, icon: $icon)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ProxyGroupCopyWith<$Res>  {\n  factory $ProxyGroupCopyWith(ProxyGroup value, $Res Function(ProxyGroup) _then) = _$ProxyGroupCopyWithImpl;\n@useResult\n$Res call({\n String name,@JsonKey(fromJson: GroupType.parseProfileType) GroupType type, List<String>? proxies, List<String>? use, int? interval, bool? lazy, String? url, int? timeout,@JsonKey(name: 'max-failed-times') int? maxFailedTimes, String? filter,@JsonKey(name: 'expected-filter') String? excludeFilter,@JsonKey(name: 'exclude-type') String? excludeType,@JsonKey(name: 'expected-status') dynamic expectedStatus, bool? hidden, String? icon\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ProxyGroupCopyWithImpl<$Res>\n    implements $ProxyGroupCopyWith<$Res> {\n  _$ProxyGroupCopyWithImpl(this._self, this._then);\n\n  final ProxyGroup _self;\n  final $Res Function(ProxyGroup) _then;\n\n/// Create a copy of ProxyGroup\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? type = null,Object? proxies = freezed,Object? use = freezed,Object? interval = freezed,Object? lazy = freezed,Object? url = freezed,Object? timeout = freezed,Object? maxFailedTimes = freezed,Object? filter = freezed,Object? excludeFilter = freezed,Object? excludeType = freezed,Object? expectedStatus = freezed,Object? hidden = freezed,Object? icon = freezed,}) {\n  return _then(_self.copyWith(\nname: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable\nas String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable\nas GroupType,proxies: freezed == proxies ? _self.proxies : proxies // ignore: cast_nullable_to_non_nullable\nas List<String>?,use: freezed == use ? _self.use : use // ignore: cast_nullable_to_non_nullable\nas List<String>?,interval: freezed == interval ? _self.interval : interval // ignore: cast_nullable_to_non_nullable\nas int?,lazy: freezed == lazy ? _self.lazy : lazy // ignore: cast_nullable_to_non_nullable\nas bool?,url: freezed == url ? _self.url : url // ignore: cast_nullable_to_non_nullable\nas String?,timeout: freezed == timeout ? _self.timeout : timeout // ignore: cast_nullable_to_non_nullable\nas int?,maxFailedTimes: freezed == maxFailedTimes ? _self.maxFailedTimes : maxFailedTimes // ignore: cast_nullable_to_non_nullable\nas int?,filter: freezed == filter ? _self.filter : filter // ignore: cast_nullable_to_non_nullable\nas String?,excludeFilter: freezed == excludeFilter ? _self.excludeFilter : excludeFilter // ignore: cast_nullable_to_non_nullable\nas String?,excludeType: freezed == excludeType ? _self.excludeType : excludeType // ignore: cast_nullable_to_non_nullable\nas String?,expectedStatus: freezed == expectedStatus ? _self.expectedStatus : expectedStatus // ignore: cast_nullable_to_non_nullable\nas dynamic,hidden: freezed == hidden ? _self.hidden : hidden // ignore: cast_nullable_to_non_nullable\nas bool?,icon: freezed == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable\nas String?,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [ProxyGroup].\nextension ProxyGroupPatterns on ProxyGroup {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ProxyGroup value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ProxyGroup() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ProxyGroup value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProxyGroup():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ProxyGroup value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProxyGroup() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String name, @JsonKey(fromJson: GroupType.parseProfileType)  GroupType type,  List<String>? proxies,  List<String>? use,  int? interval,  bool? lazy,  String? url,  int? timeout, @JsonKey(name: 'max-failed-times')  int? maxFailedTimes,  String? filter, @JsonKey(name: 'expected-filter')  String? excludeFilter, @JsonKey(name: 'exclude-type')  String? excludeType, @JsonKey(name: 'expected-status')  dynamic expectedStatus,  bool? hidden,  String? icon)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ProxyGroup() when $default != null:\nreturn $default(_that.name,_that.type,_that.proxies,_that.use,_that.interval,_that.lazy,_that.url,_that.timeout,_that.maxFailedTimes,_that.filter,_that.excludeFilter,_that.excludeType,_that.expectedStatus,_that.hidden,_that.icon);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String name, @JsonKey(fromJson: GroupType.parseProfileType)  GroupType type,  List<String>? proxies,  List<String>? use,  int? interval,  bool? lazy,  String? url,  int? timeout, @JsonKey(name: 'max-failed-times')  int? maxFailedTimes,  String? filter, @JsonKey(name: 'expected-filter')  String? excludeFilter, @JsonKey(name: 'exclude-type')  String? excludeType, @JsonKey(name: 'expected-status')  dynamic expectedStatus,  bool? hidden,  String? icon)  $default,) {final _that = this;\nswitch (_that) {\ncase _ProxyGroup():\nreturn $default(_that.name,_that.type,_that.proxies,_that.use,_that.interval,_that.lazy,_that.url,_that.timeout,_that.maxFailedTimes,_that.filter,_that.excludeFilter,_that.excludeType,_that.expectedStatus,_that.hidden,_that.icon);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String name, @JsonKey(fromJson: GroupType.parseProfileType)  GroupType type,  List<String>? proxies,  List<String>? use,  int? interval,  bool? lazy,  String? url,  int? timeout, @JsonKey(name: 'max-failed-times')  int? maxFailedTimes,  String? filter, @JsonKey(name: 'expected-filter')  String? excludeFilter, @JsonKey(name: 'exclude-type')  String? excludeType, @JsonKey(name: 'expected-status')  dynamic expectedStatus,  bool? hidden,  String? icon)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ProxyGroup() when $default != null:\nreturn $default(_that.name,_that.type,_that.proxies,_that.use,_that.interval,_that.lazy,_that.url,_that.timeout,_that.maxFailedTimes,_that.filter,_that.excludeFilter,_that.excludeType,_that.expectedStatus,_that.hidden,_that.icon);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _ProxyGroup implements ProxyGroup {\n  const _ProxyGroup({required this.name, @JsonKey(fromJson: GroupType.parseProfileType) required this.type, final  List<String>? proxies, final  List<String>? use, this.interval, this.lazy, this.url, this.timeout, @JsonKey(name: 'max-failed-times') this.maxFailedTimes, this.filter, @JsonKey(name: 'expected-filter') this.excludeFilter, @JsonKey(name: 'exclude-type') this.excludeType, @JsonKey(name: 'expected-status') this.expectedStatus, this.hidden, this.icon}): _proxies = proxies,_use = use;\n  factory _ProxyGroup.fromJson(Map<String, dynamic> json) => _$ProxyGroupFromJson(json);\n\n@override final  String name;\n@override@JsonKey(fromJson: GroupType.parseProfileType) final  GroupType type;\n final  List<String>? _proxies;\n@override List<String>? get proxies {\n  final value = _proxies;\n  if (value == null) return null;\n  if (_proxies is EqualUnmodifiableListView) return _proxies;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(value);\n}\n\n final  List<String>? _use;\n@override List<String>? get use {\n  final value = _use;\n  if (value == null) return null;\n  if (_use is EqualUnmodifiableListView) return _use;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(value);\n}\n\n@override final  int? interval;\n@override final  bool? lazy;\n@override final  String? url;\n@override final  int? timeout;\n@override@JsonKey(name: 'max-failed-times') final  int? maxFailedTimes;\n@override final  String? filter;\n@override@JsonKey(name: 'expected-filter') final  String? excludeFilter;\n@override@JsonKey(name: 'exclude-type') final  String? excludeType;\n@override@JsonKey(name: 'expected-status') final  dynamic expectedStatus;\n@override final  bool? hidden;\n@override final  String? icon;\n\n/// Create a copy of ProxyGroup\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ProxyGroupCopyWith<_ProxyGroup> get copyWith => __$ProxyGroupCopyWithImpl<_ProxyGroup>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$ProxyGroupToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProxyGroup&&(identical(other.name, name) || other.name == name)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other._proxies, _proxies)&&const DeepCollectionEquality().equals(other._use, _use)&&(identical(other.interval, interval) || other.interval == interval)&&(identical(other.lazy, lazy) || other.lazy == lazy)&&(identical(other.url, url) || other.url == url)&&(identical(other.timeout, timeout) || other.timeout == timeout)&&(identical(other.maxFailedTimes, maxFailedTimes) || other.maxFailedTimes == maxFailedTimes)&&(identical(other.filter, filter) || other.filter == filter)&&(identical(other.excludeFilter, excludeFilter) || other.excludeFilter == excludeFilter)&&(identical(other.excludeType, excludeType) || other.excludeType == excludeType)&&const DeepCollectionEquality().equals(other.expectedStatus, expectedStatus)&&(identical(other.hidden, hidden) || other.hidden == hidden)&&(identical(other.icon, icon) || other.icon == icon));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,name,type,const DeepCollectionEquality().hash(_proxies),const DeepCollectionEquality().hash(_use),interval,lazy,url,timeout,maxFailedTimes,filter,excludeFilter,excludeType,const DeepCollectionEquality().hash(expectedStatus),hidden,icon);\n\n@override\nString toString() {\n  return 'ProxyGroup(name: $name, type: $type, proxies: $proxies, use: $use, interval: $interval, lazy: $lazy, url: $url, timeout: $timeout, maxFailedTimes: $maxFailedTimes, filter: $filter, excludeFilter: $excludeFilter, excludeType: $excludeType, expectedStatus: $expectedStatus, hidden: $hidden, icon: $icon)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ProxyGroupCopyWith<$Res> implements $ProxyGroupCopyWith<$Res> {\n  factory _$ProxyGroupCopyWith(_ProxyGroup value, $Res Function(_ProxyGroup) _then) = __$ProxyGroupCopyWithImpl;\n@override @useResult\n$Res call({\n String name,@JsonKey(fromJson: GroupType.parseProfileType) GroupType type, List<String>? proxies, List<String>? use, int? interval, bool? lazy, String? url, int? timeout,@JsonKey(name: 'max-failed-times') int? maxFailedTimes, String? filter,@JsonKey(name: 'expected-filter') String? excludeFilter,@JsonKey(name: 'exclude-type') String? excludeType,@JsonKey(name: 'expected-status') dynamic expectedStatus, bool? hidden, String? icon\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ProxyGroupCopyWithImpl<$Res>\n    implements _$ProxyGroupCopyWith<$Res> {\n  __$ProxyGroupCopyWithImpl(this._self, this._then);\n\n  final _ProxyGroup _self;\n  final $Res Function(_ProxyGroup) _then;\n\n/// Create a copy of ProxyGroup\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? type = null,Object? proxies = freezed,Object? use = freezed,Object? interval = freezed,Object? lazy = freezed,Object? url = freezed,Object? timeout = freezed,Object? maxFailedTimes = freezed,Object? filter = freezed,Object? excludeFilter = freezed,Object? excludeType = freezed,Object? expectedStatus = freezed,Object? hidden = freezed,Object? icon = freezed,}) {\n  return _then(_ProxyGroup(\nname: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable\nas String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable\nas GroupType,proxies: freezed == proxies ? _self._proxies : proxies // ignore: cast_nullable_to_non_nullable\nas List<String>?,use: freezed == use ? _self._use : use // ignore: cast_nullable_to_non_nullable\nas List<String>?,interval: freezed == interval ? _self.interval : interval // ignore: cast_nullable_to_non_nullable\nas int?,lazy: freezed == lazy ? _self.lazy : lazy // ignore: cast_nullable_to_non_nullable\nas bool?,url: freezed == url ? _self.url : url // ignore: cast_nullable_to_non_nullable\nas String?,timeout: freezed == timeout ? _self.timeout : timeout // ignore: cast_nullable_to_non_nullable\nas int?,maxFailedTimes: freezed == maxFailedTimes ? _self.maxFailedTimes : maxFailedTimes // ignore: cast_nullable_to_non_nullable\nas int?,filter: freezed == filter ? _self.filter : filter // ignore: cast_nullable_to_non_nullable\nas String?,excludeFilter: freezed == excludeFilter ? _self.excludeFilter : excludeFilter // ignore: cast_nullable_to_non_nullable\nas String?,excludeType: freezed == excludeType ? _self.excludeType : excludeType // ignore: cast_nullable_to_non_nullable\nas String?,expectedStatus: freezed == expectedStatus ? _self.expectedStatus : expectedStatus // ignore: cast_nullable_to_non_nullable\nas dynamic,hidden: freezed == hidden ? _self.hidden : hidden // ignore: cast_nullable_to_non_nullable\nas bool?,icon: freezed == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable\nas String?,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$RuleProvider {\n\n String get name;\n/// Create a copy of RuleProvider\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$RuleProviderCopyWith<RuleProvider> get copyWith => _$RuleProviderCopyWithImpl<RuleProvider>(this as RuleProvider, _$identity);\n\n  /// Serializes this RuleProvider to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is RuleProvider&&(identical(other.name, name) || other.name == name));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,name);\n\n@override\nString toString() {\n  return 'RuleProvider(name: $name)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $RuleProviderCopyWith<$Res>  {\n  factory $RuleProviderCopyWith(RuleProvider value, $Res Function(RuleProvider) _then) = _$RuleProviderCopyWithImpl;\n@useResult\n$Res call({\n String name\n});\n\n\n\n\n}\n/// @nodoc\nclass _$RuleProviderCopyWithImpl<$Res>\n    implements $RuleProviderCopyWith<$Res> {\n  _$RuleProviderCopyWithImpl(this._self, this._then);\n\n  final RuleProvider _self;\n  final $Res Function(RuleProvider) _then;\n\n/// Create a copy of RuleProvider\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? name = null,}) {\n  return _then(_self.copyWith(\nname: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [RuleProvider].\nextension RuleProviderPatterns on RuleProvider {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _RuleProvider value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _RuleProvider() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _RuleProvider value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _RuleProvider():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _RuleProvider value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _RuleProvider() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String name)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _RuleProvider() when $default != null:\nreturn $default(_that.name);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String name)  $default,) {final _that = this;\nswitch (_that) {\ncase _RuleProvider():\nreturn $default(_that.name);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String name)?  $default,) {final _that = this;\nswitch (_that) {\ncase _RuleProvider() when $default != null:\nreturn $default(_that.name);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _RuleProvider implements RuleProvider {\n  const _RuleProvider({required this.name});\n  factory _RuleProvider.fromJson(Map<String, dynamic> json) => _$RuleProviderFromJson(json);\n\n@override final  String name;\n\n/// Create a copy of RuleProvider\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$RuleProviderCopyWith<_RuleProvider> get copyWith => __$RuleProviderCopyWithImpl<_RuleProvider>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$RuleProviderToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _RuleProvider&&(identical(other.name, name) || other.name == name));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,name);\n\n@override\nString toString() {\n  return 'RuleProvider(name: $name)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$RuleProviderCopyWith<$Res> implements $RuleProviderCopyWith<$Res> {\n  factory _$RuleProviderCopyWith(_RuleProvider value, $Res Function(_RuleProvider) _then) = __$RuleProviderCopyWithImpl;\n@override @useResult\n$Res call({\n String name\n});\n\n\n\n\n}\n/// @nodoc\nclass __$RuleProviderCopyWithImpl<$Res>\n    implements _$RuleProviderCopyWith<$Res> {\n  __$RuleProviderCopyWithImpl(this._self, this._then);\n\n  final _RuleProvider _self;\n  final $Res Function(_RuleProvider) _then;\n\n/// Create a copy of RuleProvider\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? name = null,}) {\n  return _then(_RuleProvider(\nname: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$Sniffer {\n\n bool get enable;@JsonKey(name: 'override-destination') bool get overrideDest; List<String> get sniffing;@JsonKey(name: 'force-domain') List<String> get forceDomain;@JsonKey(name: 'skip-src-address') List<String> get skipSrcAddress;@JsonKey(name: 'skip-dst-address') List<String> get skipDstAddress;@JsonKey(name: 'skip-domain') List<String> get skipDomain;@JsonKey(name: 'port-whitelist') List<String> get port;@JsonKey(name: 'force-dns-mapping') bool get forceDnsMapping;@JsonKey(name: 'parse-pure-ip') bool get parsePureIp; Map<String, SnifferConfig> get sniff;\n/// Create a copy of Sniffer\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$SnifferCopyWith<Sniffer> get copyWith => _$SnifferCopyWithImpl<Sniffer>(this as Sniffer, _$identity);\n\n  /// Serializes this Sniffer to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is Sniffer&&(identical(other.enable, enable) || other.enable == enable)&&(identical(other.overrideDest, overrideDest) || other.overrideDest == overrideDest)&&const DeepCollectionEquality().equals(other.sniffing, sniffing)&&const DeepCollectionEquality().equals(other.forceDomain, forceDomain)&&const DeepCollectionEquality().equals(other.skipSrcAddress, skipSrcAddress)&&const DeepCollectionEquality().equals(other.skipDstAddress, skipDstAddress)&&const DeepCollectionEquality().equals(other.skipDomain, skipDomain)&&const DeepCollectionEquality().equals(other.port, port)&&(identical(other.forceDnsMapping, forceDnsMapping) || other.forceDnsMapping == forceDnsMapping)&&(identical(other.parsePureIp, parsePureIp) || other.parsePureIp == parsePureIp)&&const DeepCollectionEquality().equals(other.sniff, sniff));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,enable,overrideDest,const DeepCollectionEquality().hash(sniffing),const DeepCollectionEquality().hash(forceDomain),const DeepCollectionEquality().hash(skipSrcAddress),const DeepCollectionEquality().hash(skipDstAddress),const DeepCollectionEquality().hash(skipDomain),const DeepCollectionEquality().hash(port),forceDnsMapping,parsePureIp,const DeepCollectionEquality().hash(sniff));\n\n@override\nString toString() {\n  return 'Sniffer(enable: $enable, overrideDest: $overrideDest, sniffing: $sniffing, forceDomain: $forceDomain, skipSrcAddress: $skipSrcAddress, skipDstAddress: $skipDstAddress, skipDomain: $skipDomain, port: $port, forceDnsMapping: $forceDnsMapping, parsePureIp: $parsePureIp, sniff: $sniff)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $SnifferCopyWith<$Res>  {\n  factory $SnifferCopyWith(Sniffer value, $Res Function(Sniffer) _then) = _$SnifferCopyWithImpl;\n@useResult\n$Res call({\n bool enable,@JsonKey(name: 'override-destination') bool overrideDest, List<String> sniffing,@JsonKey(name: 'force-domain') List<String> forceDomain,@JsonKey(name: 'skip-src-address') List<String> skipSrcAddress,@JsonKey(name: 'skip-dst-address') List<String> skipDstAddress,@JsonKey(name: 'skip-domain') List<String> skipDomain,@JsonKey(name: 'port-whitelist') List<String> port,@JsonKey(name: 'force-dns-mapping') bool forceDnsMapping,@JsonKey(name: 'parse-pure-ip') bool parsePureIp, Map<String, SnifferConfig> sniff\n});\n\n\n\n\n}\n/// @nodoc\nclass _$SnifferCopyWithImpl<$Res>\n    implements $SnifferCopyWith<$Res> {\n  _$SnifferCopyWithImpl(this._self, this._then);\n\n  final Sniffer _self;\n  final $Res Function(Sniffer) _then;\n\n/// Create a copy of Sniffer\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? enable = null,Object? overrideDest = null,Object? sniffing = null,Object? forceDomain = null,Object? skipSrcAddress = null,Object? skipDstAddress = null,Object? skipDomain = null,Object? port = null,Object? forceDnsMapping = null,Object? parsePureIp = null,Object? sniff = null,}) {\n  return _then(_self.copyWith(\nenable: null == enable ? _self.enable : enable // ignore: cast_nullable_to_non_nullable\nas bool,overrideDest: null == overrideDest ? _self.overrideDest : overrideDest // ignore: cast_nullable_to_non_nullable\nas bool,sniffing: null == sniffing ? _self.sniffing : sniffing // ignore: cast_nullable_to_non_nullable\nas List<String>,forceDomain: null == forceDomain ? _self.forceDomain : forceDomain // ignore: cast_nullable_to_non_nullable\nas List<String>,skipSrcAddress: null == skipSrcAddress ? _self.skipSrcAddress : skipSrcAddress // ignore: cast_nullable_to_non_nullable\nas List<String>,skipDstAddress: null == skipDstAddress ? _self.skipDstAddress : skipDstAddress // ignore: cast_nullable_to_non_nullable\nas List<String>,skipDomain: null == skipDomain ? _self.skipDomain : skipDomain // ignore: cast_nullable_to_non_nullable\nas List<String>,port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable\nas List<String>,forceDnsMapping: null == forceDnsMapping ? _self.forceDnsMapping : forceDnsMapping // ignore: cast_nullable_to_non_nullable\nas bool,parsePureIp: null == parsePureIp ? _self.parsePureIp : parsePureIp // ignore: cast_nullable_to_non_nullable\nas bool,sniff: null == sniff ? _self.sniff : sniff // ignore: cast_nullable_to_non_nullable\nas Map<String, SnifferConfig>,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [Sniffer].\nextension SnifferPatterns on Sniffer {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Sniffer value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _Sniffer() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Sniffer value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Sniffer():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Sniffer value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Sniffer() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool enable, @JsonKey(name: 'override-destination')  bool overrideDest,  List<String> sniffing, @JsonKey(name: 'force-domain')  List<String> forceDomain, @JsonKey(name: 'skip-src-address')  List<String> skipSrcAddress, @JsonKey(name: 'skip-dst-address')  List<String> skipDstAddress, @JsonKey(name: 'skip-domain')  List<String> skipDomain, @JsonKey(name: 'port-whitelist')  List<String> port, @JsonKey(name: 'force-dns-mapping')  bool forceDnsMapping, @JsonKey(name: 'parse-pure-ip')  bool parsePureIp,  Map<String, SnifferConfig> sniff)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _Sniffer() when $default != null:\nreturn $default(_that.enable,_that.overrideDest,_that.sniffing,_that.forceDomain,_that.skipSrcAddress,_that.skipDstAddress,_that.skipDomain,_that.port,_that.forceDnsMapping,_that.parsePureIp,_that.sniff);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool enable, @JsonKey(name: 'override-destination')  bool overrideDest,  List<String> sniffing, @JsonKey(name: 'force-domain')  List<String> forceDomain, @JsonKey(name: 'skip-src-address')  List<String> skipSrcAddress, @JsonKey(name: 'skip-dst-address')  List<String> skipDstAddress, @JsonKey(name: 'skip-domain')  List<String> skipDomain, @JsonKey(name: 'port-whitelist')  List<String> port, @JsonKey(name: 'force-dns-mapping')  bool forceDnsMapping, @JsonKey(name: 'parse-pure-ip')  bool parsePureIp,  Map<String, SnifferConfig> sniff)  $default,) {final _that = this;\nswitch (_that) {\ncase _Sniffer():\nreturn $default(_that.enable,_that.overrideDest,_that.sniffing,_that.forceDomain,_that.skipSrcAddress,_that.skipDstAddress,_that.skipDomain,_that.port,_that.forceDnsMapping,_that.parsePureIp,_that.sniff);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool enable, @JsonKey(name: 'override-destination')  bool overrideDest,  List<String> sniffing, @JsonKey(name: 'force-domain')  List<String> forceDomain, @JsonKey(name: 'skip-src-address')  List<String> skipSrcAddress, @JsonKey(name: 'skip-dst-address')  List<String> skipDstAddress, @JsonKey(name: 'skip-domain')  List<String> skipDomain, @JsonKey(name: 'port-whitelist')  List<String> port, @JsonKey(name: 'force-dns-mapping')  bool forceDnsMapping, @JsonKey(name: 'parse-pure-ip')  bool parsePureIp,  Map<String, SnifferConfig> sniff)?  $default,) {final _that = this;\nswitch (_that) {\ncase _Sniffer() when $default != null:\nreturn $default(_that.enable,_that.overrideDest,_that.sniffing,_that.forceDomain,_that.skipSrcAddress,_that.skipDstAddress,_that.skipDomain,_that.port,_that.forceDnsMapping,_that.parsePureIp,_that.sniff);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _Sniffer implements Sniffer {\n  const _Sniffer({this.enable = false, @JsonKey(name: 'override-destination') this.overrideDest = true, final  List<String> sniffing = const [], @JsonKey(name: 'force-domain') final  List<String> forceDomain = const [], @JsonKey(name: 'skip-src-address') final  List<String> skipSrcAddress = const [], @JsonKey(name: 'skip-dst-address') final  List<String> skipDstAddress = const [], @JsonKey(name: 'skip-domain') final  List<String> skipDomain = const [], @JsonKey(name: 'port-whitelist') final  List<String> port = const [], @JsonKey(name: 'force-dns-mapping') this.forceDnsMapping = true, @JsonKey(name: 'parse-pure-ip') this.parsePureIp = true, final  Map<String, SnifferConfig> sniff = const {}}): _sniffing = sniffing,_forceDomain = forceDomain,_skipSrcAddress = skipSrcAddress,_skipDstAddress = skipDstAddress,_skipDomain = skipDomain,_port = port,_sniff = sniff;\n  factory _Sniffer.fromJson(Map<String, dynamic> json) => _$SnifferFromJson(json);\n\n@override@JsonKey() final  bool enable;\n@override@JsonKey(name: 'override-destination') final  bool overrideDest;\n final  List<String> _sniffing;\n@override@JsonKey() List<String> get sniffing {\n  if (_sniffing is EqualUnmodifiableListView) return _sniffing;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_sniffing);\n}\n\n final  List<String> _forceDomain;\n@override@JsonKey(name: 'force-domain') List<String> get forceDomain {\n  if (_forceDomain is EqualUnmodifiableListView) return _forceDomain;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_forceDomain);\n}\n\n final  List<String> _skipSrcAddress;\n@override@JsonKey(name: 'skip-src-address') List<String> get skipSrcAddress {\n  if (_skipSrcAddress is EqualUnmodifiableListView) return _skipSrcAddress;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_skipSrcAddress);\n}\n\n final  List<String> _skipDstAddress;\n@override@JsonKey(name: 'skip-dst-address') List<String> get skipDstAddress {\n  if (_skipDstAddress is EqualUnmodifiableListView) return _skipDstAddress;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_skipDstAddress);\n}\n\n final  List<String> _skipDomain;\n@override@JsonKey(name: 'skip-domain') List<String> get skipDomain {\n  if (_skipDomain is EqualUnmodifiableListView) return _skipDomain;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_skipDomain);\n}\n\n final  List<String> _port;\n@override@JsonKey(name: 'port-whitelist') List<String> get port {\n  if (_port is EqualUnmodifiableListView) return _port;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_port);\n}\n\n@override@JsonKey(name: 'force-dns-mapping') final  bool forceDnsMapping;\n@override@JsonKey(name: 'parse-pure-ip') final  bool parsePureIp;\n final  Map<String, SnifferConfig> _sniff;\n@override@JsonKey() Map<String, SnifferConfig> get sniff {\n  if (_sniff is EqualUnmodifiableMapView) return _sniff;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableMapView(_sniff);\n}\n\n\n/// Create a copy of Sniffer\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$SnifferCopyWith<_Sniffer> get copyWith => __$SnifferCopyWithImpl<_Sniffer>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$SnifferToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Sniffer&&(identical(other.enable, enable) || other.enable == enable)&&(identical(other.overrideDest, overrideDest) || other.overrideDest == overrideDest)&&const DeepCollectionEquality().equals(other._sniffing, _sniffing)&&const DeepCollectionEquality().equals(other._forceDomain, _forceDomain)&&const DeepCollectionEquality().equals(other._skipSrcAddress, _skipSrcAddress)&&const DeepCollectionEquality().equals(other._skipDstAddress, _skipDstAddress)&&const DeepCollectionEquality().equals(other._skipDomain, _skipDomain)&&const DeepCollectionEquality().equals(other._port, _port)&&(identical(other.forceDnsMapping, forceDnsMapping) || other.forceDnsMapping == forceDnsMapping)&&(identical(other.parsePureIp, parsePureIp) || other.parsePureIp == parsePureIp)&&const DeepCollectionEquality().equals(other._sniff, _sniff));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,enable,overrideDest,const DeepCollectionEquality().hash(_sniffing),const DeepCollectionEquality().hash(_forceDomain),const DeepCollectionEquality().hash(_skipSrcAddress),const DeepCollectionEquality().hash(_skipDstAddress),const DeepCollectionEquality().hash(_skipDomain),const DeepCollectionEquality().hash(_port),forceDnsMapping,parsePureIp,const DeepCollectionEquality().hash(_sniff));\n\n@override\nString toString() {\n  return 'Sniffer(enable: $enable, overrideDest: $overrideDest, sniffing: $sniffing, forceDomain: $forceDomain, skipSrcAddress: $skipSrcAddress, skipDstAddress: $skipDstAddress, skipDomain: $skipDomain, port: $port, forceDnsMapping: $forceDnsMapping, parsePureIp: $parsePureIp, sniff: $sniff)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$SnifferCopyWith<$Res> implements $SnifferCopyWith<$Res> {\n  factory _$SnifferCopyWith(_Sniffer value, $Res Function(_Sniffer) _then) = __$SnifferCopyWithImpl;\n@override @useResult\n$Res call({\n bool enable,@JsonKey(name: 'override-destination') bool overrideDest, List<String> sniffing,@JsonKey(name: 'force-domain') List<String> forceDomain,@JsonKey(name: 'skip-src-address') List<String> skipSrcAddress,@JsonKey(name: 'skip-dst-address') List<String> skipDstAddress,@JsonKey(name: 'skip-domain') List<String> skipDomain,@JsonKey(name: 'port-whitelist') List<String> port,@JsonKey(name: 'force-dns-mapping') bool forceDnsMapping,@JsonKey(name: 'parse-pure-ip') bool parsePureIp, Map<String, SnifferConfig> sniff\n});\n\n\n\n\n}\n/// @nodoc\nclass __$SnifferCopyWithImpl<$Res>\n    implements _$SnifferCopyWith<$Res> {\n  __$SnifferCopyWithImpl(this._self, this._then);\n\n  final _Sniffer _self;\n  final $Res Function(_Sniffer) _then;\n\n/// Create a copy of Sniffer\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? enable = null,Object? overrideDest = null,Object? sniffing = null,Object? forceDomain = null,Object? skipSrcAddress = null,Object? skipDstAddress = null,Object? skipDomain = null,Object? port = null,Object? forceDnsMapping = null,Object? parsePureIp = null,Object? sniff = null,}) {\n  return _then(_Sniffer(\nenable: null == enable ? _self.enable : enable // ignore: cast_nullable_to_non_nullable\nas bool,overrideDest: null == overrideDest ? _self.overrideDest : overrideDest // ignore: cast_nullable_to_non_nullable\nas bool,sniffing: null == sniffing ? _self._sniffing : sniffing // ignore: cast_nullable_to_non_nullable\nas List<String>,forceDomain: null == forceDomain ? _self._forceDomain : forceDomain // ignore: cast_nullable_to_non_nullable\nas List<String>,skipSrcAddress: null == skipSrcAddress ? _self._skipSrcAddress : skipSrcAddress // ignore: cast_nullable_to_non_nullable\nas List<String>,skipDstAddress: null == skipDstAddress ? _self._skipDstAddress : skipDstAddress // ignore: cast_nullable_to_non_nullable\nas List<String>,skipDomain: null == skipDomain ? _self._skipDomain : skipDomain // ignore: cast_nullable_to_non_nullable\nas List<String>,port: null == port ? _self._port : port // ignore: cast_nullable_to_non_nullable\nas List<String>,forceDnsMapping: null == forceDnsMapping ? _self.forceDnsMapping : forceDnsMapping // ignore: cast_nullable_to_non_nullable\nas bool,parsePureIp: null == parsePureIp ? _self.parsePureIp : parsePureIp // ignore: cast_nullable_to_non_nullable\nas bool,sniff: null == sniff ? _self._sniff : sniff // ignore: cast_nullable_to_non_nullable\nas Map<String, SnifferConfig>,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$SnifferConfig {\n\n@JsonKey(fromJson: _formJsonPorts) List<String> get ports;@JsonKey(name: 'override-destination') bool? get overrideDest;\n/// Create a copy of SnifferConfig\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$SnifferConfigCopyWith<SnifferConfig> get copyWith => _$SnifferConfigCopyWithImpl<SnifferConfig>(this as SnifferConfig, _$identity);\n\n  /// Serializes this SnifferConfig to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is SnifferConfig&&const DeepCollectionEquality().equals(other.ports, ports)&&(identical(other.overrideDest, overrideDest) || other.overrideDest == overrideDest));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(ports),overrideDest);\n\n@override\nString toString() {\n  return 'SnifferConfig(ports: $ports, overrideDest: $overrideDest)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $SnifferConfigCopyWith<$Res>  {\n  factory $SnifferConfigCopyWith(SnifferConfig value, $Res Function(SnifferConfig) _then) = _$SnifferConfigCopyWithImpl;\n@useResult\n$Res call({\n@JsonKey(fromJson: _formJsonPorts) List<String> ports,@JsonKey(name: 'override-destination') bool? overrideDest\n});\n\n\n\n\n}\n/// @nodoc\nclass _$SnifferConfigCopyWithImpl<$Res>\n    implements $SnifferConfigCopyWith<$Res> {\n  _$SnifferConfigCopyWithImpl(this._self, this._then);\n\n  final SnifferConfig _self;\n  final $Res Function(SnifferConfig) _then;\n\n/// Create a copy of SnifferConfig\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? ports = null,Object? overrideDest = freezed,}) {\n  return _then(_self.copyWith(\nports: null == ports ? _self.ports : ports // ignore: cast_nullable_to_non_nullable\nas List<String>,overrideDest: freezed == overrideDest ? _self.overrideDest : overrideDest // ignore: cast_nullable_to_non_nullable\nas bool?,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [SnifferConfig].\nextension SnifferConfigPatterns on SnifferConfig {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnifferConfig value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _SnifferConfig() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnifferConfig value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _SnifferConfig():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnifferConfig value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _SnifferConfig() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(fromJson: _formJsonPorts)  List<String> ports, @JsonKey(name: 'override-destination')  bool? overrideDest)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _SnifferConfig() when $default != null:\nreturn $default(_that.ports,_that.overrideDest);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(fromJson: _formJsonPorts)  List<String> ports, @JsonKey(name: 'override-destination')  bool? overrideDest)  $default,) {final _that = this;\nswitch (_that) {\ncase _SnifferConfig():\nreturn $default(_that.ports,_that.overrideDest);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(fromJson: _formJsonPorts)  List<String> ports, @JsonKey(name: 'override-destination')  bool? overrideDest)?  $default,) {final _that = this;\nswitch (_that) {\ncase _SnifferConfig() when $default != null:\nreturn $default(_that.ports,_that.overrideDest);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _SnifferConfig implements SnifferConfig {\n  const _SnifferConfig({@JsonKey(fromJson: _formJsonPorts) final  List<String> ports = const [], @JsonKey(name: 'override-destination') this.overrideDest}): _ports = ports;\n  factory _SnifferConfig.fromJson(Map<String, dynamic> json) => _$SnifferConfigFromJson(json);\n\n final  List<String> _ports;\n@override@JsonKey(fromJson: _formJsonPorts) List<String> get ports {\n  if (_ports is EqualUnmodifiableListView) return _ports;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_ports);\n}\n\n@override@JsonKey(name: 'override-destination') final  bool? overrideDest;\n\n/// Create a copy of SnifferConfig\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$SnifferConfigCopyWith<_SnifferConfig> get copyWith => __$SnifferConfigCopyWithImpl<_SnifferConfig>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$SnifferConfigToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnifferConfig&&const DeepCollectionEquality().equals(other._ports, _ports)&&(identical(other.overrideDest, overrideDest) || other.overrideDest == overrideDest));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_ports),overrideDest);\n\n@override\nString toString() {\n  return 'SnifferConfig(ports: $ports, overrideDest: $overrideDest)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$SnifferConfigCopyWith<$Res> implements $SnifferConfigCopyWith<$Res> {\n  factory _$SnifferConfigCopyWith(_SnifferConfig value, $Res Function(_SnifferConfig) _then) = __$SnifferConfigCopyWithImpl;\n@override @useResult\n$Res call({\n@JsonKey(fromJson: _formJsonPorts) List<String> ports,@JsonKey(name: 'override-destination') bool? overrideDest\n});\n\n\n\n\n}\n/// @nodoc\nclass __$SnifferConfigCopyWithImpl<$Res>\n    implements _$SnifferConfigCopyWith<$Res> {\n  __$SnifferConfigCopyWithImpl(this._self, this._then);\n\n  final _SnifferConfig _self;\n  final $Res Function(_SnifferConfig) _then;\n\n/// Create a copy of SnifferConfig\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? ports = null,Object? overrideDest = freezed,}) {\n  return _then(_SnifferConfig(\nports: null == ports ? _self._ports : ports // ignore: cast_nullable_to_non_nullable\nas List<String>,overrideDest: freezed == overrideDest ? _self.overrideDest : overrideDest // ignore: cast_nullable_to_non_nullable\nas bool?,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$Tun {\n\n bool get enable; String get device;@JsonKey(name: 'auto-route') bool get autoRoute; TunStack get stack;@JsonKey(name: 'dns-hijack') List<String> get dnsHijack;@JsonKey(name: 'route-address') List<String> get routeAddress;\n/// Create a copy of Tun\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$TunCopyWith<Tun> get copyWith => _$TunCopyWithImpl<Tun>(this as Tun, _$identity);\n\n  /// Serializes this Tun to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is Tun&&(identical(other.enable, enable) || other.enable == enable)&&(identical(other.device, device) || other.device == device)&&(identical(other.autoRoute, autoRoute) || other.autoRoute == autoRoute)&&(identical(other.stack, stack) || other.stack == stack)&&const DeepCollectionEquality().equals(other.dnsHijack, dnsHijack)&&const DeepCollectionEquality().equals(other.routeAddress, routeAddress));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,enable,device,autoRoute,stack,const DeepCollectionEquality().hash(dnsHijack),const DeepCollectionEquality().hash(routeAddress));\n\n@override\nString toString() {\n  return 'Tun(enable: $enable, device: $device, autoRoute: $autoRoute, stack: $stack, dnsHijack: $dnsHijack, routeAddress: $routeAddress)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $TunCopyWith<$Res>  {\n  factory $TunCopyWith(Tun value, $Res Function(Tun) _then) = _$TunCopyWithImpl;\n@useResult\n$Res call({\n bool enable, String device,@JsonKey(name: 'auto-route') bool autoRoute, TunStack stack,@JsonKey(name: 'dns-hijack') List<String> dnsHijack,@JsonKey(name: 'route-address') List<String> routeAddress\n});\n\n\n\n\n}\n/// @nodoc\nclass _$TunCopyWithImpl<$Res>\n    implements $TunCopyWith<$Res> {\n  _$TunCopyWithImpl(this._self, this._then);\n\n  final Tun _self;\n  final $Res Function(Tun) _then;\n\n/// Create a copy of Tun\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? enable = null,Object? device = null,Object? autoRoute = null,Object? stack = null,Object? dnsHijack = null,Object? routeAddress = null,}) {\n  return _then(_self.copyWith(\nenable: null == enable ? _self.enable : enable // ignore: cast_nullable_to_non_nullable\nas bool,device: null == device ? _self.device : device // ignore: cast_nullable_to_non_nullable\nas String,autoRoute: null == autoRoute ? _self.autoRoute : autoRoute // ignore: cast_nullable_to_non_nullable\nas bool,stack: null == stack ? _self.stack : stack // ignore: cast_nullable_to_non_nullable\nas TunStack,dnsHijack: null == dnsHijack ? _self.dnsHijack : dnsHijack // ignore: cast_nullable_to_non_nullable\nas List<String>,routeAddress: null == routeAddress ? _self.routeAddress : routeAddress // ignore: cast_nullable_to_non_nullable\nas List<String>,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [Tun].\nextension TunPatterns on Tun {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Tun value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _Tun() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Tun value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Tun():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Tun value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Tun() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool enable,  String device, @JsonKey(name: 'auto-route')  bool autoRoute,  TunStack stack, @JsonKey(name: 'dns-hijack')  List<String> dnsHijack, @JsonKey(name: 'route-address')  List<String> routeAddress)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _Tun() when $default != null:\nreturn $default(_that.enable,_that.device,_that.autoRoute,_that.stack,_that.dnsHijack,_that.routeAddress);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool enable,  String device, @JsonKey(name: 'auto-route')  bool autoRoute,  TunStack stack, @JsonKey(name: 'dns-hijack')  List<String> dnsHijack, @JsonKey(name: 'route-address')  List<String> routeAddress)  $default,) {final _that = this;\nswitch (_that) {\ncase _Tun():\nreturn $default(_that.enable,_that.device,_that.autoRoute,_that.stack,_that.dnsHijack,_that.routeAddress);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool enable,  String device, @JsonKey(name: 'auto-route')  bool autoRoute,  TunStack stack, @JsonKey(name: 'dns-hijack')  List<String> dnsHijack, @JsonKey(name: 'route-address')  List<String> routeAddress)?  $default,) {final _that = this;\nswitch (_that) {\ncase _Tun() when $default != null:\nreturn $default(_that.enable,_that.device,_that.autoRoute,_that.stack,_that.dnsHijack,_that.routeAddress);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _Tun implements Tun {\n  const _Tun({this.enable = false, this.device = appName, @JsonKey(name: 'auto-route') this.autoRoute = false, this.stack = TunStack.mixed, @JsonKey(name: 'dns-hijack') final  List<String> dnsHijack = const ['any:53'], @JsonKey(name: 'route-address') final  List<String> routeAddress = const []}): _dnsHijack = dnsHijack,_routeAddress = routeAddress;\n  factory _Tun.fromJson(Map<String, dynamic> json) => _$TunFromJson(json);\n\n@override@JsonKey() final  bool enable;\n@override@JsonKey() final  String device;\n@override@JsonKey(name: 'auto-route') final  bool autoRoute;\n@override@JsonKey() final  TunStack stack;\n final  List<String> _dnsHijack;\n@override@JsonKey(name: 'dns-hijack') List<String> get dnsHijack {\n  if (_dnsHijack is EqualUnmodifiableListView) return _dnsHijack;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_dnsHijack);\n}\n\n final  List<String> _routeAddress;\n@override@JsonKey(name: 'route-address') List<String> get routeAddress {\n  if (_routeAddress is EqualUnmodifiableListView) return _routeAddress;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_routeAddress);\n}\n\n\n/// Create a copy of Tun\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$TunCopyWith<_Tun> get copyWith => __$TunCopyWithImpl<_Tun>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$TunToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Tun&&(identical(other.enable, enable) || other.enable == enable)&&(identical(other.device, device) || other.device == device)&&(identical(other.autoRoute, autoRoute) || other.autoRoute == autoRoute)&&(identical(other.stack, stack) || other.stack == stack)&&const DeepCollectionEquality().equals(other._dnsHijack, _dnsHijack)&&const DeepCollectionEquality().equals(other._routeAddress, _routeAddress));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,enable,device,autoRoute,stack,const DeepCollectionEquality().hash(_dnsHijack),const DeepCollectionEquality().hash(_routeAddress));\n\n@override\nString toString() {\n  return 'Tun(enable: $enable, device: $device, autoRoute: $autoRoute, stack: $stack, dnsHijack: $dnsHijack, routeAddress: $routeAddress)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$TunCopyWith<$Res> implements $TunCopyWith<$Res> {\n  factory _$TunCopyWith(_Tun value, $Res Function(_Tun) _then) = __$TunCopyWithImpl;\n@override @useResult\n$Res call({\n bool enable, String device,@JsonKey(name: 'auto-route') bool autoRoute, TunStack stack,@JsonKey(name: 'dns-hijack') List<String> dnsHijack,@JsonKey(name: 'route-address') List<String> routeAddress\n});\n\n\n\n\n}\n/// @nodoc\nclass __$TunCopyWithImpl<$Res>\n    implements _$TunCopyWith<$Res> {\n  __$TunCopyWithImpl(this._self, this._then);\n\n  final _Tun _self;\n  final $Res Function(_Tun) _then;\n\n/// Create a copy of Tun\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? enable = null,Object? device = null,Object? autoRoute = null,Object? stack = null,Object? dnsHijack = null,Object? routeAddress = null,}) {\n  return _then(_Tun(\nenable: null == enable ? _self.enable : enable // ignore: cast_nullable_to_non_nullable\nas bool,device: null == device ? _self.device : device // ignore: cast_nullable_to_non_nullable\nas String,autoRoute: null == autoRoute ? _self.autoRoute : autoRoute // ignore: cast_nullable_to_non_nullable\nas bool,stack: null == stack ? _self.stack : stack // ignore: cast_nullable_to_non_nullable\nas TunStack,dnsHijack: null == dnsHijack ? _self._dnsHijack : dnsHijack // ignore: cast_nullable_to_non_nullable\nas List<String>,routeAddress: null == routeAddress ? _self._routeAddress : routeAddress // ignore: cast_nullable_to_non_nullable\nas List<String>,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$FallbackFilter {\n\n bool get geoip;@JsonKey(name: 'geoip-code') String get geoipCode; List<String> get geosite; List<String> get ipcidr; List<String> get domain;\n/// Create a copy of FallbackFilter\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$FallbackFilterCopyWith<FallbackFilter> get copyWith => _$FallbackFilterCopyWithImpl<FallbackFilter>(this as FallbackFilter, _$identity);\n\n  /// Serializes this FallbackFilter to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is FallbackFilter&&(identical(other.geoip, geoip) || other.geoip == geoip)&&(identical(other.geoipCode, geoipCode) || other.geoipCode == geoipCode)&&const DeepCollectionEquality().equals(other.geosite, geosite)&&const DeepCollectionEquality().equals(other.ipcidr, ipcidr)&&const DeepCollectionEquality().equals(other.domain, domain));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,geoip,geoipCode,const DeepCollectionEquality().hash(geosite),const DeepCollectionEquality().hash(ipcidr),const DeepCollectionEquality().hash(domain));\n\n@override\nString toString() {\n  return 'FallbackFilter(geoip: $geoip, geoipCode: $geoipCode, geosite: $geosite, ipcidr: $ipcidr, domain: $domain)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $FallbackFilterCopyWith<$Res>  {\n  factory $FallbackFilterCopyWith(FallbackFilter value, $Res Function(FallbackFilter) _then) = _$FallbackFilterCopyWithImpl;\n@useResult\n$Res call({\n bool geoip,@JsonKey(name: 'geoip-code') String geoipCode, List<String> geosite, List<String> ipcidr, List<String> domain\n});\n\n\n\n\n}\n/// @nodoc\nclass _$FallbackFilterCopyWithImpl<$Res>\n    implements $FallbackFilterCopyWith<$Res> {\n  _$FallbackFilterCopyWithImpl(this._self, this._then);\n\n  final FallbackFilter _self;\n  final $Res Function(FallbackFilter) _then;\n\n/// Create a copy of FallbackFilter\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? geoip = null,Object? geoipCode = null,Object? geosite = null,Object? ipcidr = null,Object? domain = null,}) {\n  return _then(_self.copyWith(\ngeoip: null == geoip ? _self.geoip : geoip // ignore: cast_nullable_to_non_nullable\nas bool,geoipCode: null == geoipCode ? _self.geoipCode : geoipCode // ignore: cast_nullable_to_non_nullable\nas String,geosite: null == geosite ? _self.geosite : geosite // ignore: cast_nullable_to_non_nullable\nas List<String>,ipcidr: null == ipcidr ? _self.ipcidr : ipcidr // ignore: cast_nullable_to_non_nullable\nas List<String>,domain: null == domain ? _self.domain : domain // ignore: cast_nullable_to_non_nullable\nas List<String>,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [FallbackFilter].\nextension FallbackFilterPatterns on FallbackFilter {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _FallbackFilter value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _FallbackFilter() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _FallbackFilter value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _FallbackFilter():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _FallbackFilter value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _FallbackFilter() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool geoip, @JsonKey(name: 'geoip-code')  String geoipCode,  List<String> geosite,  List<String> ipcidr,  List<String> domain)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _FallbackFilter() when $default != null:\nreturn $default(_that.geoip,_that.geoipCode,_that.geosite,_that.ipcidr,_that.domain);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool geoip, @JsonKey(name: 'geoip-code')  String geoipCode,  List<String> geosite,  List<String> ipcidr,  List<String> domain)  $default,) {final _that = this;\nswitch (_that) {\ncase _FallbackFilter():\nreturn $default(_that.geoip,_that.geoipCode,_that.geosite,_that.ipcidr,_that.domain);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool geoip, @JsonKey(name: 'geoip-code')  String geoipCode,  List<String> geosite,  List<String> ipcidr,  List<String> domain)?  $default,) {final _that = this;\nswitch (_that) {\ncase _FallbackFilter() when $default != null:\nreturn $default(_that.geoip,_that.geoipCode,_that.geosite,_that.ipcidr,_that.domain);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _FallbackFilter implements FallbackFilter {\n  const _FallbackFilter({this.geoip = true, @JsonKey(name: 'geoip-code') this.geoipCode = 'CN', final  List<String> geosite = const ['gfw'], final  List<String> ipcidr = const ['240.0.0.0/4'], final  List<String> domain = const ['+.google.com', '+.facebook.com', '+.youtube.com']}): _geosite = geosite,_ipcidr = ipcidr,_domain = domain;\n  factory _FallbackFilter.fromJson(Map<String, dynamic> json) => _$FallbackFilterFromJson(json);\n\n@override@JsonKey() final  bool geoip;\n@override@JsonKey(name: 'geoip-code') final  String geoipCode;\n final  List<String> _geosite;\n@override@JsonKey() List<String> get geosite {\n  if (_geosite is EqualUnmodifiableListView) return _geosite;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_geosite);\n}\n\n final  List<String> _ipcidr;\n@override@JsonKey() List<String> get ipcidr {\n  if (_ipcidr is EqualUnmodifiableListView) return _ipcidr;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_ipcidr);\n}\n\n final  List<String> _domain;\n@override@JsonKey() List<String> get domain {\n  if (_domain is EqualUnmodifiableListView) return _domain;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_domain);\n}\n\n\n/// Create a copy of FallbackFilter\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$FallbackFilterCopyWith<_FallbackFilter> get copyWith => __$FallbackFilterCopyWithImpl<_FallbackFilter>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$FallbackFilterToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _FallbackFilter&&(identical(other.geoip, geoip) || other.geoip == geoip)&&(identical(other.geoipCode, geoipCode) || other.geoipCode == geoipCode)&&const DeepCollectionEquality().equals(other._geosite, _geosite)&&const DeepCollectionEquality().equals(other._ipcidr, _ipcidr)&&const DeepCollectionEquality().equals(other._domain, _domain));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,geoip,geoipCode,const DeepCollectionEquality().hash(_geosite),const DeepCollectionEquality().hash(_ipcidr),const DeepCollectionEquality().hash(_domain));\n\n@override\nString toString() {\n  return 'FallbackFilter(geoip: $geoip, geoipCode: $geoipCode, geosite: $geosite, ipcidr: $ipcidr, domain: $domain)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$FallbackFilterCopyWith<$Res> implements $FallbackFilterCopyWith<$Res> {\n  factory _$FallbackFilterCopyWith(_FallbackFilter value, $Res Function(_FallbackFilter) _then) = __$FallbackFilterCopyWithImpl;\n@override @useResult\n$Res call({\n bool geoip,@JsonKey(name: 'geoip-code') String geoipCode, List<String> geosite, List<String> ipcidr, List<String> domain\n});\n\n\n\n\n}\n/// @nodoc\nclass __$FallbackFilterCopyWithImpl<$Res>\n    implements _$FallbackFilterCopyWith<$Res> {\n  __$FallbackFilterCopyWithImpl(this._self, this._then);\n\n  final _FallbackFilter _self;\n  final $Res Function(_FallbackFilter) _then;\n\n/// Create a copy of FallbackFilter\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? geoip = null,Object? geoipCode = null,Object? geosite = null,Object? ipcidr = null,Object? domain = null,}) {\n  return _then(_FallbackFilter(\ngeoip: null == geoip ? _self.geoip : geoip // ignore: cast_nullable_to_non_nullable\nas bool,geoipCode: null == geoipCode ? _self.geoipCode : geoipCode // ignore: cast_nullable_to_non_nullable\nas String,geosite: null == geosite ? _self._geosite : geosite // ignore: cast_nullable_to_non_nullable\nas List<String>,ipcidr: null == ipcidr ? _self._ipcidr : ipcidr // ignore: cast_nullable_to_non_nullable\nas List<String>,domain: null == domain ? _self._domain : domain // ignore: cast_nullable_to_non_nullable\nas List<String>,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$Dns {\n\n bool get enable; String get listen;@JsonKey(name: 'prefer-h3') bool get preferH3;@JsonKey(name: 'use-hosts') bool get useHosts;@JsonKey(name: 'use-system-hosts') bool get useSystemHosts;@JsonKey(name: 'respect-rules') bool get respectRules; bool get ipv6;@JsonKey(name: 'default-nameserver') List<String> get defaultNameserver;@JsonKey(name: 'enhanced-mode') DnsMode get enhancedMode;@JsonKey(name: 'fake-ip-range') String get fakeIpRange;@JsonKey(name: 'fake-ip-filter') List<String> get fakeIpFilter;@JsonKey(name: 'nameserver-policy') Map<String, String> get nameserverPolicy; List<String> get nameserver; List<String> get fallback;@JsonKey(name: 'proxy-server-nameserver') List<String> get proxyServerNameserver;@JsonKey(name: 'fallback-filter') FallbackFilter get fallbackFilter;\n/// Create a copy of Dns\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$DnsCopyWith<Dns> get copyWith => _$DnsCopyWithImpl<Dns>(this as Dns, _$identity);\n\n  /// Serializes this Dns to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is Dns&&(identical(other.enable, enable) || other.enable == enable)&&(identical(other.listen, listen) || other.listen == listen)&&(identical(other.preferH3, preferH3) || other.preferH3 == preferH3)&&(identical(other.useHosts, useHosts) || other.useHosts == useHosts)&&(identical(other.useSystemHosts, useSystemHosts) || other.useSystemHosts == useSystemHosts)&&(identical(other.respectRules, respectRules) || other.respectRules == respectRules)&&(identical(other.ipv6, ipv6) || other.ipv6 == ipv6)&&const DeepCollectionEquality().equals(other.defaultNameserver, defaultNameserver)&&(identical(other.enhancedMode, enhancedMode) || other.enhancedMode == enhancedMode)&&(identical(other.fakeIpRange, fakeIpRange) || other.fakeIpRange == fakeIpRange)&&const DeepCollectionEquality().equals(other.fakeIpFilter, fakeIpFilter)&&const DeepCollectionEquality().equals(other.nameserverPolicy, nameserverPolicy)&&const DeepCollectionEquality().equals(other.nameserver, nameserver)&&const DeepCollectionEquality().equals(other.fallback, fallback)&&const DeepCollectionEquality().equals(other.proxyServerNameserver, proxyServerNameserver)&&(identical(other.fallbackFilter, fallbackFilter) || other.fallbackFilter == fallbackFilter));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,enable,listen,preferH3,useHosts,useSystemHosts,respectRules,ipv6,const DeepCollectionEquality().hash(defaultNameserver),enhancedMode,fakeIpRange,const DeepCollectionEquality().hash(fakeIpFilter),const DeepCollectionEquality().hash(nameserverPolicy),const DeepCollectionEquality().hash(nameserver),const DeepCollectionEquality().hash(fallback),const DeepCollectionEquality().hash(proxyServerNameserver),fallbackFilter);\n\n@override\nString toString() {\n  return 'Dns(enable: $enable, listen: $listen, preferH3: $preferH3, useHosts: $useHosts, useSystemHosts: $useSystemHosts, respectRules: $respectRules, ipv6: $ipv6, defaultNameserver: $defaultNameserver, enhancedMode: $enhancedMode, fakeIpRange: $fakeIpRange, fakeIpFilter: $fakeIpFilter, nameserverPolicy: $nameserverPolicy, nameserver: $nameserver, fallback: $fallback, proxyServerNameserver: $proxyServerNameserver, fallbackFilter: $fallbackFilter)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $DnsCopyWith<$Res>  {\n  factory $DnsCopyWith(Dns value, $Res Function(Dns) _then) = _$DnsCopyWithImpl;\n@useResult\n$Res call({\n bool enable, String listen,@JsonKey(name: 'prefer-h3') bool preferH3,@JsonKey(name: 'use-hosts') bool useHosts,@JsonKey(name: 'use-system-hosts') bool useSystemHosts,@JsonKey(name: 'respect-rules') bool respectRules, bool ipv6,@JsonKey(name: 'default-nameserver') List<String> defaultNameserver,@JsonKey(name: 'enhanced-mode') DnsMode enhancedMode,@JsonKey(name: 'fake-ip-range') String fakeIpRange,@JsonKey(name: 'fake-ip-filter') List<String> fakeIpFilter,@JsonKey(name: 'nameserver-policy') Map<String, String> nameserverPolicy, List<String> nameserver, List<String> fallback,@JsonKey(name: 'proxy-server-nameserver') List<String> proxyServerNameserver,@JsonKey(name: 'fallback-filter') FallbackFilter fallbackFilter\n});\n\n\n$FallbackFilterCopyWith<$Res> get fallbackFilter;\n\n}\n/// @nodoc\nclass _$DnsCopyWithImpl<$Res>\n    implements $DnsCopyWith<$Res> {\n  _$DnsCopyWithImpl(this._self, this._then);\n\n  final Dns _self;\n  final $Res Function(Dns) _then;\n\n/// Create a copy of Dns\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? enable = null,Object? listen = null,Object? preferH3 = null,Object? useHosts = null,Object? useSystemHosts = null,Object? respectRules = null,Object? ipv6 = null,Object? defaultNameserver = null,Object? enhancedMode = null,Object? fakeIpRange = null,Object? fakeIpFilter = null,Object? nameserverPolicy = null,Object? nameserver = null,Object? fallback = null,Object? proxyServerNameserver = null,Object? fallbackFilter = null,}) {\n  return _then(_self.copyWith(\nenable: null == enable ? _self.enable : enable // ignore: cast_nullable_to_non_nullable\nas bool,listen: null == listen ? _self.listen : listen // ignore: cast_nullable_to_non_nullable\nas String,preferH3: null == preferH3 ? _self.preferH3 : preferH3 // ignore: cast_nullable_to_non_nullable\nas bool,useHosts: null == useHosts ? _self.useHosts : useHosts // ignore: cast_nullable_to_non_nullable\nas bool,useSystemHosts: null == useSystemHosts ? _self.useSystemHosts : useSystemHosts // ignore: cast_nullable_to_non_nullable\nas bool,respectRules: null == respectRules ? _self.respectRules : respectRules // ignore: cast_nullable_to_non_nullable\nas bool,ipv6: null == ipv6 ? _self.ipv6 : ipv6 // ignore: cast_nullable_to_non_nullable\nas bool,defaultNameserver: null == defaultNameserver ? _self.defaultNameserver : defaultNameserver // ignore: cast_nullable_to_non_nullable\nas List<String>,enhancedMode: null == enhancedMode ? _self.enhancedMode : enhancedMode // ignore: cast_nullable_to_non_nullable\nas DnsMode,fakeIpRange: null == fakeIpRange ? _self.fakeIpRange : fakeIpRange // ignore: cast_nullable_to_non_nullable\nas String,fakeIpFilter: null == fakeIpFilter ? _self.fakeIpFilter : fakeIpFilter // ignore: cast_nullable_to_non_nullable\nas List<String>,nameserverPolicy: null == nameserverPolicy ? _self.nameserverPolicy : nameserverPolicy // ignore: cast_nullable_to_non_nullable\nas Map<String, String>,nameserver: null == nameserver ? _self.nameserver : nameserver // ignore: cast_nullable_to_non_nullable\nas List<String>,fallback: null == fallback ? _self.fallback : fallback // ignore: cast_nullable_to_non_nullable\nas List<String>,proxyServerNameserver: null == proxyServerNameserver ? _self.proxyServerNameserver : proxyServerNameserver // ignore: cast_nullable_to_non_nullable\nas List<String>,fallbackFilter: null == fallbackFilter ? _self.fallbackFilter : fallbackFilter // ignore: cast_nullable_to_non_nullable\nas FallbackFilter,\n  ));\n}\n/// Create a copy of Dns\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$FallbackFilterCopyWith<$Res> get fallbackFilter {\n  \n  return $FallbackFilterCopyWith<$Res>(_self.fallbackFilter, (value) {\n    return _then(_self.copyWith(fallbackFilter: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [Dns].\nextension DnsPatterns on Dns {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Dns value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _Dns() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Dns value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Dns():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Dns value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Dns() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool enable,  String listen, @JsonKey(name: 'prefer-h3')  bool preferH3, @JsonKey(name: 'use-hosts')  bool useHosts, @JsonKey(name: 'use-system-hosts')  bool useSystemHosts, @JsonKey(name: 'respect-rules')  bool respectRules,  bool ipv6, @JsonKey(name: 'default-nameserver')  List<String> defaultNameserver, @JsonKey(name: 'enhanced-mode')  DnsMode enhancedMode, @JsonKey(name: 'fake-ip-range')  String fakeIpRange, @JsonKey(name: 'fake-ip-filter')  List<String> fakeIpFilter, @JsonKey(name: 'nameserver-policy')  Map<String, String> nameserverPolicy,  List<String> nameserver,  List<String> fallback, @JsonKey(name: 'proxy-server-nameserver')  List<String> proxyServerNameserver, @JsonKey(name: 'fallback-filter')  FallbackFilter fallbackFilter)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _Dns() when $default != null:\nreturn $default(_that.enable,_that.listen,_that.preferH3,_that.useHosts,_that.useSystemHosts,_that.respectRules,_that.ipv6,_that.defaultNameserver,_that.enhancedMode,_that.fakeIpRange,_that.fakeIpFilter,_that.nameserverPolicy,_that.nameserver,_that.fallback,_that.proxyServerNameserver,_that.fallbackFilter);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool enable,  String listen, @JsonKey(name: 'prefer-h3')  bool preferH3, @JsonKey(name: 'use-hosts')  bool useHosts, @JsonKey(name: 'use-system-hosts')  bool useSystemHosts, @JsonKey(name: 'respect-rules')  bool respectRules,  bool ipv6, @JsonKey(name: 'default-nameserver')  List<String> defaultNameserver, @JsonKey(name: 'enhanced-mode')  DnsMode enhancedMode, @JsonKey(name: 'fake-ip-range')  String fakeIpRange, @JsonKey(name: 'fake-ip-filter')  List<String> fakeIpFilter, @JsonKey(name: 'nameserver-policy')  Map<String, String> nameserverPolicy,  List<String> nameserver,  List<String> fallback, @JsonKey(name: 'proxy-server-nameserver')  List<String> proxyServerNameserver, @JsonKey(name: 'fallback-filter')  FallbackFilter fallbackFilter)  $default,) {final _that = this;\nswitch (_that) {\ncase _Dns():\nreturn $default(_that.enable,_that.listen,_that.preferH3,_that.useHosts,_that.useSystemHosts,_that.respectRules,_that.ipv6,_that.defaultNameserver,_that.enhancedMode,_that.fakeIpRange,_that.fakeIpFilter,_that.nameserverPolicy,_that.nameserver,_that.fallback,_that.proxyServerNameserver,_that.fallbackFilter);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool enable,  String listen, @JsonKey(name: 'prefer-h3')  bool preferH3, @JsonKey(name: 'use-hosts')  bool useHosts, @JsonKey(name: 'use-system-hosts')  bool useSystemHosts, @JsonKey(name: 'respect-rules')  bool respectRules,  bool ipv6, @JsonKey(name: 'default-nameserver')  List<String> defaultNameserver, @JsonKey(name: 'enhanced-mode')  DnsMode enhancedMode, @JsonKey(name: 'fake-ip-range')  String fakeIpRange, @JsonKey(name: 'fake-ip-filter')  List<String> fakeIpFilter, @JsonKey(name: 'nameserver-policy')  Map<String, String> nameserverPolicy,  List<String> nameserver,  List<String> fallback, @JsonKey(name: 'proxy-server-nameserver')  List<String> proxyServerNameserver, @JsonKey(name: 'fallback-filter')  FallbackFilter fallbackFilter)?  $default,) {final _that = this;\nswitch (_that) {\ncase _Dns() when $default != null:\nreturn $default(_that.enable,_that.listen,_that.preferH3,_that.useHosts,_that.useSystemHosts,_that.respectRules,_that.ipv6,_that.defaultNameserver,_that.enhancedMode,_that.fakeIpRange,_that.fakeIpFilter,_that.nameserverPolicy,_that.nameserver,_that.fallback,_that.proxyServerNameserver,_that.fallbackFilter);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _Dns implements Dns {\n  const _Dns({this.enable = true, this.listen = '0.0.0.0:1053', @JsonKey(name: 'prefer-h3') this.preferH3 = false, @JsonKey(name: 'use-hosts') this.useHosts = true, @JsonKey(name: 'use-system-hosts') this.useSystemHosts = true, @JsonKey(name: 'respect-rules') this.respectRules = false, this.ipv6 = false, @JsonKey(name: 'default-nameserver') final  List<String> defaultNameserver = const ['223.5.5.5'], @JsonKey(name: 'enhanced-mode') this.enhancedMode = DnsMode.fakeIp, @JsonKey(name: 'fake-ip-range') this.fakeIpRange = '198.18.0.1/16', @JsonKey(name: 'fake-ip-filter') final  List<String> fakeIpFilter = const ['*.lan', 'localhost.ptlogin2.qq.com'], @JsonKey(name: 'nameserver-policy') final  Map<String, String> nameserverPolicy = const {'www.baidu.com' : '114.114.114.114', '+.internal.crop.com' : '10.0.0.1', 'geosite:cn' : 'https://doh.pub/dns-query'}, final  List<String> nameserver = const ['https://doh.pub/dns-query', 'https://dns.alidns.com/dns-query'], final  List<String> fallback = const ['tls://8.8.4.4', 'tls://1.1.1.1'], @JsonKey(name: 'proxy-server-nameserver') final  List<String> proxyServerNameserver = const ['https://doh.pub/dns-query'], @JsonKey(name: 'fallback-filter') this.fallbackFilter = const FallbackFilter()}): _defaultNameserver = defaultNameserver,_fakeIpFilter = fakeIpFilter,_nameserverPolicy = nameserverPolicy,_nameserver = nameserver,_fallback = fallback,_proxyServerNameserver = proxyServerNameserver;\n  factory _Dns.fromJson(Map<String, dynamic> json) => _$DnsFromJson(json);\n\n@override@JsonKey() final  bool enable;\n@override@JsonKey() final  String listen;\n@override@JsonKey(name: 'prefer-h3') final  bool preferH3;\n@override@JsonKey(name: 'use-hosts') final  bool useHosts;\n@override@JsonKey(name: 'use-system-hosts') final  bool useSystemHosts;\n@override@JsonKey(name: 'respect-rules') final  bool respectRules;\n@override@JsonKey() final  bool ipv6;\n final  List<String> _defaultNameserver;\n@override@JsonKey(name: 'default-nameserver') List<String> get defaultNameserver {\n  if (_defaultNameserver is EqualUnmodifiableListView) return _defaultNameserver;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_defaultNameserver);\n}\n\n@override@JsonKey(name: 'enhanced-mode') final  DnsMode enhancedMode;\n@override@JsonKey(name: 'fake-ip-range') final  String fakeIpRange;\n final  List<String> _fakeIpFilter;\n@override@JsonKey(name: 'fake-ip-filter') List<String> get fakeIpFilter {\n  if (_fakeIpFilter is EqualUnmodifiableListView) return _fakeIpFilter;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_fakeIpFilter);\n}\n\n final  Map<String, String> _nameserverPolicy;\n@override@JsonKey(name: 'nameserver-policy') Map<String, String> get nameserverPolicy {\n  if (_nameserverPolicy is EqualUnmodifiableMapView) return _nameserverPolicy;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableMapView(_nameserverPolicy);\n}\n\n final  List<String> _nameserver;\n@override@JsonKey() List<String> get nameserver {\n  if (_nameserver is EqualUnmodifiableListView) return _nameserver;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_nameserver);\n}\n\n final  List<String> _fallback;\n@override@JsonKey() List<String> get fallback {\n  if (_fallback is EqualUnmodifiableListView) return _fallback;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_fallback);\n}\n\n final  List<String> _proxyServerNameserver;\n@override@JsonKey(name: 'proxy-server-nameserver') List<String> get proxyServerNameserver {\n  if (_proxyServerNameserver is EqualUnmodifiableListView) return _proxyServerNameserver;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_proxyServerNameserver);\n}\n\n@override@JsonKey(name: 'fallback-filter') final  FallbackFilter fallbackFilter;\n\n/// Create a copy of Dns\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$DnsCopyWith<_Dns> get copyWith => __$DnsCopyWithImpl<_Dns>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$DnsToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Dns&&(identical(other.enable, enable) || other.enable == enable)&&(identical(other.listen, listen) || other.listen == listen)&&(identical(other.preferH3, preferH3) || other.preferH3 == preferH3)&&(identical(other.useHosts, useHosts) || other.useHosts == useHosts)&&(identical(other.useSystemHosts, useSystemHosts) || other.useSystemHosts == useSystemHosts)&&(identical(other.respectRules, respectRules) || other.respectRules == respectRules)&&(identical(other.ipv6, ipv6) || other.ipv6 == ipv6)&&const DeepCollectionEquality().equals(other._defaultNameserver, _defaultNameserver)&&(identical(other.enhancedMode, enhancedMode) || other.enhancedMode == enhancedMode)&&(identical(other.fakeIpRange, fakeIpRange) || other.fakeIpRange == fakeIpRange)&&const DeepCollectionEquality().equals(other._fakeIpFilter, _fakeIpFilter)&&const DeepCollectionEquality().equals(other._nameserverPolicy, _nameserverPolicy)&&const DeepCollectionEquality().equals(other._nameserver, _nameserver)&&const DeepCollectionEquality().equals(other._fallback, _fallback)&&const DeepCollectionEquality().equals(other._proxyServerNameserver, _proxyServerNameserver)&&(identical(other.fallbackFilter, fallbackFilter) || other.fallbackFilter == fallbackFilter));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,enable,listen,preferH3,useHosts,useSystemHosts,respectRules,ipv6,const DeepCollectionEquality().hash(_defaultNameserver),enhancedMode,fakeIpRange,const DeepCollectionEquality().hash(_fakeIpFilter),const DeepCollectionEquality().hash(_nameserverPolicy),const DeepCollectionEquality().hash(_nameserver),const DeepCollectionEquality().hash(_fallback),const DeepCollectionEquality().hash(_proxyServerNameserver),fallbackFilter);\n\n@override\nString toString() {\n  return 'Dns(enable: $enable, listen: $listen, preferH3: $preferH3, useHosts: $useHosts, useSystemHosts: $useSystemHosts, respectRules: $respectRules, ipv6: $ipv6, defaultNameserver: $defaultNameserver, enhancedMode: $enhancedMode, fakeIpRange: $fakeIpRange, fakeIpFilter: $fakeIpFilter, nameserverPolicy: $nameserverPolicy, nameserver: $nameserver, fallback: $fallback, proxyServerNameserver: $proxyServerNameserver, fallbackFilter: $fallbackFilter)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$DnsCopyWith<$Res> implements $DnsCopyWith<$Res> {\n  factory _$DnsCopyWith(_Dns value, $Res Function(_Dns) _then) = __$DnsCopyWithImpl;\n@override @useResult\n$Res call({\n bool enable, String listen,@JsonKey(name: 'prefer-h3') bool preferH3,@JsonKey(name: 'use-hosts') bool useHosts,@JsonKey(name: 'use-system-hosts') bool useSystemHosts,@JsonKey(name: 'respect-rules') bool respectRules, bool ipv6,@JsonKey(name: 'default-nameserver') List<String> defaultNameserver,@JsonKey(name: 'enhanced-mode') DnsMode enhancedMode,@JsonKey(name: 'fake-ip-range') String fakeIpRange,@JsonKey(name: 'fake-ip-filter') List<String> fakeIpFilter,@JsonKey(name: 'nameserver-policy') Map<String, String> nameserverPolicy, List<String> nameserver, List<String> fallback,@JsonKey(name: 'proxy-server-nameserver') List<String> proxyServerNameserver,@JsonKey(name: 'fallback-filter') FallbackFilter fallbackFilter\n});\n\n\n@override $FallbackFilterCopyWith<$Res> get fallbackFilter;\n\n}\n/// @nodoc\nclass __$DnsCopyWithImpl<$Res>\n    implements _$DnsCopyWith<$Res> {\n  __$DnsCopyWithImpl(this._self, this._then);\n\n  final _Dns _self;\n  final $Res Function(_Dns) _then;\n\n/// Create a copy of Dns\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? enable = null,Object? listen = null,Object? preferH3 = null,Object? useHosts = null,Object? useSystemHosts = null,Object? respectRules = null,Object? ipv6 = null,Object? defaultNameserver = null,Object? enhancedMode = null,Object? fakeIpRange = null,Object? fakeIpFilter = null,Object? nameserverPolicy = null,Object? nameserver = null,Object? fallback = null,Object? proxyServerNameserver = null,Object? fallbackFilter = null,}) {\n  return _then(_Dns(\nenable: null == enable ? _self.enable : enable // ignore: cast_nullable_to_non_nullable\nas bool,listen: null == listen ? _self.listen : listen // ignore: cast_nullable_to_non_nullable\nas String,preferH3: null == preferH3 ? _self.preferH3 : preferH3 // ignore: cast_nullable_to_non_nullable\nas bool,useHosts: null == useHosts ? _self.useHosts : useHosts // ignore: cast_nullable_to_non_nullable\nas bool,useSystemHosts: null == useSystemHosts ? _self.useSystemHosts : useSystemHosts // ignore: cast_nullable_to_non_nullable\nas bool,respectRules: null == respectRules ? _self.respectRules : respectRules // ignore: cast_nullable_to_non_nullable\nas bool,ipv6: null == ipv6 ? _self.ipv6 : ipv6 // ignore: cast_nullable_to_non_nullable\nas bool,defaultNameserver: null == defaultNameserver ? _self._defaultNameserver : defaultNameserver // ignore: cast_nullable_to_non_nullable\nas List<String>,enhancedMode: null == enhancedMode ? _self.enhancedMode : enhancedMode // ignore: cast_nullable_to_non_nullable\nas DnsMode,fakeIpRange: null == fakeIpRange ? _self.fakeIpRange : fakeIpRange // ignore: cast_nullable_to_non_nullable\nas String,fakeIpFilter: null == fakeIpFilter ? _self._fakeIpFilter : fakeIpFilter // ignore: cast_nullable_to_non_nullable\nas List<String>,nameserverPolicy: null == nameserverPolicy ? _self._nameserverPolicy : nameserverPolicy // ignore: cast_nullable_to_non_nullable\nas Map<String, String>,nameserver: null == nameserver ? _self._nameserver : nameserver // ignore: cast_nullable_to_non_nullable\nas List<String>,fallback: null == fallback ? _self._fallback : fallback // ignore: cast_nullable_to_non_nullable\nas List<String>,proxyServerNameserver: null == proxyServerNameserver ? _self._proxyServerNameserver : proxyServerNameserver // ignore: cast_nullable_to_non_nullable\nas List<String>,fallbackFilter: null == fallbackFilter ? _self.fallbackFilter : fallbackFilter // ignore: cast_nullable_to_non_nullable\nas FallbackFilter,\n  ));\n}\n\n/// Create a copy of Dns\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$FallbackFilterCopyWith<$Res> get fallbackFilter {\n  \n  return $FallbackFilterCopyWith<$Res>(_self.fallbackFilter, (value) {\n    return _then(_self.copyWith(fallbackFilter: value));\n  });\n}\n}\n\n\n/// @nodoc\nmixin _$GeoXUrl {\n\n String get mmdb; String get asn; String get geoip; String get geosite;\n/// Create a copy of GeoXUrl\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$GeoXUrlCopyWith<GeoXUrl> get copyWith => _$GeoXUrlCopyWithImpl<GeoXUrl>(this as GeoXUrl, _$identity);\n\n  /// Serializes this GeoXUrl to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is GeoXUrl&&(identical(other.mmdb, mmdb) || other.mmdb == mmdb)&&(identical(other.asn, asn) || other.asn == asn)&&(identical(other.geoip, geoip) || other.geoip == geoip)&&(identical(other.geosite, geosite) || other.geosite == geosite));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,mmdb,asn,geoip,geosite);\n\n@override\nString toString() {\n  return 'GeoXUrl(mmdb: $mmdb, asn: $asn, geoip: $geoip, geosite: $geosite)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $GeoXUrlCopyWith<$Res>  {\n  factory $GeoXUrlCopyWith(GeoXUrl value, $Res Function(GeoXUrl) _then) = _$GeoXUrlCopyWithImpl;\n@useResult\n$Res call({\n String mmdb, String asn, String geoip, String geosite\n});\n\n\n\n\n}\n/// @nodoc\nclass _$GeoXUrlCopyWithImpl<$Res>\n    implements $GeoXUrlCopyWith<$Res> {\n  _$GeoXUrlCopyWithImpl(this._self, this._then);\n\n  final GeoXUrl _self;\n  final $Res Function(GeoXUrl) _then;\n\n/// Create a copy of GeoXUrl\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? mmdb = null,Object? asn = null,Object? geoip = null,Object? geosite = null,}) {\n  return _then(_self.copyWith(\nmmdb: null == mmdb ? _self.mmdb : mmdb // ignore: cast_nullable_to_non_nullable\nas String,asn: null == asn ? _self.asn : asn // ignore: cast_nullable_to_non_nullable\nas String,geoip: null == geoip ? _self.geoip : geoip // ignore: cast_nullable_to_non_nullable\nas String,geosite: null == geosite ? _self.geosite : geosite // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [GeoXUrl].\nextension GeoXUrlPatterns on GeoXUrl {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _GeoXUrl value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _GeoXUrl() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _GeoXUrl value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _GeoXUrl():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _GeoXUrl value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _GeoXUrl() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String mmdb,  String asn,  String geoip,  String geosite)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _GeoXUrl() when $default != null:\nreturn $default(_that.mmdb,_that.asn,_that.geoip,_that.geosite);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String mmdb,  String asn,  String geoip,  String geosite)  $default,) {final _that = this;\nswitch (_that) {\ncase _GeoXUrl():\nreturn $default(_that.mmdb,_that.asn,_that.geoip,_that.geosite);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String mmdb,  String asn,  String geoip,  String geosite)?  $default,) {final _that = this;\nswitch (_that) {\ncase _GeoXUrl() when $default != null:\nreturn $default(_that.mmdb,_that.asn,_that.geoip,_that.geosite);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _GeoXUrl implements GeoXUrl {\n  const _GeoXUrl({this.mmdb = 'https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.metadb', this.asn = 'https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/GeoLite2-ASN.mmdb', this.geoip = 'https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.dat', this.geosite = 'https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat'});\n  factory _GeoXUrl.fromJson(Map<String, dynamic> json) => _$GeoXUrlFromJson(json);\n\n@override@JsonKey() final  String mmdb;\n@override@JsonKey() final  String asn;\n@override@JsonKey() final  String geoip;\n@override@JsonKey() final  String geosite;\n\n/// Create a copy of GeoXUrl\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$GeoXUrlCopyWith<_GeoXUrl> get copyWith => __$GeoXUrlCopyWithImpl<_GeoXUrl>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$GeoXUrlToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _GeoXUrl&&(identical(other.mmdb, mmdb) || other.mmdb == mmdb)&&(identical(other.asn, asn) || other.asn == asn)&&(identical(other.geoip, geoip) || other.geoip == geoip)&&(identical(other.geosite, geosite) || other.geosite == geosite));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,mmdb,asn,geoip,geosite);\n\n@override\nString toString() {\n  return 'GeoXUrl(mmdb: $mmdb, asn: $asn, geoip: $geoip, geosite: $geosite)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$GeoXUrlCopyWith<$Res> implements $GeoXUrlCopyWith<$Res> {\n  factory _$GeoXUrlCopyWith(_GeoXUrl value, $Res Function(_GeoXUrl) _then) = __$GeoXUrlCopyWithImpl;\n@override @useResult\n$Res call({\n String mmdb, String asn, String geoip, String geosite\n});\n\n\n\n\n}\n/// @nodoc\nclass __$GeoXUrlCopyWithImpl<$Res>\n    implements _$GeoXUrlCopyWith<$Res> {\n  __$GeoXUrlCopyWithImpl(this._self, this._then);\n\n  final _GeoXUrl _self;\n  final $Res Function(_GeoXUrl) _then;\n\n/// Create a copy of GeoXUrl\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? mmdb = null,Object? asn = null,Object? geoip = null,Object? geosite = null,}) {\n  return _then(_GeoXUrl(\nmmdb: null == mmdb ? _self.mmdb : mmdb // ignore: cast_nullable_to_non_nullable\nas String,asn: null == asn ? _self.asn : asn // ignore: cast_nullable_to_non_nullable\nas String,geoip: null == geoip ? _self.geoip : geoip // ignore: cast_nullable_to_non_nullable\nas String,geosite: null == geosite ? _self.geosite : geosite // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$ParsedRule {\n\n RuleAction get ruleAction; String? get content; String? get ruleTarget; String? get ruleProvider; String? get subRule; bool get noResolve; bool get src;\n/// Create a copy of ParsedRule\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ParsedRuleCopyWith<ParsedRule> get copyWith => _$ParsedRuleCopyWithImpl<ParsedRule>(this as ParsedRule, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ParsedRule&&(identical(other.ruleAction, ruleAction) || other.ruleAction == ruleAction)&&(identical(other.content, content) || other.content == content)&&(identical(other.ruleTarget, ruleTarget) || other.ruleTarget == ruleTarget)&&(identical(other.ruleProvider, ruleProvider) || other.ruleProvider == ruleProvider)&&(identical(other.subRule, subRule) || other.subRule == subRule)&&(identical(other.noResolve, noResolve) || other.noResolve == noResolve)&&(identical(other.src, src) || other.src == src));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,ruleAction,content,ruleTarget,ruleProvider,subRule,noResolve,src);\n\n@override\nString toString() {\n  return 'ParsedRule(ruleAction: $ruleAction, content: $content, ruleTarget: $ruleTarget, ruleProvider: $ruleProvider, subRule: $subRule, noResolve: $noResolve, src: $src)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ParsedRuleCopyWith<$Res>  {\n  factory $ParsedRuleCopyWith(ParsedRule value, $Res Function(ParsedRule) _then) = _$ParsedRuleCopyWithImpl;\n@useResult\n$Res call({\n RuleAction ruleAction, String? content, String? ruleTarget, String? ruleProvider, String? subRule, bool noResolve, bool src\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ParsedRuleCopyWithImpl<$Res>\n    implements $ParsedRuleCopyWith<$Res> {\n  _$ParsedRuleCopyWithImpl(this._self, this._then);\n\n  final ParsedRule _self;\n  final $Res Function(ParsedRule) _then;\n\n/// Create a copy of ParsedRule\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? ruleAction = null,Object? content = freezed,Object? ruleTarget = freezed,Object? ruleProvider = freezed,Object? subRule = freezed,Object? noResolve = null,Object? src = null,}) {\n  return _then(_self.copyWith(\nruleAction: null == ruleAction ? _self.ruleAction : ruleAction // ignore: cast_nullable_to_non_nullable\nas RuleAction,content: freezed == content ? _self.content : content // ignore: cast_nullable_to_non_nullable\nas String?,ruleTarget: freezed == ruleTarget ? _self.ruleTarget : ruleTarget // ignore: cast_nullable_to_non_nullable\nas String?,ruleProvider: freezed == ruleProvider ? _self.ruleProvider : ruleProvider // ignore: cast_nullable_to_non_nullable\nas String?,subRule: freezed == subRule ? _self.subRule : subRule // ignore: cast_nullable_to_non_nullable\nas String?,noResolve: null == noResolve ? _self.noResolve : noResolve // ignore: cast_nullable_to_non_nullable\nas bool,src: null == src ? _self.src : src // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [ParsedRule].\nextension ParsedRulePatterns on ParsedRule {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ParsedRule value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ParsedRule() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ParsedRule value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ParsedRule():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ParsedRule value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ParsedRule() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( RuleAction ruleAction,  String? content,  String? ruleTarget,  String? ruleProvider,  String? subRule,  bool noResolve,  bool src)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ParsedRule() when $default != null:\nreturn $default(_that.ruleAction,_that.content,_that.ruleTarget,_that.ruleProvider,_that.subRule,_that.noResolve,_that.src);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( RuleAction ruleAction,  String? content,  String? ruleTarget,  String? ruleProvider,  String? subRule,  bool noResolve,  bool src)  $default,) {final _that = this;\nswitch (_that) {\ncase _ParsedRule():\nreturn $default(_that.ruleAction,_that.content,_that.ruleTarget,_that.ruleProvider,_that.subRule,_that.noResolve,_that.src);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( RuleAction ruleAction,  String? content,  String? ruleTarget,  String? ruleProvider,  String? subRule,  bool noResolve,  bool src)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ParsedRule() when $default != null:\nreturn $default(_that.ruleAction,_that.content,_that.ruleTarget,_that.ruleProvider,_that.subRule,_that.noResolve,_that.src);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _ParsedRule implements ParsedRule {\n  const _ParsedRule({required this.ruleAction, this.content, this.ruleTarget, this.ruleProvider, this.subRule, this.noResolve = false, this.src = false});\n  \n\n@override final  RuleAction ruleAction;\n@override final  String? content;\n@override final  String? ruleTarget;\n@override final  String? ruleProvider;\n@override final  String? subRule;\n@override@JsonKey() final  bool noResolve;\n@override@JsonKey() final  bool src;\n\n/// Create a copy of ParsedRule\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ParsedRuleCopyWith<_ParsedRule> get copyWith => __$ParsedRuleCopyWithImpl<_ParsedRule>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ParsedRule&&(identical(other.ruleAction, ruleAction) || other.ruleAction == ruleAction)&&(identical(other.content, content) || other.content == content)&&(identical(other.ruleTarget, ruleTarget) || other.ruleTarget == ruleTarget)&&(identical(other.ruleProvider, ruleProvider) || other.ruleProvider == ruleProvider)&&(identical(other.subRule, subRule) || other.subRule == subRule)&&(identical(other.noResolve, noResolve) || other.noResolve == noResolve)&&(identical(other.src, src) || other.src == src));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,ruleAction,content,ruleTarget,ruleProvider,subRule,noResolve,src);\n\n@override\nString toString() {\n  return 'ParsedRule(ruleAction: $ruleAction, content: $content, ruleTarget: $ruleTarget, ruleProvider: $ruleProvider, subRule: $subRule, noResolve: $noResolve, src: $src)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ParsedRuleCopyWith<$Res> implements $ParsedRuleCopyWith<$Res> {\n  factory _$ParsedRuleCopyWith(_ParsedRule value, $Res Function(_ParsedRule) _then) = __$ParsedRuleCopyWithImpl;\n@override @useResult\n$Res call({\n RuleAction ruleAction, String? content, String? ruleTarget, String? ruleProvider, String? subRule, bool noResolve, bool src\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ParsedRuleCopyWithImpl<$Res>\n    implements _$ParsedRuleCopyWith<$Res> {\n  __$ParsedRuleCopyWithImpl(this._self, this._then);\n\n  final _ParsedRule _self;\n  final $Res Function(_ParsedRule) _then;\n\n/// Create a copy of ParsedRule\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? ruleAction = null,Object? content = freezed,Object? ruleTarget = freezed,Object? ruleProvider = freezed,Object? subRule = freezed,Object? noResolve = null,Object? src = null,}) {\n  return _then(_ParsedRule(\nruleAction: null == ruleAction ? _self.ruleAction : ruleAction // ignore: cast_nullable_to_non_nullable\nas RuleAction,content: freezed == content ? _self.content : content // ignore: cast_nullable_to_non_nullable\nas String?,ruleTarget: freezed == ruleTarget ? _self.ruleTarget : ruleTarget // ignore: cast_nullable_to_non_nullable\nas String?,ruleProvider: freezed == ruleProvider ? _self.ruleProvider : ruleProvider // ignore: cast_nullable_to_non_nullable\nas String?,subRule: freezed == subRule ? _self.subRule : subRule // ignore: cast_nullable_to_non_nullable\nas String?,noResolve: null == noResolve ? _self.noResolve : noResolve // ignore: cast_nullable_to_non_nullable\nas bool,src: null == src ? _self.src : src // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$Rule {\n\n int get id; String get value; String? get order;\n/// Create a copy of Rule\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$RuleCopyWith<Rule> get copyWith => _$RuleCopyWithImpl<Rule>(this as Rule, _$identity);\n\n  /// Serializes this Rule to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is Rule&&(identical(other.id, id) || other.id == id)&&(identical(other.value, value) || other.value == value)&&(identical(other.order, order) || other.order == order));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,id,value,order);\n\n@override\nString toString() {\n  return 'Rule(id: $id, value: $value, order: $order)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $RuleCopyWith<$Res>  {\n  factory $RuleCopyWith(Rule value, $Res Function(Rule) _then) = _$RuleCopyWithImpl;\n@useResult\n$Res call({\n int id, String value, String? order\n});\n\n\n\n\n}\n/// @nodoc\nclass _$RuleCopyWithImpl<$Res>\n    implements $RuleCopyWith<$Res> {\n  _$RuleCopyWithImpl(this._self, this._then);\n\n  final Rule _self;\n  final $Res Function(Rule) _then;\n\n/// Create a copy of Rule\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? value = null,Object? order = freezed,}) {\n  return _then(_self.copyWith(\nid: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable\nas int,value: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable\nas String,order: freezed == order ? _self.order : order // ignore: cast_nullable_to_non_nullable\nas String?,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [Rule].\nextension RulePatterns on Rule {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Rule value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _Rule() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Rule value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Rule():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Rule value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Rule() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int id,  String value,  String? order)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _Rule() when $default != null:\nreturn $default(_that.id,_that.value,_that.order);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int id,  String value,  String? order)  $default,) {final _that = this;\nswitch (_that) {\ncase _Rule():\nreturn $default(_that.id,_that.value,_that.order);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int id,  String value,  String? order)?  $default,) {final _that = this;\nswitch (_that) {\ncase _Rule() when $default != null:\nreturn $default(_that.id,_that.value,_that.order);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _Rule implements Rule {\n  const _Rule({required this.id, required this.value, this.order});\n  factory _Rule.fromJson(Map<String, dynamic> json) => _$RuleFromJson(json);\n\n@override final  int id;\n@override final  String value;\n@override final  String? order;\n\n/// Create a copy of Rule\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$RuleCopyWith<_Rule> get copyWith => __$RuleCopyWithImpl<_Rule>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$RuleToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Rule&&(identical(other.id, id) || other.id == id)&&(identical(other.value, value) || other.value == value)&&(identical(other.order, order) || other.order == order));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,id,value,order);\n\n@override\nString toString() {\n  return 'Rule(id: $id, value: $value, order: $order)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$RuleCopyWith<$Res> implements $RuleCopyWith<$Res> {\n  factory _$RuleCopyWith(_Rule value, $Res Function(_Rule) _then) = __$RuleCopyWithImpl;\n@override @useResult\n$Res call({\n int id, String value, String? order\n});\n\n\n\n\n}\n/// @nodoc\nclass __$RuleCopyWithImpl<$Res>\n    implements _$RuleCopyWith<$Res> {\n  __$RuleCopyWithImpl(this._self, this._then);\n\n  final _Rule _self;\n  final $Res Function(_Rule) _then;\n\n/// Create a copy of Rule\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? value = null,Object? order = freezed,}) {\n  return _then(_Rule(\nid: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable\nas int,value: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable\nas String,order: freezed == order ? _self.order : order // ignore: cast_nullable_to_non_nullable\nas String?,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$SubRule {\n\n String get name;\n/// Create a copy of SubRule\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$SubRuleCopyWith<SubRule> get copyWith => _$SubRuleCopyWithImpl<SubRule>(this as SubRule, _$identity);\n\n  /// Serializes this SubRule to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is SubRule&&(identical(other.name, name) || other.name == name));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,name);\n\n@override\nString toString() {\n  return 'SubRule(name: $name)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $SubRuleCopyWith<$Res>  {\n  factory $SubRuleCopyWith(SubRule value, $Res Function(SubRule) _then) = _$SubRuleCopyWithImpl;\n@useResult\n$Res call({\n String name\n});\n\n\n\n\n}\n/// @nodoc\nclass _$SubRuleCopyWithImpl<$Res>\n    implements $SubRuleCopyWith<$Res> {\n  _$SubRuleCopyWithImpl(this._self, this._then);\n\n  final SubRule _self;\n  final $Res Function(SubRule) _then;\n\n/// Create a copy of SubRule\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? name = null,}) {\n  return _then(_self.copyWith(\nname: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [SubRule].\nextension SubRulePatterns on SubRule {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SubRule value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _SubRule() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SubRule value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _SubRule():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SubRule value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _SubRule() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String name)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _SubRule() when $default != null:\nreturn $default(_that.name);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String name)  $default,) {final _that = this;\nswitch (_that) {\ncase _SubRule():\nreturn $default(_that.name);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String name)?  $default,) {final _that = this;\nswitch (_that) {\ncase _SubRule() when $default != null:\nreturn $default(_that.name);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _SubRule implements SubRule {\n  const _SubRule({required this.name});\n  factory _SubRule.fromJson(Map<String, dynamic> json) => _$SubRuleFromJson(json);\n\n@override final  String name;\n\n/// Create a copy of SubRule\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$SubRuleCopyWith<_SubRule> get copyWith => __$SubRuleCopyWithImpl<_SubRule>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$SubRuleToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _SubRule&&(identical(other.name, name) || other.name == name));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,name);\n\n@override\nString toString() {\n  return 'SubRule(name: $name)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$SubRuleCopyWith<$Res> implements $SubRuleCopyWith<$Res> {\n  factory _$SubRuleCopyWith(_SubRule value, $Res Function(_SubRule) _then) = __$SubRuleCopyWithImpl;\n@override @useResult\n$Res call({\n String name\n});\n\n\n\n\n}\n/// @nodoc\nclass __$SubRuleCopyWithImpl<$Res>\n    implements _$SubRuleCopyWith<$Res> {\n  __$SubRuleCopyWithImpl(this._self, this._then);\n\n  final _SubRule _self;\n  final $Res Function(_SubRule) _then;\n\n/// Create a copy of SubRule\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? name = null,}) {\n  return _then(_SubRule(\nname: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$ClashConfigSnippet {\n\n@JsonKey(name: 'proxy-groups') List<ProxyGroup> get proxyGroups;@JsonKey(fromJson: _genRule, name: 'rules') List<Rule> get rule;@JsonKey(name: 'rule-providers', fromJson: _genRuleProviders) List<RuleProvider> get ruleProvider;@JsonKey(name: 'sub-rules', fromJson: _genSubRules) List<SubRule> get subRules;\n/// Create a copy of ClashConfigSnippet\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ClashConfigSnippetCopyWith<ClashConfigSnippet> get copyWith => _$ClashConfigSnippetCopyWithImpl<ClashConfigSnippet>(this as ClashConfigSnippet, _$identity);\n\n  /// Serializes this ClashConfigSnippet to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ClashConfigSnippet&&const DeepCollectionEquality().equals(other.proxyGroups, proxyGroups)&&const DeepCollectionEquality().equals(other.rule, rule)&&const DeepCollectionEquality().equals(other.ruleProvider, ruleProvider)&&const DeepCollectionEquality().equals(other.subRules, subRules));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(proxyGroups),const DeepCollectionEquality().hash(rule),const DeepCollectionEquality().hash(ruleProvider),const DeepCollectionEquality().hash(subRules));\n\n@override\nString toString() {\n  return 'ClashConfigSnippet(proxyGroups: $proxyGroups, rule: $rule, ruleProvider: $ruleProvider, subRules: $subRules)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ClashConfigSnippetCopyWith<$Res>  {\n  factory $ClashConfigSnippetCopyWith(ClashConfigSnippet value, $Res Function(ClashConfigSnippet) _then) = _$ClashConfigSnippetCopyWithImpl;\n@useResult\n$Res call({\n@JsonKey(name: 'proxy-groups') List<ProxyGroup> proxyGroups,@JsonKey(fromJson: _genRule, name: 'rules') List<Rule> rule,@JsonKey(name: 'rule-providers', fromJson: _genRuleProviders) List<RuleProvider> ruleProvider,@JsonKey(name: 'sub-rules', fromJson: _genSubRules) List<SubRule> subRules\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ClashConfigSnippetCopyWithImpl<$Res>\n    implements $ClashConfigSnippetCopyWith<$Res> {\n  _$ClashConfigSnippetCopyWithImpl(this._self, this._then);\n\n  final ClashConfigSnippet _self;\n  final $Res Function(ClashConfigSnippet) _then;\n\n/// Create a copy of ClashConfigSnippet\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? proxyGroups = null,Object? rule = null,Object? ruleProvider = null,Object? subRules = null,}) {\n  return _then(_self.copyWith(\nproxyGroups: null == proxyGroups ? _self.proxyGroups : proxyGroups // ignore: cast_nullable_to_non_nullable\nas List<ProxyGroup>,rule: null == rule ? _self.rule : rule // ignore: cast_nullable_to_non_nullable\nas List<Rule>,ruleProvider: null == ruleProvider ? _self.ruleProvider : ruleProvider // ignore: cast_nullable_to_non_nullable\nas List<RuleProvider>,subRules: null == subRules ? _self.subRules : subRules // ignore: cast_nullable_to_non_nullable\nas List<SubRule>,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [ClashConfigSnippet].\nextension ClashConfigSnippetPatterns on ClashConfigSnippet {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ClashConfigSnippet value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ClashConfigSnippet() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ClashConfigSnippet value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ClashConfigSnippet():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ClashConfigSnippet value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ClashConfigSnippet() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 'proxy-groups')  List<ProxyGroup> proxyGroups, @JsonKey(fromJson: _genRule, name: 'rules')  List<Rule> rule, @JsonKey(name: 'rule-providers', fromJson: _genRuleProviders)  List<RuleProvider> ruleProvider, @JsonKey(name: 'sub-rules', fromJson: _genSubRules)  List<SubRule> subRules)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ClashConfigSnippet() when $default != null:\nreturn $default(_that.proxyGroups,_that.rule,_that.ruleProvider,_that.subRules);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 'proxy-groups')  List<ProxyGroup> proxyGroups, @JsonKey(fromJson: _genRule, name: 'rules')  List<Rule> rule, @JsonKey(name: 'rule-providers', fromJson: _genRuleProviders)  List<RuleProvider> ruleProvider, @JsonKey(name: 'sub-rules', fromJson: _genSubRules)  List<SubRule> subRules)  $default,) {final _that = this;\nswitch (_that) {\ncase _ClashConfigSnippet():\nreturn $default(_that.proxyGroups,_that.rule,_that.ruleProvider,_that.subRules);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 'proxy-groups')  List<ProxyGroup> proxyGroups, @JsonKey(fromJson: _genRule, name: 'rules')  List<Rule> rule, @JsonKey(name: 'rule-providers', fromJson: _genRuleProviders)  List<RuleProvider> ruleProvider, @JsonKey(name: 'sub-rules', fromJson: _genSubRules)  List<SubRule> subRules)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ClashConfigSnippet() when $default != null:\nreturn $default(_that.proxyGroups,_that.rule,_that.ruleProvider,_that.subRules);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _ClashConfigSnippet implements ClashConfigSnippet {\n  const _ClashConfigSnippet({@JsonKey(name: 'proxy-groups') final  List<ProxyGroup> proxyGroups = const [], @JsonKey(fromJson: _genRule, name: 'rules') final  List<Rule> rule = const [], @JsonKey(name: 'rule-providers', fromJson: _genRuleProviders) final  List<RuleProvider> ruleProvider = const [], @JsonKey(name: 'sub-rules', fromJson: _genSubRules) final  List<SubRule> subRules = const []}): _proxyGroups = proxyGroups,_rule = rule,_ruleProvider = ruleProvider,_subRules = subRules;\n  factory _ClashConfigSnippet.fromJson(Map<String, dynamic> json) => _$ClashConfigSnippetFromJson(json);\n\n final  List<ProxyGroup> _proxyGroups;\n@override@JsonKey(name: 'proxy-groups') List<ProxyGroup> get proxyGroups {\n  if (_proxyGroups is EqualUnmodifiableListView) return _proxyGroups;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_proxyGroups);\n}\n\n final  List<Rule> _rule;\n@override@JsonKey(fromJson: _genRule, name: 'rules') List<Rule> get rule {\n  if (_rule is EqualUnmodifiableListView) return _rule;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_rule);\n}\n\n final  List<RuleProvider> _ruleProvider;\n@override@JsonKey(name: 'rule-providers', fromJson: _genRuleProviders) List<RuleProvider> get ruleProvider {\n  if (_ruleProvider is EqualUnmodifiableListView) return _ruleProvider;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_ruleProvider);\n}\n\n final  List<SubRule> _subRules;\n@override@JsonKey(name: 'sub-rules', fromJson: _genSubRules) List<SubRule> get subRules {\n  if (_subRules is EqualUnmodifiableListView) return _subRules;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_subRules);\n}\n\n\n/// Create a copy of ClashConfigSnippet\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ClashConfigSnippetCopyWith<_ClashConfigSnippet> get copyWith => __$ClashConfigSnippetCopyWithImpl<_ClashConfigSnippet>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$ClashConfigSnippetToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ClashConfigSnippet&&const DeepCollectionEquality().equals(other._proxyGroups, _proxyGroups)&&const DeepCollectionEquality().equals(other._rule, _rule)&&const DeepCollectionEquality().equals(other._ruleProvider, _ruleProvider)&&const DeepCollectionEquality().equals(other._subRules, _subRules));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_proxyGroups),const DeepCollectionEquality().hash(_rule),const DeepCollectionEquality().hash(_ruleProvider),const DeepCollectionEquality().hash(_subRules));\n\n@override\nString toString() {\n  return 'ClashConfigSnippet(proxyGroups: $proxyGroups, rule: $rule, ruleProvider: $ruleProvider, subRules: $subRules)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ClashConfigSnippetCopyWith<$Res> implements $ClashConfigSnippetCopyWith<$Res> {\n  factory _$ClashConfigSnippetCopyWith(_ClashConfigSnippet value, $Res Function(_ClashConfigSnippet) _then) = __$ClashConfigSnippetCopyWithImpl;\n@override @useResult\n$Res call({\n@JsonKey(name: 'proxy-groups') List<ProxyGroup> proxyGroups,@JsonKey(fromJson: _genRule, name: 'rules') List<Rule> rule,@JsonKey(name: 'rule-providers', fromJson: _genRuleProviders) List<RuleProvider> ruleProvider,@JsonKey(name: 'sub-rules', fromJson: _genSubRules) List<SubRule> subRules\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ClashConfigSnippetCopyWithImpl<$Res>\n    implements _$ClashConfigSnippetCopyWith<$Res> {\n  __$ClashConfigSnippetCopyWithImpl(this._self, this._then);\n\n  final _ClashConfigSnippet _self;\n  final $Res Function(_ClashConfigSnippet) _then;\n\n/// Create a copy of ClashConfigSnippet\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? proxyGroups = null,Object? rule = null,Object? ruleProvider = null,Object? subRules = null,}) {\n  return _then(_ClashConfigSnippet(\nproxyGroups: null == proxyGroups ? _self._proxyGroups : proxyGroups // ignore: cast_nullable_to_non_nullable\nas List<ProxyGroup>,rule: null == rule ? _self._rule : rule // ignore: cast_nullable_to_non_nullable\nas List<Rule>,ruleProvider: null == ruleProvider ? _self._ruleProvider : ruleProvider // ignore: cast_nullable_to_non_nullable\nas List<RuleProvider>,subRules: null == subRules ? _self._subRules : subRules // ignore: cast_nullable_to_non_nullable\nas List<SubRule>,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$ClashConfig {\n\n@JsonKey(name: 'mixed-port') int get mixedPort;@JsonKey(name: 'socks-port') int get socksPort;@JsonKey(name: 'port') int get port;@JsonKey(name: 'redir-port') int get redirPort;@JsonKey(name: 'tproxy-port') int get tproxyPort; Mode get mode;@JsonKey(name: 'allow-lan') bool get allowLan;@JsonKey(name: 'log-level') LogLevel get logLevel; bool get ipv6;@JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always) FindProcessMode get findProcessMode;@JsonKey(name: 'keep-alive-interval') int get keepAliveInterval;@JsonKey(name: 'unified-delay') bool get unifiedDelay;@JsonKey(name: 'tcp-concurrent') bool get tcpConcurrent;@JsonKey(fromJson: Tun.safeFormJson) Tun get tun;@JsonKey(fromJson: Dns.safeDnsFromJson) Dns get dns;@JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson) GeoXUrl get geoXUrl;@JsonKey(name: 'geodata-loader') GeodataLoader get geodataLoader;@JsonKey(name: 'proxy-groups') List<ProxyGroup> get proxyGroups; List<String> get rule;@JsonKey(name: 'global-ua') String? get globalUa;@JsonKey(name: 'external-controller') ExternalControllerStatus get externalController; Map<String, String> get hosts;\n/// Create a copy of ClashConfig\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ClashConfigCopyWith<ClashConfig> get copyWith => _$ClashConfigCopyWithImpl<ClashConfig>(this as ClashConfig, _$identity);\n\n  /// Serializes this ClashConfig to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ClashConfig&&(identical(other.mixedPort, mixedPort) || other.mixedPort == mixedPort)&&(identical(other.socksPort, socksPort) || other.socksPort == socksPort)&&(identical(other.port, port) || other.port == port)&&(identical(other.redirPort, redirPort) || other.redirPort == redirPort)&&(identical(other.tproxyPort, tproxyPort) || other.tproxyPort == tproxyPort)&&(identical(other.mode, mode) || other.mode == mode)&&(identical(other.allowLan, allowLan) || other.allowLan == allowLan)&&(identical(other.logLevel, logLevel) || other.logLevel == logLevel)&&(identical(other.ipv6, ipv6) || other.ipv6 == ipv6)&&(identical(other.findProcessMode, findProcessMode) || other.findProcessMode == findProcessMode)&&(identical(other.keepAliveInterval, keepAliveInterval) || other.keepAliveInterval == keepAliveInterval)&&(identical(other.unifiedDelay, unifiedDelay) || other.unifiedDelay == unifiedDelay)&&(identical(other.tcpConcurrent, tcpConcurrent) || other.tcpConcurrent == tcpConcurrent)&&(identical(other.tun, tun) || other.tun == tun)&&(identical(other.dns, dns) || other.dns == dns)&&(identical(other.geoXUrl, geoXUrl) || other.geoXUrl == geoXUrl)&&(identical(other.geodataLoader, geodataLoader) || other.geodataLoader == geodataLoader)&&const DeepCollectionEquality().equals(other.proxyGroups, proxyGroups)&&const DeepCollectionEquality().equals(other.rule, rule)&&(identical(other.globalUa, globalUa) || other.globalUa == globalUa)&&(identical(other.externalController, externalController) || other.externalController == externalController)&&const DeepCollectionEquality().equals(other.hosts, hosts));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hashAll([runtimeType,mixedPort,socksPort,port,redirPort,tproxyPort,mode,allowLan,logLevel,ipv6,findProcessMode,keepAliveInterval,unifiedDelay,tcpConcurrent,tun,dns,geoXUrl,geodataLoader,const DeepCollectionEquality().hash(proxyGroups),const DeepCollectionEquality().hash(rule),globalUa,externalController,const DeepCollectionEquality().hash(hosts)]);\n\n@override\nString toString() {\n  return 'ClashConfig(mixedPort: $mixedPort, socksPort: $socksPort, port: $port, redirPort: $redirPort, tproxyPort: $tproxyPort, mode: $mode, allowLan: $allowLan, logLevel: $logLevel, ipv6: $ipv6, findProcessMode: $findProcessMode, keepAliveInterval: $keepAliveInterval, unifiedDelay: $unifiedDelay, tcpConcurrent: $tcpConcurrent, tun: $tun, dns: $dns, geoXUrl: $geoXUrl, geodataLoader: $geodataLoader, proxyGroups: $proxyGroups, rule: $rule, globalUa: $globalUa, externalController: $externalController, hosts: $hosts)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ClashConfigCopyWith<$Res>  {\n  factory $ClashConfigCopyWith(ClashConfig value, $Res Function(ClashConfig) _then) = _$ClashConfigCopyWithImpl;\n@useResult\n$Res call({\n@JsonKey(name: 'mixed-port') int mixedPort,@JsonKey(name: 'socks-port') int socksPort,@JsonKey(name: 'port') int port,@JsonKey(name: 'redir-port') int redirPort,@JsonKey(name: 'tproxy-port') int tproxyPort, Mode mode,@JsonKey(name: 'allow-lan') bool allowLan,@JsonKey(name: 'log-level') LogLevel logLevel, bool ipv6,@JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always) FindProcessMode findProcessMode,@JsonKey(name: 'keep-alive-interval') int keepAliveInterval,@JsonKey(name: 'unified-delay') bool unifiedDelay,@JsonKey(name: 'tcp-concurrent') bool tcpConcurrent,@JsonKey(fromJson: Tun.safeFormJson) Tun tun,@JsonKey(fromJson: Dns.safeDnsFromJson) Dns dns,@JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson) GeoXUrl geoXUrl,@JsonKey(name: 'geodata-loader') GeodataLoader geodataLoader,@JsonKey(name: 'proxy-groups') List<ProxyGroup> proxyGroups, List<String> rule,@JsonKey(name: 'global-ua') String? globalUa,@JsonKey(name: 'external-controller') ExternalControllerStatus externalController, Map<String, String> hosts\n});\n\n\n$TunCopyWith<$Res> get tun;$DnsCopyWith<$Res> get dns;$GeoXUrlCopyWith<$Res> get geoXUrl;\n\n}\n/// @nodoc\nclass _$ClashConfigCopyWithImpl<$Res>\n    implements $ClashConfigCopyWith<$Res> {\n  _$ClashConfigCopyWithImpl(this._self, this._then);\n\n  final ClashConfig _self;\n  final $Res Function(ClashConfig) _then;\n\n/// Create a copy of ClashConfig\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? mixedPort = null,Object? socksPort = null,Object? port = null,Object? redirPort = null,Object? tproxyPort = null,Object? mode = null,Object? allowLan = null,Object? logLevel = null,Object? ipv6 = null,Object? findProcessMode = null,Object? keepAliveInterval = null,Object? unifiedDelay = null,Object? tcpConcurrent = null,Object? tun = null,Object? dns = null,Object? geoXUrl = null,Object? geodataLoader = null,Object? proxyGroups = null,Object? rule = null,Object? globalUa = freezed,Object? externalController = null,Object? hosts = null,}) {\n  return _then(_self.copyWith(\nmixedPort: null == mixedPort ? _self.mixedPort : mixedPort // ignore: cast_nullable_to_non_nullable\nas int,socksPort: null == socksPort ? _self.socksPort : socksPort // ignore: cast_nullable_to_non_nullable\nas int,port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable\nas int,redirPort: null == redirPort ? _self.redirPort : redirPort // ignore: cast_nullable_to_non_nullable\nas int,tproxyPort: null == tproxyPort ? _self.tproxyPort : tproxyPort // ignore: cast_nullable_to_non_nullable\nas int,mode: null == mode ? _self.mode : mode // ignore: cast_nullable_to_non_nullable\nas Mode,allowLan: null == allowLan ? _self.allowLan : allowLan // ignore: cast_nullable_to_non_nullable\nas bool,logLevel: null == logLevel ? _self.logLevel : logLevel // ignore: cast_nullable_to_non_nullable\nas LogLevel,ipv6: null == ipv6 ? _self.ipv6 : ipv6 // ignore: cast_nullable_to_non_nullable\nas bool,findProcessMode: null == findProcessMode ? _self.findProcessMode : findProcessMode // ignore: cast_nullable_to_non_nullable\nas FindProcessMode,keepAliveInterval: null == keepAliveInterval ? _self.keepAliveInterval : keepAliveInterval // ignore: cast_nullable_to_non_nullable\nas int,unifiedDelay: null == unifiedDelay ? _self.unifiedDelay : unifiedDelay // ignore: cast_nullable_to_non_nullable\nas bool,tcpConcurrent: null == tcpConcurrent ? _self.tcpConcurrent : tcpConcurrent // ignore: cast_nullable_to_non_nullable\nas bool,tun: null == tun ? _self.tun : tun // ignore: cast_nullable_to_non_nullable\nas Tun,dns: null == dns ? _self.dns : dns // ignore: cast_nullable_to_non_nullable\nas Dns,geoXUrl: null == geoXUrl ? _self.geoXUrl : geoXUrl // ignore: cast_nullable_to_non_nullable\nas GeoXUrl,geodataLoader: null == geodataLoader ? _self.geodataLoader : geodataLoader // ignore: cast_nullable_to_non_nullable\nas GeodataLoader,proxyGroups: null == proxyGroups ? _self.proxyGroups : proxyGroups // ignore: cast_nullable_to_non_nullable\nas List<ProxyGroup>,rule: null == rule ? _self.rule : rule // ignore: cast_nullable_to_non_nullable\nas List<String>,globalUa: freezed == globalUa ? _self.globalUa : globalUa // ignore: cast_nullable_to_non_nullable\nas String?,externalController: null == externalController ? _self.externalController : externalController // ignore: cast_nullable_to_non_nullable\nas ExternalControllerStatus,hosts: null == hosts ? _self.hosts : hosts // ignore: cast_nullable_to_non_nullable\nas Map<String, String>,\n  ));\n}\n/// Create a copy of ClashConfig\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$TunCopyWith<$Res> get tun {\n  \n  return $TunCopyWith<$Res>(_self.tun, (value) {\n    return _then(_self.copyWith(tun: value));\n  });\n}/// Create a copy of ClashConfig\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$DnsCopyWith<$Res> get dns {\n  \n  return $DnsCopyWith<$Res>(_self.dns, (value) {\n    return _then(_self.copyWith(dns: value));\n  });\n}/// Create a copy of ClashConfig\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$GeoXUrlCopyWith<$Res> get geoXUrl {\n  \n  return $GeoXUrlCopyWith<$Res>(_self.geoXUrl, (value) {\n    return _then(_self.copyWith(geoXUrl: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [ClashConfig].\nextension ClashConfigPatterns on ClashConfig {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ClashConfig value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ClashConfig() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ClashConfig value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ClashConfig():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ClashConfig value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ClashConfig() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 'mixed-port')  int mixedPort, @JsonKey(name: 'socks-port')  int socksPort, @JsonKey(name: 'port')  int port, @JsonKey(name: 'redir-port')  int redirPort, @JsonKey(name: 'tproxy-port')  int tproxyPort,  Mode mode, @JsonKey(name: 'allow-lan')  bool allowLan, @JsonKey(name: 'log-level')  LogLevel logLevel,  bool ipv6, @JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always)  FindProcessMode findProcessMode, @JsonKey(name: 'keep-alive-interval')  int keepAliveInterval, @JsonKey(name: 'unified-delay')  bool unifiedDelay, @JsonKey(name: 'tcp-concurrent')  bool tcpConcurrent, @JsonKey(fromJson: Tun.safeFormJson)  Tun tun, @JsonKey(fromJson: Dns.safeDnsFromJson)  Dns dns, @JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson)  GeoXUrl geoXUrl, @JsonKey(name: 'geodata-loader')  GeodataLoader geodataLoader, @JsonKey(name: 'proxy-groups')  List<ProxyGroup> proxyGroups,  List<String> rule, @JsonKey(name: 'global-ua')  String? globalUa, @JsonKey(name: 'external-controller')  ExternalControllerStatus externalController,  Map<String, String> hosts)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ClashConfig() when $default != null:\nreturn $default(_that.mixedPort,_that.socksPort,_that.port,_that.redirPort,_that.tproxyPort,_that.mode,_that.allowLan,_that.logLevel,_that.ipv6,_that.findProcessMode,_that.keepAliveInterval,_that.unifiedDelay,_that.tcpConcurrent,_that.tun,_that.dns,_that.geoXUrl,_that.geodataLoader,_that.proxyGroups,_that.rule,_that.globalUa,_that.externalController,_that.hosts);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 'mixed-port')  int mixedPort, @JsonKey(name: 'socks-port')  int socksPort, @JsonKey(name: 'port')  int port, @JsonKey(name: 'redir-port')  int redirPort, @JsonKey(name: 'tproxy-port')  int tproxyPort,  Mode mode, @JsonKey(name: 'allow-lan')  bool allowLan, @JsonKey(name: 'log-level')  LogLevel logLevel,  bool ipv6, @JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always)  FindProcessMode findProcessMode, @JsonKey(name: 'keep-alive-interval')  int keepAliveInterval, @JsonKey(name: 'unified-delay')  bool unifiedDelay, @JsonKey(name: 'tcp-concurrent')  bool tcpConcurrent, @JsonKey(fromJson: Tun.safeFormJson)  Tun tun, @JsonKey(fromJson: Dns.safeDnsFromJson)  Dns dns, @JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson)  GeoXUrl geoXUrl, @JsonKey(name: 'geodata-loader')  GeodataLoader geodataLoader, @JsonKey(name: 'proxy-groups')  List<ProxyGroup> proxyGroups,  List<String> rule, @JsonKey(name: 'global-ua')  String? globalUa, @JsonKey(name: 'external-controller')  ExternalControllerStatus externalController,  Map<String, String> hosts)  $default,) {final _that = this;\nswitch (_that) {\ncase _ClashConfig():\nreturn $default(_that.mixedPort,_that.socksPort,_that.port,_that.redirPort,_that.tproxyPort,_that.mode,_that.allowLan,_that.logLevel,_that.ipv6,_that.findProcessMode,_that.keepAliveInterval,_that.unifiedDelay,_that.tcpConcurrent,_that.tun,_that.dns,_that.geoXUrl,_that.geodataLoader,_that.proxyGroups,_that.rule,_that.globalUa,_that.externalController,_that.hosts);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 'mixed-port')  int mixedPort, @JsonKey(name: 'socks-port')  int socksPort, @JsonKey(name: 'port')  int port, @JsonKey(name: 'redir-port')  int redirPort, @JsonKey(name: 'tproxy-port')  int tproxyPort,  Mode mode, @JsonKey(name: 'allow-lan')  bool allowLan, @JsonKey(name: 'log-level')  LogLevel logLevel,  bool ipv6, @JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always)  FindProcessMode findProcessMode, @JsonKey(name: 'keep-alive-interval')  int keepAliveInterval, @JsonKey(name: 'unified-delay')  bool unifiedDelay, @JsonKey(name: 'tcp-concurrent')  bool tcpConcurrent, @JsonKey(fromJson: Tun.safeFormJson)  Tun tun, @JsonKey(fromJson: Dns.safeDnsFromJson)  Dns dns, @JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson)  GeoXUrl geoXUrl, @JsonKey(name: 'geodata-loader')  GeodataLoader geodataLoader, @JsonKey(name: 'proxy-groups')  List<ProxyGroup> proxyGroups,  List<String> rule, @JsonKey(name: 'global-ua')  String? globalUa, @JsonKey(name: 'external-controller')  ExternalControllerStatus externalController,  Map<String, String> hosts)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ClashConfig() when $default != null:\nreturn $default(_that.mixedPort,_that.socksPort,_that.port,_that.redirPort,_that.tproxyPort,_that.mode,_that.allowLan,_that.logLevel,_that.ipv6,_that.findProcessMode,_that.keepAliveInterval,_that.unifiedDelay,_that.tcpConcurrent,_that.tun,_that.dns,_that.geoXUrl,_that.geodataLoader,_that.proxyGroups,_that.rule,_that.globalUa,_that.externalController,_that.hosts);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _ClashConfig implements ClashConfig {\n  const _ClashConfig({@JsonKey(name: 'mixed-port') this.mixedPort = defaultMixedPort, @JsonKey(name: 'socks-port') this.socksPort = 0, @JsonKey(name: 'port') this.port = 0, @JsonKey(name: 'redir-port') this.redirPort = 0, @JsonKey(name: 'tproxy-port') this.tproxyPort = 0, this.mode = Mode.rule, @JsonKey(name: 'allow-lan') this.allowLan = false, @JsonKey(name: 'log-level') this.logLevel = LogLevel.error, this.ipv6 = false, @JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always) this.findProcessMode = FindProcessMode.always, @JsonKey(name: 'keep-alive-interval') this.keepAliveInterval = defaultKeepAliveInterval, @JsonKey(name: 'unified-delay') this.unifiedDelay = true, @JsonKey(name: 'tcp-concurrent') this.tcpConcurrent = true, @JsonKey(fromJson: Tun.safeFormJson) this.tun = defaultTun, @JsonKey(fromJson: Dns.safeDnsFromJson) this.dns = defaultDns, @JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson) this.geoXUrl = defaultGeoXUrl, @JsonKey(name: 'geodata-loader') this.geodataLoader = GeodataLoader.memconservative, @JsonKey(name: 'proxy-groups') final  List<ProxyGroup> proxyGroups = const [], final  List<String> rule = const [], @JsonKey(name: 'global-ua') this.globalUa, @JsonKey(name: 'external-controller') this.externalController = ExternalControllerStatus.close, final  Map<String, String> hosts = const {}}): _proxyGroups = proxyGroups,_rule = rule,_hosts = hosts;\n  factory _ClashConfig.fromJson(Map<String, dynamic> json) => _$ClashConfigFromJson(json);\n\n@override@JsonKey(name: 'mixed-port') final  int mixedPort;\n@override@JsonKey(name: 'socks-port') final  int socksPort;\n@override@JsonKey(name: 'port') final  int port;\n@override@JsonKey(name: 'redir-port') final  int redirPort;\n@override@JsonKey(name: 'tproxy-port') final  int tproxyPort;\n@override@JsonKey() final  Mode mode;\n@override@JsonKey(name: 'allow-lan') final  bool allowLan;\n@override@JsonKey(name: 'log-level') final  LogLevel logLevel;\n@override@JsonKey() final  bool ipv6;\n@override@JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always) final  FindProcessMode findProcessMode;\n@override@JsonKey(name: 'keep-alive-interval') final  int keepAliveInterval;\n@override@JsonKey(name: 'unified-delay') final  bool unifiedDelay;\n@override@JsonKey(name: 'tcp-concurrent') final  bool tcpConcurrent;\n@override@JsonKey(fromJson: Tun.safeFormJson) final  Tun tun;\n@override@JsonKey(fromJson: Dns.safeDnsFromJson) final  Dns dns;\n@override@JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson) final  GeoXUrl geoXUrl;\n@override@JsonKey(name: 'geodata-loader') final  GeodataLoader geodataLoader;\n final  List<ProxyGroup> _proxyGroups;\n@override@JsonKey(name: 'proxy-groups') List<ProxyGroup> get proxyGroups {\n  if (_proxyGroups is EqualUnmodifiableListView) return _proxyGroups;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_proxyGroups);\n}\n\n final  List<String> _rule;\n@override@JsonKey() List<String> get rule {\n  if (_rule is EqualUnmodifiableListView) return _rule;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_rule);\n}\n\n@override@JsonKey(name: 'global-ua') final  String? globalUa;\n@override@JsonKey(name: 'external-controller') final  ExternalControllerStatus externalController;\n final  Map<String, String> _hosts;\n@override@JsonKey() Map<String, String> get hosts {\n  if (_hosts is EqualUnmodifiableMapView) return _hosts;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableMapView(_hosts);\n}\n\n\n/// Create a copy of ClashConfig\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ClashConfigCopyWith<_ClashConfig> get copyWith => __$ClashConfigCopyWithImpl<_ClashConfig>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$ClashConfigToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ClashConfig&&(identical(other.mixedPort, mixedPort) || other.mixedPort == mixedPort)&&(identical(other.socksPort, socksPort) || other.socksPort == socksPort)&&(identical(other.port, port) || other.port == port)&&(identical(other.redirPort, redirPort) || other.redirPort == redirPort)&&(identical(other.tproxyPort, tproxyPort) || other.tproxyPort == tproxyPort)&&(identical(other.mode, mode) || other.mode == mode)&&(identical(other.allowLan, allowLan) || other.allowLan == allowLan)&&(identical(other.logLevel, logLevel) || other.logLevel == logLevel)&&(identical(other.ipv6, ipv6) || other.ipv6 == ipv6)&&(identical(other.findProcessMode, findProcessMode) || other.findProcessMode == findProcessMode)&&(identical(other.keepAliveInterval, keepAliveInterval) || other.keepAliveInterval == keepAliveInterval)&&(identical(other.unifiedDelay, unifiedDelay) || other.unifiedDelay == unifiedDelay)&&(identical(other.tcpConcurrent, tcpConcurrent) || other.tcpConcurrent == tcpConcurrent)&&(identical(other.tun, tun) || other.tun == tun)&&(identical(other.dns, dns) || other.dns == dns)&&(identical(other.geoXUrl, geoXUrl) || other.geoXUrl == geoXUrl)&&(identical(other.geodataLoader, geodataLoader) || other.geodataLoader == geodataLoader)&&const DeepCollectionEquality().equals(other._proxyGroups, _proxyGroups)&&const DeepCollectionEquality().equals(other._rule, _rule)&&(identical(other.globalUa, globalUa) || other.globalUa == globalUa)&&(identical(other.externalController, externalController) || other.externalController == externalController)&&const DeepCollectionEquality().equals(other._hosts, _hosts));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hashAll([runtimeType,mixedPort,socksPort,port,redirPort,tproxyPort,mode,allowLan,logLevel,ipv6,findProcessMode,keepAliveInterval,unifiedDelay,tcpConcurrent,tun,dns,geoXUrl,geodataLoader,const DeepCollectionEquality().hash(_proxyGroups),const DeepCollectionEquality().hash(_rule),globalUa,externalController,const DeepCollectionEquality().hash(_hosts)]);\n\n@override\nString toString() {\n  return 'ClashConfig(mixedPort: $mixedPort, socksPort: $socksPort, port: $port, redirPort: $redirPort, tproxyPort: $tproxyPort, mode: $mode, allowLan: $allowLan, logLevel: $logLevel, ipv6: $ipv6, findProcessMode: $findProcessMode, keepAliveInterval: $keepAliveInterval, unifiedDelay: $unifiedDelay, tcpConcurrent: $tcpConcurrent, tun: $tun, dns: $dns, geoXUrl: $geoXUrl, geodataLoader: $geodataLoader, proxyGroups: $proxyGroups, rule: $rule, globalUa: $globalUa, externalController: $externalController, hosts: $hosts)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ClashConfigCopyWith<$Res> implements $ClashConfigCopyWith<$Res> {\n  factory _$ClashConfigCopyWith(_ClashConfig value, $Res Function(_ClashConfig) _then) = __$ClashConfigCopyWithImpl;\n@override @useResult\n$Res call({\n@JsonKey(name: 'mixed-port') int mixedPort,@JsonKey(name: 'socks-port') int socksPort,@JsonKey(name: 'port') int port,@JsonKey(name: 'redir-port') int redirPort,@JsonKey(name: 'tproxy-port') int tproxyPort, Mode mode,@JsonKey(name: 'allow-lan') bool allowLan,@JsonKey(name: 'log-level') LogLevel logLevel, bool ipv6,@JsonKey(name: 'find-process-mode', unknownEnumValue: FindProcessMode.always) FindProcessMode findProcessMode,@JsonKey(name: 'keep-alive-interval') int keepAliveInterval,@JsonKey(name: 'unified-delay') bool unifiedDelay,@JsonKey(name: 'tcp-concurrent') bool tcpConcurrent,@JsonKey(fromJson: Tun.safeFormJson) Tun tun,@JsonKey(fromJson: Dns.safeDnsFromJson) Dns dns,@JsonKey(name: 'geox-url', fromJson: GeoXUrl.safeFormJson) GeoXUrl geoXUrl,@JsonKey(name: 'geodata-loader') GeodataLoader geodataLoader,@JsonKey(name: 'proxy-groups') List<ProxyGroup> proxyGroups, List<String> rule,@JsonKey(name: 'global-ua') String? globalUa,@JsonKey(name: 'external-controller') ExternalControllerStatus externalController, Map<String, String> hosts\n});\n\n\n@override $TunCopyWith<$Res> get tun;@override $DnsCopyWith<$Res> get dns;@override $GeoXUrlCopyWith<$Res> get geoXUrl;\n\n}\n/// @nodoc\nclass __$ClashConfigCopyWithImpl<$Res>\n    implements _$ClashConfigCopyWith<$Res> {\n  __$ClashConfigCopyWithImpl(this._self, this._then);\n\n  final _ClashConfig _self;\n  final $Res Function(_ClashConfig) _then;\n\n/// Create a copy of ClashConfig\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? mixedPort = null,Object? socksPort = null,Object? port = null,Object? redirPort = null,Object? tproxyPort = null,Object? mode = null,Object? allowLan = null,Object? logLevel = null,Object? ipv6 = null,Object? findProcessMode = null,Object? keepAliveInterval = null,Object? unifiedDelay = null,Object? tcpConcurrent = null,Object? tun = null,Object? dns = null,Object? geoXUrl = null,Object? geodataLoader = null,Object? proxyGroups = null,Object? rule = null,Object? globalUa = freezed,Object? externalController = null,Object? hosts = null,}) {\n  return _then(_ClashConfig(\nmixedPort: null == mixedPort ? _self.mixedPort : mixedPort // ignore: cast_nullable_to_non_nullable\nas int,socksPort: null == socksPort ? _self.socksPort : socksPort // ignore: cast_nullable_to_non_nullable\nas int,port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable\nas int,redirPort: null == redirPort ? _self.redirPort : redirPort // ignore: cast_nullable_to_non_nullable\nas int,tproxyPort: null == tproxyPort ? _self.tproxyPort : tproxyPort // ignore: cast_nullable_to_non_nullable\nas int,mode: null == mode ? _self.mode : mode // ignore: cast_nullable_to_non_nullable\nas Mode,allowLan: null == allowLan ? _self.allowLan : allowLan // ignore: cast_nullable_to_non_nullable\nas bool,logLevel: null == logLevel ? _self.logLevel : logLevel // ignore: cast_nullable_to_non_nullable\nas LogLevel,ipv6: null == ipv6 ? _self.ipv6 : ipv6 // ignore: cast_nullable_to_non_nullable\nas bool,findProcessMode: null == findProcessMode ? _self.findProcessMode : findProcessMode // ignore: cast_nullable_to_non_nullable\nas FindProcessMode,keepAliveInterval: null == keepAliveInterval ? _self.keepAliveInterval : keepAliveInterval // ignore: cast_nullable_to_non_nullable\nas int,unifiedDelay: null == unifiedDelay ? _self.unifiedDelay : unifiedDelay // ignore: cast_nullable_to_non_nullable\nas bool,tcpConcurrent: null == tcpConcurrent ? _self.tcpConcurrent : tcpConcurrent // ignore: cast_nullable_to_non_nullable\nas bool,tun: null == tun ? _self.tun : tun // ignore: cast_nullable_to_non_nullable\nas Tun,dns: null == dns ? _self.dns : dns // ignore: cast_nullable_to_non_nullable\nas Dns,geoXUrl: null == geoXUrl ? _self.geoXUrl : geoXUrl // ignore: cast_nullable_to_non_nullable\nas GeoXUrl,geodataLoader: null == geodataLoader ? _self.geodataLoader : geodataLoader // ignore: cast_nullable_to_non_nullable\nas GeodataLoader,proxyGroups: null == proxyGroups ? _self._proxyGroups : proxyGroups // ignore: cast_nullable_to_non_nullable\nas List<ProxyGroup>,rule: null == rule ? _self._rule : rule // ignore: cast_nullable_to_non_nullable\nas List<String>,globalUa: freezed == globalUa ? _self.globalUa : globalUa // ignore: cast_nullable_to_non_nullable\nas String?,externalController: null == externalController ? _self.externalController : externalController // ignore: cast_nullable_to_non_nullable\nas ExternalControllerStatus,hosts: null == hosts ? _self._hosts : hosts // ignore: cast_nullable_to_non_nullable\nas Map<String, String>,\n  ));\n}\n\n/// Create a copy of ClashConfig\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$TunCopyWith<$Res> get tun {\n  \n  return $TunCopyWith<$Res>(_self.tun, (value) {\n    return _then(_self.copyWith(tun: value));\n  });\n}/// Create a copy of ClashConfig\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$DnsCopyWith<$Res> get dns {\n  \n  return $DnsCopyWith<$Res>(_self.dns, (value) {\n    return _then(_self.copyWith(dns: value));\n  });\n}/// Create a copy of ClashConfig\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$GeoXUrlCopyWith<$Res> get geoXUrl {\n  \n  return $GeoXUrlCopyWith<$Res>(_self.geoXUrl, (value) {\n    return _then(_self.copyWith(geoXUrl: value));\n  });\n}\n}\n\n// dart format on\n"
  },
  {
    "path": "lib/models/generated/clash_config.g.dart",
    "content": "// GENERATED CODE - DO NOT MODIFY BY HAND\n\npart of '../clash_config.dart';\n\n// **************************************************************************\n// JsonSerializableGenerator\n// **************************************************************************\n\n_ProxyGroup _$ProxyGroupFromJson(Map<String, dynamic> json) => _ProxyGroup(\n  name: json['name'] as String,\n  type: GroupType.parseProfileType(json['type'] as String),\n  proxies: (json['proxies'] as List<dynamic>?)\n      ?.map((e) => e as String)\n      .toList(),\n  use: (json['use'] as List<dynamic>?)?.map((e) => e as String).toList(),\n  interval: (json['interval'] as num?)?.toInt(),\n  lazy: json['lazy'] as bool?,\n  url: json['url'] as String?,\n  timeout: (json['timeout'] as num?)?.toInt(),\n  maxFailedTimes: (json['max-failed-times'] as num?)?.toInt(),\n  filter: json['filter'] as String?,\n  excludeFilter: json['expected-filter'] as String?,\n  excludeType: json['exclude-type'] as String?,\n  expectedStatus: json['expected-status'],\n  hidden: json['hidden'] as bool?,\n  icon: json['icon'] as String?,\n);\n\nMap<String, dynamic> _$ProxyGroupToJson(_ProxyGroup instance) =>\n    <String, dynamic>{\n      'name': instance.name,\n      'type': _$GroupTypeEnumMap[instance.type]!,\n      'proxies': instance.proxies,\n      'use': instance.use,\n      'interval': instance.interval,\n      'lazy': instance.lazy,\n      'url': instance.url,\n      'timeout': instance.timeout,\n      'max-failed-times': instance.maxFailedTimes,\n      'filter': instance.filter,\n      'expected-filter': instance.excludeFilter,\n      'exclude-type': instance.excludeType,\n      'expected-status': instance.expectedStatus,\n      'hidden': instance.hidden,\n      'icon': instance.icon,\n    };\n\nconst _$GroupTypeEnumMap = {\n  GroupType.Selector: 'Selector',\n  GroupType.URLTest: 'URLTest',\n  GroupType.Fallback: 'Fallback',\n  GroupType.LoadBalance: 'LoadBalance',\n  GroupType.Relay: 'Relay',\n};\n\n_RuleProvider _$RuleProviderFromJson(Map<String, dynamic> json) =>\n    _RuleProvider(name: json['name'] as String);\n\nMap<String, dynamic> _$RuleProviderToJson(_RuleProvider instance) =>\n    <String, dynamic>{'name': instance.name};\n\n_Sniffer _$SnifferFromJson(Map<String, dynamic> json) => _Sniffer(\n  enable: json['enable'] as bool? ?? false,\n  overrideDest: json['override-destination'] as bool? ?? true,\n  sniffing:\n      (json['sniffing'] as List<dynamic>?)?.map((e) => e as String).toList() ??\n      const [],\n  forceDomain:\n      (json['force-domain'] as List<dynamic>?)\n          ?.map((e) => e as String)\n          .toList() ??\n      const [],\n  skipSrcAddress:\n      (json['skip-src-address'] as List<dynamic>?)\n          ?.map((e) => e as String)\n          .toList() ??\n      const [],\n  skipDstAddress:\n      (json['skip-dst-address'] as List<dynamic>?)\n          ?.map((e) => e as String)\n          .toList() ??\n      const [],\n  skipDomain:\n      (json['skip-domain'] as List<dynamic>?)\n          ?.map((e) => e as String)\n          .toList() ??\n      const [],\n  port:\n      (json['port-whitelist'] as List<dynamic>?)\n          ?.map((e) => e as String)\n          .toList() ??\n      const [],\n  forceDnsMapping: json['force-dns-mapping'] as bool? ?? true,\n  parsePureIp: json['parse-pure-ip'] as bool? ?? true,\n  sniff:\n      (json['sniff'] as Map<String, dynamic>?)?.map(\n        (k, e) =>\n            MapEntry(k, SnifferConfig.fromJson(e as Map<String, dynamic>)),\n      ) ??\n      const {},\n);\n\nMap<String, dynamic> _$SnifferToJson(_Sniffer instance) => <String, dynamic>{\n  'enable': instance.enable,\n  'override-destination': instance.overrideDest,\n  'sniffing': instance.sniffing,\n  'force-domain': instance.forceDomain,\n  'skip-src-address': instance.skipSrcAddress,\n  'skip-dst-address': instance.skipDstAddress,\n  'skip-domain': instance.skipDomain,\n  'port-whitelist': instance.port,\n  'force-dns-mapping': instance.forceDnsMapping,\n  'parse-pure-ip': instance.parsePureIp,\n  'sniff': instance.sniff,\n};\n\n_SnifferConfig _$SnifferConfigFromJson(Map<String, dynamic> json) =>\n    _SnifferConfig(\n      ports: json['ports'] == null\n          ? const []\n          : _formJsonPorts(json['ports'] as List?),\n      overrideDest: json['override-destination'] as bool?,\n    );\n\nMap<String, dynamic> _$SnifferConfigToJson(_SnifferConfig instance) =>\n    <String, dynamic>{\n      'ports': instance.ports,\n      'override-destination': instance.overrideDest,\n    };\n\n_Tun _$TunFromJson(Map<String, dynamic> json) => _Tun(\n  enable: json['enable'] as bool? ?? false,\n  device: json['device'] as String? ?? appName,\n  autoRoute: json['auto-route'] as bool? ?? false,\n  stack:\n      $enumDecodeNullable(_$TunStackEnumMap, json['stack']) ?? TunStack.mixed,\n  dnsHijack:\n      (json['dns-hijack'] as List<dynamic>?)\n          ?.map((e) => e as String)\n          .toList() ??\n      const ['any:53'],\n  routeAddress:\n      (json['route-address'] as List<dynamic>?)\n          ?.map((e) => e as String)\n          .toList() ??\n      const [],\n);\n\nMap<String, dynamic> _$TunToJson(_Tun instance) => <String, dynamic>{\n  'enable': instance.enable,\n  'device': instance.device,\n  'auto-route': instance.autoRoute,\n  'stack': _$TunStackEnumMap[instance.stack]!,\n  'dns-hijack': instance.dnsHijack,\n  'route-address': instance.routeAddress,\n};\n\nconst _$TunStackEnumMap = {\n  TunStack.gvisor: 'gvisor',\n  TunStack.system: 'system',\n  TunStack.mixed: 'mixed',\n};\n\n_FallbackFilter _$FallbackFilterFromJson(\n  Map<String, dynamic> json,\n) => _FallbackFilter(\n  geoip: json['geoip'] as bool? ?? true,\n  geoipCode: json['geoip-code'] as String? ?? 'CN',\n  geosite:\n      (json['geosite'] as List<dynamic>?)?.map((e) => e as String).toList() ??\n      const ['gfw'],\n  ipcidr:\n      (json['ipcidr'] as List<dynamic>?)?.map((e) => e as String).toList() ??\n      const ['240.0.0.0/4'],\n  domain:\n      (json['domain'] as List<dynamic>?)?.map((e) => e as String).toList() ??\n      const ['+.google.com', '+.facebook.com', '+.youtube.com'],\n);\n\nMap<String, dynamic> _$FallbackFilterToJson(_FallbackFilter instance) =>\n    <String, dynamic>{\n      'geoip': instance.geoip,\n      'geoip-code': instance.geoipCode,\n      'geosite': instance.geosite,\n      'ipcidr': instance.ipcidr,\n      'domain': instance.domain,\n    };\n\n_Dns _$DnsFromJson(Map<String, dynamic> json) => _Dns(\n  enable: json['enable'] as bool? ?? true,\n  listen: json['listen'] as String? ?? '0.0.0.0:1053',\n  preferH3: json['prefer-h3'] as bool? ?? false,\n  useHosts: json['use-hosts'] as bool? ?? true,\n  useSystemHosts: json['use-system-hosts'] as bool? ?? true,\n  respectRules: json['respect-rules'] as bool? ?? false,\n  ipv6: json['ipv6'] as bool? ?? false,\n  defaultNameserver:\n      (json['default-nameserver'] as List<dynamic>?)\n          ?.map((e) => e as String)\n          .toList() ??\n      const ['223.5.5.5'],\n  enhancedMode:\n      $enumDecodeNullable(_$DnsModeEnumMap, json['enhanced-mode']) ??\n      DnsMode.fakeIp,\n  fakeIpRange: json['fake-ip-range'] as String? ?? '198.18.0.1/16',\n  fakeIpFilter:\n      (json['fake-ip-filter'] as List<dynamic>?)\n          ?.map((e) => e as String)\n          .toList() ??\n      const ['*.lan', 'localhost.ptlogin2.qq.com'],\n  nameserverPolicy:\n      (json['nameserver-policy'] as Map<String, dynamic>?)?.map(\n        (k, e) => MapEntry(k, e as String),\n      ) ??\n      const {\n        'www.baidu.com': '114.114.114.114',\n        '+.internal.crop.com': '10.0.0.1',\n        'geosite:cn': 'https://doh.pub/dns-query',\n      },\n  nameserver:\n      (json['nameserver'] as List<dynamic>?)\n          ?.map((e) => e as String)\n          .toList() ??\n      const ['https://doh.pub/dns-query', 'https://dns.alidns.com/dns-query'],\n  fallback:\n      (json['fallback'] as List<dynamic>?)?.map((e) => e as String).toList() ??\n      const ['tls://8.8.4.4', 'tls://1.1.1.1'],\n  proxyServerNameserver:\n      (json['proxy-server-nameserver'] as List<dynamic>?)\n          ?.map((e) => e as String)\n          .toList() ??\n      const ['https://doh.pub/dns-query'],\n  fallbackFilter: json['fallback-filter'] == null\n      ? const FallbackFilter()\n      : FallbackFilter.fromJson(\n          json['fallback-filter'] as Map<String, dynamic>,\n        ),\n);\n\nMap<String, dynamic> _$DnsToJson(_Dns instance) => <String, dynamic>{\n  'enable': instance.enable,\n  'listen': instance.listen,\n  'prefer-h3': instance.preferH3,\n  'use-hosts': instance.useHosts,\n  'use-system-hosts': instance.useSystemHosts,\n  'respect-rules': instance.respectRules,\n  'ipv6': instance.ipv6,\n  'default-nameserver': instance.defaultNameserver,\n  'enhanced-mode': _$DnsModeEnumMap[instance.enhancedMode]!,\n  'fake-ip-range': instance.fakeIpRange,\n  'fake-ip-filter': instance.fakeIpFilter,\n  'nameserver-policy': instance.nameserverPolicy,\n  'nameserver': instance.nameserver,\n  'fallback': instance.fallback,\n  'proxy-server-nameserver': instance.proxyServerNameserver,\n  'fallback-filter': instance.fallbackFilter,\n};\n\nconst _$DnsModeEnumMap = {\n  DnsMode.normal: 'normal',\n  DnsMode.fakeIp: 'fake-ip',\n  DnsMode.redirHost: 'redir-host',\n  DnsMode.hosts: 'hosts',\n};\n\n_GeoXUrl _$GeoXUrlFromJson(Map<String, dynamic> json) => _GeoXUrl(\n  mmdb:\n      json['mmdb'] as String? ??\n      'https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.metadb',\n  asn:\n      json['asn'] as String? ??\n      'https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/GeoLite2-ASN.mmdb',\n  geoip:\n      json['geoip'] as String? ??\n      'https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.dat',\n  geosite:\n      json['geosite'] as String? ??\n      'https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat',\n);\n\nMap<String, dynamic> _$GeoXUrlToJson(_GeoXUrl instance) => <String, dynamic>{\n  'mmdb': instance.mmdb,\n  'asn': instance.asn,\n  'geoip': instance.geoip,\n  'geosite': instance.geosite,\n};\n\n_Rule _$RuleFromJson(Map<String, dynamic> json) => _Rule(\n  id: (json['id'] as num).toInt(),\n  value: json['value'] as String,\n  order: json['order'] as String?,\n);\n\nMap<String, dynamic> _$RuleToJson(_Rule instance) => <String, dynamic>{\n  'id': instance.id,\n  'value': instance.value,\n  'order': instance.order,\n};\n\n_SubRule _$SubRuleFromJson(Map<String, dynamic> json) =>\n    _SubRule(name: json['name'] as String);\n\nMap<String, dynamic> _$SubRuleToJson(_SubRule instance) => <String, dynamic>{\n  'name': instance.name,\n};\n\n_ClashConfigSnippet _$ClashConfigSnippetFromJson(Map<String, dynamic> json) =>\n    _ClashConfigSnippet(\n      proxyGroups:\n          (json['proxy-groups'] as List<dynamic>?)\n              ?.map((e) => ProxyGroup.fromJson(e as Map<String, dynamic>))\n              .toList() ??\n          const [],\n      rule: json['rules'] == null ? const [] : _genRule(json['rules'] as List?),\n      ruleProvider: json['rule-providers'] == null\n          ? const []\n          : _genRuleProviders(json['rule-providers'] as Map<String, dynamic>),\n      subRules: json['sub-rules'] == null\n          ? const []\n          : _genSubRules(json['sub-rules'] as Map<String, dynamic>),\n    );\n\nMap<String, dynamic> _$ClashConfigSnippetToJson(_ClashConfigSnippet instance) =>\n    <String, dynamic>{\n      'proxy-groups': instance.proxyGroups,\n      'rules': instance.rule,\n      'rule-providers': instance.ruleProvider,\n      'sub-rules': instance.subRules,\n    };\n\n_ClashConfig _$ClashConfigFromJson(Map<String, dynamic> json) => _ClashConfig(\n  mixedPort: (json['mixed-port'] as num?)?.toInt() ?? defaultMixedPort,\n  socksPort: (json['socks-port'] as num?)?.toInt() ?? 0,\n  port: (json['port'] as num?)?.toInt() ?? 0,\n  redirPort: (json['redir-port'] as num?)?.toInt() ?? 0,\n  tproxyPort: (json['tproxy-port'] as num?)?.toInt() ?? 0,\n  mode: $enumDecodeNullable(_$ModeEnumMap, json['mode']) ?? Mode.rule,\n  allowLan: json['allow-lan'] as bool? ?? false,\n  logLevel:\n      $enumDecodeNullable(_$LogLevelEnumMap, json['log-level']) ??\n      LogLevel.error,\n  ipv6: json['ipv6'] as bool? ?? false,\n  findProcessMode:\n      $enumDecodeNullable(\n        _$FindProcessModeEnumMap,\n        json['find-process-mode'],\n        unknownValue: FindProcessMode.always,\n      ) ??\n      FindProcessMode.always,\n  keepAliveInterval:\n      (json['keep-alive-interval'] as num?)?.toInt() ??\n      defaultKeepAliveInterval,\n  unifiedDelay: json['unified-delay'] as bool? ?? true,\n  tcpConcurrent: json['tcp-concurrent'] as bool? ?? true,\n  tun: json['tun'] == null\n      ? defaultTun\n      : Tun.safeFormJson(json['tun'] as Map<String, Object?>?),\n  dns: json['dns'] == null\n      ? defaultDns\n      : Dns.safeDnsFromJson(json['dns'] as Map<String, Object?>),\n  geoXUrl: json['geox-url'] == null\n      ? defaultGeoXUrl\n      : GeoXUrl.safeFormJson(json['geox-url'] as Map<String, Object?>?),\n  geodataLoader:\n      $enumDecodeNullable(_$GeodataLoaderEnumMap, json['geodata-loader']) ??\n      GeodataLoader.memconservative,\n  proxyGroups:\n      (json['proxy-groups'] as List<dynamic>?)\n          ?.map((e) => ProxyGroup.fromJson(e as Map<String, dynamic>))\n          .toList() ??\n      const [],\n  rule:\n      (json['rule'] as List<dynamic>?)?.map((e) => e as String).toList() ??\n      const [],\n  globalUa: json['global-ua'] as String?,\n  externalController:\n      $enumDecodeNullable(\n        _$ExternalControllerStatusEnumMap,\n        json['external-controller'],\n      ) ??\n      ExternalControllerStatus.close,\n  hosts:\n      (json['hosts'] as Map<String, dynamic>?)?.map(\n        (k, e) => MapEntry(k, e as String),\n      ) ??\n      const {},\n);\n\nMap<String, dynamic> _$ClashConfigToJson(_ClashConfig instance) =>\n    <String, dynamic>{\n      'mixed-port': instance.mixedPort,\n      'socks-port': instance.socksPort,\n      'port': instance.port,\n      'redir-port': instance.redirPort,\n      'tproxy-port': instance.tproxyPort,\n      'mode': _$ModeEnumMap[instance.mode]!,\n      'allow-lan': instance.allowLan,\n      'log-level': _$LogLevelEnumMap[instance.logLevel]!,\n      'ipv6': instance.ipv6,\n      'find-process-mode': _$FindProcessModeEnumMap[instance.findProcessMode]!,\n      'keep-alive-interval': instance.keepAliveInterval,\n      'unified-delay': instance.unifiedDelay,\n      'tcp-concurrent': instance.tcpConcurrent,\n      'tun': instance.tun,\n      'dns': instance.dns,\n      'geox-url': instance.geoXUrl,\n      'geodata-loader': _$GeodataLoaderEnumMap[instance.geodataLoader]!,\n      'proxy-groups': instance.proxyGroups,\n      'rule': instance.rule,\n      'global-ua': instance.globalUa,\n      'external-controller':\n          _$ExternalControllerStatusEnumMap[instance.externalController]!,\n      'hosts': instance.hosts,\n    };\n\nconst _$ModeEnumMap = {\n  Mode.rule: 'rule',\n  Mode.global: 'global',\n  Mode.direct: 'direct',\n};\n\nconst _$LogLevelEnumMap = {\n  LogLevel.debug: 'debug',\n  LogLevel.info: 'info',\n  LogLevel.warning: 'warning',\n  LogLevel.error: 'error',\n  LogLevel.silent: 'silent',\n};\n\nconst _$FindProcessModeEnumMap = {\n  FindProcessMode.always: 'always',\n  FindProcessMode.off: 'off',\n};\n\nconst _$GeodataLoaderEnumMap = {\n  GeodataLoader.standard: 'standard',\n  GeodataLoader.memconservative: 'memconservative',\n};\n\nconst _$ExternalControllerStatusEnumMap = {\n  ExternalControllerStatus.close: '',\n  ExternalControllerStatus.open: '127.0.0.1:9090',\n};\n"
  },
  {
    "path": "lib/models/generated/common.freezed.dart",
    "content": "// GENERATED CODE - DO NOT MODIFY BY HAND\n// coverage:ignore-file\n// ignore_for_file: type=lint\n// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark\n\npart of '../common.dart';\n\n// **************************************************************************\n// FreezedGenerator\n// **************************************************************************\n\n// dart format off\nT _$identity<T>(T value) => value;\n/// @nodoc\nmixin _$NavigationItem {\n\n Icon get icon; PageLabel get label; String? get description; WidgetBuilder get builder; bool get keep; String? get path; List<NavigationItemMode> get modes;\n/// Create a copy of NavigationItem\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$NavigationItemCopyWith<NavigationItem> get copyWith => _$NavigationItemCopyWithImpl<NavigationItem>(this as NavigationItem, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is NavigationItem&&(identical(other.icon, icon) || other.icon == icon)&&(identical(other.label, label) || other.label == label)&&(identical(other.description, description) || other.description == description)&&(identical(other.builder, builder) || other.builder == builder)&&(identical(other.keep, keep) || other.keep == keep)&&(identical(other.path, path) || other.path == path)&&const DeepCollectionEquality().equals(other.modes, modes));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,icon,label,description,builder,keep,path,const DeepCollectionEquality().hash(modes));\n\n@override\nString toString() {\n  return 'NavigationItem(icon: $icon, label: $label, description: $description, builder: $builder, keep: $keep, path: $path, modes: $modes)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $NavigationItemCopyWith<$Res>  {\n  factory $NavigationItemCopyWith(NavigationItem value, $Res Function(NavigationItem) _then) = _$NavigationItemCopyWithImpl;\n@useResult\n$Res call({\n Icon icon, PageLabel label, String? description, WidgetBuilder builder, bool keep, String? path, List<NavigationItemMode> modes\n});\n\n\n\n\n}\n/// @nodoc\nclass _$NavigationItemCopyWithImpl<$Res>\n    implements $NavigationItemCopyWith<$Res> {\n  _$NavigationItemCopyWithImpl(this._self, this._then);\n\n  final NavigationItem _self;\n  final $Res Function(NavigationItem) _then;\n\n/// Create a copy of NavigationItem\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? icon = null,Object? label = null,Object? description = freezed,Object? builder = null,Object? keep = null,Object? path = freezed,Object? modes = null,}) {\n  return _then(_self.copyWith(\nicon: null == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable\nas Icon,label: null == label ? _self.label : label // ignore: cast_nullable_to_non_nullable\nas PageLabel,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable\nas String?,builder: null == builder ? _self.builder : builder // ignore: cast_nullable_to_non_nullable\nas WidgetBuilder,keep: null == keep ? _self.keep : keep // ignore: cast_nullable_to_non_nullable\nas bool,path: freezed == path ? _self.path : path // ignore: cast_nullable_to_non_nullable\nas String?,modes: null == modes ? _self.modes : modes // ignore: cast_nullable_to_non_nullable\nas List<NavigationItemMode>,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [NavigationItem].\nextension NavigationItemPatterns on NavigationItem {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _NavigationItem value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _NavigationItem() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _NavigationItem value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _NavigationItem():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _NavigationItem value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _NavigationItem() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( Icon icon,  PageLabel label,  String? description,  WidgetBuilder builder,  bool keep,  String? path,  List<NavigationItemMode> modes)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _NavigationItem() when $default != null:\nreturn $default(_that.icon,_that.label,_that.description,_that.builder,_that.keep,_that.path,_that.modes);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( Icon icon,  PageLabel label,  String? description,  WidgetBuilder builder,  bool keep,  String? path,  List<NavigationItemMode> modes)  $default,) {final _that = this;\nswitch (_that) {\ncase _NavigationItem():\nreturn $default(_that.icon,_that.label,_that.description,_that.builder,_that.keep,_that.path,_that.modes);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( Icon icon,  PageLabel label,  String? description,  WidgetBuilder builder,  bool keep,  String? path,  List<NavigationItemMode> modes)?  $default,) {final _that = this;\nswitch (_that) {\ncase _NavigationItem() when $default != null:\nreturn $default(_that.icon,_that.label,_that.description,_that.builder,_that.keep,_that.path,_that.modes);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _NavigationItem implements NavigationItem {\n  const _NavigationItem({required this.icon, required this.label, this.description, required this.builder, this.keep = true, this.path, final  List<NavigationItemMode> modes = const [NavigationItemMode.mobile, NavigationItemMode.desktop]}): _modes = modes;\n  \n\n@override final  Icon icon;\n@override final  PageLabel label;\n@override final  String? description;\n@override final  WidgetBuilder builder;\n@override@JsonKey() final  bool keep;\n@override final  String? path;\n final  List<NavigationItemMode> _modes;\n@override@JsonKey() List<NavigationItemMode> get modes {\n  if (_modes is EqualUnmodifiableListView) return _modes;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_modes);\n}\n\n\n/// Create a copy of NavigationItem\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$NavigationItemCopyWith<_NavigationItem> get copyWith => __$NavigationItemCopyWithImpl<_NavigationItem>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _NavigationItem&&(identical(other.icon, icon) || other.icon == icon)&&(identical(other.label, label) || other.label == label)&&(identical(other.description, description) || other.description == description)&&(identical(other.builder, builder) || other.builder == builder)&&(identical(other.keep, keep) || other.keep == keep)&&(identical(other.path, path) || other.path == path)&&const DeepCollectionEquality().equals(other._modes, _modes));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,icon,label,description,builder,keep,path,const DeepCollectionEquality().hash(_modes));\n\n@override\nString toString() {\n  return 'NavigationItem(icon: $icon, label: $label, description: $description, builder: $builder, keep: $keep, path: $path, modes: $modes)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$NavigationItemCopyWith<$Res> implements $NavigationItemCopyWith<$Res> {\n  factory _$NavigationItemCopyWith(_NavigationItem value, $Res Function(_NavigationItem) _then) = __$NavigationItemCopyWithImpl;\n@override @useResult\n$Res call({\n Icon icon, PageLabel label, String? description, WidgetBuilder builder, bool keep, String? path, List<NavigationItemMode> modes\n});\n\n\n\n\n}\n/// @nodoc\nclass __$NavigationItemCopyWithImpl<$Res>\n    implements _$NavigationItemCopyWith<$Res> {\n  __$NavigationItemCopyWithImpl(this._self, this._then);\n\n  final _NavigationItem _self;\n  final $Res Function(_NavigationItem) _then;\n\n/// Create a copy of NavigationItem\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? icon = null,Object? label = null,Object? description = freezed,Object? builder = null,Object? keep = null,Object? path = freezed,Object? modes = null,}) {\n  return _then(_NavigationItem(\nicon: null == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable\nas Icon,label: null == label ? _self.label : label // ignore: cast_nullable_to_non_nullable\nas PageLabel,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable\nas String?,builder: null == builder ? _self.builder : builder // ignore: cast_nullable_to_non_nullable\nas WidgetBuilder,keep: null == keep ? _self.keep : keep // ignore: cast_nullable_to_non_nullable\nas bool,path: freezed == path ? _self.path : path // ignore: cast_nullable_to_non_nullable\nas String?,modes: null == modes ? _self._modes : modes // ignore: cast_nullable_to_non_nullable\nas List<NavigationItemMode>,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$Package {\n\n String get packageName; String get label; bool get system; bool get internet; int get lastUpdateTime;\n/// Create a copy of Package\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$PackageCopyWith<Package> get copyWith => _$PackageCopyWithImpl<Package>(this as Package, _$identity);\n\n  /// Serializes this Package to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is Package&&(identical(other.packageName, packageName) || other.packageName == packageName)&&(identical(other.label, label) || other.label == label)&&(identical(other.system, system) || other.system == system)&&(identical(other.internet, internet) || other.internet == internet)&&(identical(other.lastUpdateTime, lastUpdateTime) || other.lastUpdateTime == lastUpdateTime));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,packageName,label,system,internet,lastUpdateTime);\n\n@override\nString toString() {\n  return 'Package(packageName: $packageName, label: $label, system: $system, internet: $internet, lastUpdateTime: $lastUpdateTime)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $PackageCopyWith<$Res>  {\n  factory $PackageCopyWith(Package value, $Res Function(Package) _then) = _$PackageCopyWithImpl;\n@useResult\n$Res call({\n String packageName, String label, bool system, bool internet, int lastUpdateTime\n});\n\n\n\n\n}\n/// @nodoc\nclass _$PackageCopyWithImpl<$Res>\n    implements $PackageCopyWith<$Res> {\n  _$PackageCopyWithImpl(this._self, this._then);\n\n  final Package _self;\n  final $Res Function(Package) _then;\n\n/// Create a copy of Package\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? packageName = null,Object? label = null,Object? system = null,Object? internet = null,Object? lastUpdateTime = null,}) {\n  return _then(_self.copyWith(\npackageName: null == packageName ? _self.packageName : packageName // ignore: cast_nullable_to_non_nullable\nas String,label: null == label ? _self.label : label // ignore: cast_nullable_to_non_nullable\nas String,system: null == system ? _self.system : system // ignore: cast_nullable_to_non_nullable\nas bool,internet: null == internet ? _self.internet : internet // ignore: cast_nullable_to_non_nullable\nas bool,lastUpdateTime: null == lastUpdateTime ? _self.lastUpdateTime : lastUpdateTime // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [Package].\nextension PackagePatterns on Package {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Package value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _Package() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Package value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Package():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Package value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Package() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String packageName,  String label,  bool system,  bool internet,  int lastUpdateTime)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _Package() when $default != null:\nreturn $default(_that.packageName,_that.label,_that.system,_that.internet,_that.lastUpdateTime);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String packageName,  String label,  bool system,  bool internet,  int lastUpdateTime)  $default,) {final _that = this;\nswitch (_that) {\ncase _Package():\nreturn $default(_that.packageName,_that.label,_that.system,_that.internet,_that.lastUpdateTime);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String packageName,  String label,  bool system,  bool internet,  int lastUpdateTime)?  $default,) {final _that = this;\nswitch (_that) {\ncase _Package() when $default != null:\nreturn $default(_that.packageName,_that.label,_that.system,_that.internet,_that.lastUpdateTime);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _Package implements Package {\n  const _Package({required this.packageName, required this.label, required this.system, required this.internet, required this.lastUpdateTime});\n  factory _Package.fromJson(Map<String, dynamic> json) => _$PackageFromJson(json);\n\n@override final  String packageName;\n@override final  String label;\n@override final  bool system;\n@override final  bool internet;\n@override final  int lastUpdateTime;\n\n/// Create a copy of Package\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$PackageCopyWith<_Package> get copyWith => __$PackageCopyWithImpl<_Package>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$PackageToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Package&&(identical(other.packageName, packageName) || other.packageName == packageName)&&(identical(other.label, label) || other.label == label)&&(identical(other.system, system) || other.system == system)&&(identical(other.internet, internet) || other.internet == internet)&&(identical(other.lastUpdateTime, lastUpdateTime) || other.lastUpdateTime == lastUpdateTime));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,packageName,label,system,internet,lastUpdateTime);\n\n@override\nString toString() {\n  return 'Package(packageName: $packageName, label: $label, system: $system, internet: $internet, lastUpdateTime: $lastUpdateTime)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$PackageCopyWith<$Res> implements $PackageCopyWith<$Res> {\n  factory _$PackageCopyWith(_Package value, $Res Function(_Package) _then) = __$PackageCopyWithImpl;\n@override @useResult\n$Res call({\n String packageName, String label, bool system, bool internet, int lastUpdateTime\n});\n\n\n\n\n}\n/// @nodoc\nclass __$PackageCopyWithImpl<$Res>\n    implements _$PackageCopyWith<$Res> {\n  __$PackageCopyWithImpl(this._self, this._then);\n\n  final _Package _self;\n  final $Res Function(_Package) _then;\n\n/// Create a copy of Package\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? packageName = null,Object? label = null,Object? system = null,Object? internet = null,Object? lastUpdateTime = null,}) {\n  return _then(_Package(\npackageName: null == packageName ? _self.packageName : packageName // ignore: cast_nullable_to_non_nullable\nas String,label: null == label ? _self.label : label // ignore: cast_nullable_to_non_nullable\nas String,system: null == system ? _self.system : system // ignore: cast_nullable_to_non_nullable\nas bool,internet: null == internet ? _self.internet : internet // ignore: cast_nullable_to_non_nullable\nas bool,lastUpdateTime: null == lastUpdateTime ? _self.lastUpdateTime : lastUpdateTime // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$Metadata {\n\n int get uid; String get network; String get sourceIP; String get sourcePort; String get destinationIP; String get destinationPort; String get host; DnsMode? get dnsMode; String get process; String get processPath; String get remoteDestination; List<String> get sourceGeoIP; List<String> get destinationGeoIP; String get destinationIPASN; String get sourceIPASN; String get specialRules; String get specialProxy;\n/// Create a copy of Metadata\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$MetadataCopyWith<Metadata> get copyWith => _$MetadataCopyWithImpl<Metadata>(this as Metadata, _$identity);\n\n  /// Serializes this Metadata to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is Metadata&&(identical(other.uid, uid) || other.uid == uid)&&(identical(other.network, network) || other.network == network)&&(identical(other.sourceIP, sourceIP) || other.sourceIP == sourceIP)&&(identical(other.sourcePort, sourcePort) || other.sourcePort == sourcePort)&&(identical(other.destinationIP, destinationIP) || other.destinationIP == destinationIP)&&(identical(other.destinationPort, destinationPort) || other.destinationPort == destinationPort)&&(identical(other.host, host) || other.host == host)&&(identical(other.dnsMode, dnsMode) || other.dnsMode == dnsMode)&&(identical(other.process, process) || other.process == process)&&(identical(other.processPath, processPath) || other.processPath == processPath)&&(identical(other.remoteDestination, remoteDestination) || other.remoteDestination == remoteDestination)&&const DeepCollectionEquality().equals(other.sourceGeoIP, sourceGeoIP)&&const DeepCollectionEquality().equals(other.destinationGeoIP, destinationGeoIP)&&(identical(other.destinationIPASN, destinationIPASN) || other.destinationIPASN == destinationIPASN)&&(identical(other.sourceIPASN, sourceIPASN) || other.sourceIPASN == sourceIPASN)&&(identical(other.specialRules, specialRules) || other.specialRules == specialRules)&&(identical(other.specialProxy, specialProxy) || other.specialProxy == specialProxy));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,uid,network,sourceIP,sourcePort,destinationIP,destinationPort,host,dnsMode,process,processPath,remoteDestination,const DeepCollectionEquality().hash(sourceGeoIP),const DeepCollectionEquality().hash(destinationGeoIP),destinationIPASN,sourceIPASN,specialRules,specialProxy);\n\n@override\nString toString() {\n  return 'Metadata(uid: $uid, network: $network, sourceIP: $sourceIP, sourcePort: $sourcePort, destinationIP: $destinationIP, destinationPort: $destinationPort, host: $host, dnsMode: $dnsMode, process: $process, processPath: $processPath, remoteDestination: $remoteDestination, sourceGeoIP: $sourceGeoIP, destinationGeoIP: $destinationGeoIP, destinationIPASN: $destinationIPASN, sourceIPASN: $sourceIPASN, specialRules: $specialRules, specialProxy: $specialProxy)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $MetadataCopyWith<$Res>  {\n  factory $MetadataCopyWith(Metadata value, $Res Function(Metadata) _then) = _$MetadataCopyWithImpl;\n@useResult\n$Res call({\n int uid, String network, String sourceIP, String sourcePort, String destinationIP, String destinationPort, String host, DnsMode? dnsMode, String process, String processPath, String remoteDestination, List<String> sourceGeoIP, List<String> destinationGeoIP, String destinationIPASN, String sourceIPASN, String specialRules, String specialProxy\n});\n\n\n\n\n}\n/// @nodoc\nclass _$MetadataCopyWithImpl<$Res>\n    implements $MetadataCopyWith<$Res> {\n  _$MetadataCopyWithImpl(this._self, this._then);\n\n  final Metadata _self;\n  final $Res Function(Metadata) _then;\n\n/// Create a copy of Metadata\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? uid = null,Object? network = null,Object? sourceIP = null,Object? sourcePort = null,Object? destinationIP = null,Object? destinationPort = null,Object? host = null,Object? dnsMode = freezed,Object? process = null,Object? processPath = null,Object? remoteDestination = null,Object? sourceGeoIP = null,Object? destinationGeoIP = null,Object? destinationIPASN = null,Object? sourceIPASN = null,Object? specialRules = null,Object? specialProxy = null,}) {\n  return _then(_self.copyWith(\nuid: null == uid ? _self.uid : uid // ignore: cast_nullable_to_non_nullable\nas int,network: null == network ? _self.network : network // ignore: cast_nullable_to_non_nullable\nas String,sourceIP: null == sourceIP ? _self.sourceIP : sourceIP // ignore: cast_nullable_to_non_nullable\nas String,sourcePort: null == sourcePort ? _self.sourcePort : sourcePort // ignore: cast_nullable_to_non_nullable\nas String,destinationIP: null == destinationIP ? _self.destinationIP : destinationIP // ignore: cast_nullable_to_non_nullable\nas String,destinationPort: null == destinationPort ? _self.destinationPort : destinationPort // ignore: cast_nullable_to_non_nullable\nas String,host: null == host ? _self.host : host // ignore: cast_nullable_to_non_nullable\nas String,dnsMode: freezed == dnsMode ? _self.dnsMode : dnsMode // ignore: cast_nullable_to_non_nullable\nas DnsMode?,process: null == process ? _self.process : process // ignore: cast_nullable_to_non_nullable\nas String,processPath: null == processPath ? _self.processPath : processPath // ignore: cast_nullable_to_non_nullable\nas String,remoteDestination: null == remoteDestination ? _self.remoteDestination : remoteDestination // ignore: cast_nullable_to_non_nullable\nas String,sourceGeoIP: null == sourceGeoIP ? _self.sourceGeoIP : sourceGeoIP // ignore: cast_nullable_to_non_nullable\nas List<String>,destinationGeoIP: null == destinationGeoIP ? _self.destinationGeoIP : destinationGeoIP // ignore: cast_nullable_to_non_nullable\nas List<String>,destinationIPASN: null == destinationIPASN ? _self.destinationIPASN : destinationIPASN // ignore: cast_nullable_to_non_nullable\nas String,sourceIPASN: null == sourceIPASN ? _self.sourceIPASN : sourceIPASN // ignore: cast_nullable_to_non_nullable\nas String,specialRules: null == specialRules ? _self.specialRules : specialRules // ignore: cast_nullable_to_non_nullable\nas String,specialProxy: null == specialProxy ? _self.specialProxy : specialProxy // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [Metadata].\nextension MetadataPatterns on Metadata {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Metadata value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _Metadata() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Metadata value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Metadata():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Metadata value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Metadata() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int uid,  String network,  String sourceIP,  String sourcePort,  String destinationIP,  String destinationPort,  String host,  DnsMode? dnsMode,  String process,  String processPath,  String remoteDestination,  List<String> sourceGeoIP,  List<String> destinationGeoIP,  String destinationIPASN,  String sourceIPASN,  String specialRules,  String specialProxy)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _Metadata() when $default != null:\nreturn $default(_that.uid,_that.network,_that.sourceIP,_that.sourcePort,_that.destinationIP,_that.destinationPort,_that.host,_that.dnsMode,_that.process,_that.processPath,_that.remoteDestination,_that.sourceGeoIP,_that.destinationGeoIP,_that.destinationIPASN,_that.sourceIPASN,_that.specialRules,_that.specialProxy);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int uid,  String network,  String sourceIP,  String sourcePort,  String destinationIP,  String destinationPort,  String host,  DnsMode? dnsMode,  String process,  String processPath,  String remoteDestination,  List<String> sourceGeoIP,  List<String> destinationGeoIP,  String destinationIPASN,  String sourceIPASN,  String specialRules,  String specialProxy)  $default,) {final _that = this;\nswitch (_that) {\ncase _Metadata():\nreturn $default(_that.uid,_that.network,_that.sourceIP,_that.sourcePort,_that.destinationIP,_that.destinationPort,_that.host,_that.dnsMode,_that.process,_that.processPath,_that.remoteDestination,_that.sourceGeoIP,_that.destinationGeoIP,_that.destinationIPASN,_that.sourceIPASN,_that.specialRules,_that.specialProxy);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int uid,  String network,  String sourceIP,  String sourcePort,  String destinationIP,  String destinationPort,  String host,  DnsMode? dnsMode,  String process,  String processPath,  String remoteDestination,  List<String> sourceGeoIP,  List<String> destinationGeoIP,  String destinationIPASN,  String sourceIPASN,  String specialRules,  String specialProxy)?  $default,) {final _that = this;\nswitch (_that) {\ncase _Metadata() when $default != null:\nreturn $default(_that.uid,_that.network,_that.sourceIP,_that.sourcePort,_that.destinationIP,_that.destinationPort,_that.host,_that.dnsMode,_that.process,_that.processPath,_that.remoteDestination,_that.sourceGeoIP,_that.destinationGeoIP,_that.destinationIPASN,_that.sourceIPASN,_that.specialRules,_that.specialProxy);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _Metadata implements Metadata {\n  const _Metadata({this.uid = 0, this.network = '', this.sourceIP = '', this.sourcePort = '', this.destinationIP = '', this.destinationPort = '', this.host = '', this.dnsMode, this.process = '', this.processPath = '', this.remoteDestination = '', final  List<String> sourceGeoIP = const [], final  List<String> destinationGeoIP = const [], this.destinationIPASN = '', this.sourceIPASN = '', this.specialRules = '', this.specialProxy = ''}): _sourceGeoIP = sourceGeoIP,_destinationGeoIP = destinationGeoIP;\n  factory _Metadata.fromJson(Map<String, dynamic> json) => _$MetadataFromJson(json);\n\n@override@JsonKey() final  int uid;\n@override@JsonKey() final  String network;\n@override@JsonKey() final  String sourceIP;\n@override@JsonKey() final  String sourcePort;\n@override@JsonKey() final  String destinationIP;\n@override@JsonKey() final  String destinationPort;\n@override@JsonKey() final  String host;\n@override final  DnsMode? dnsMode;\n@override@JsonKey() final  String process;\n@override@JsonKey() final  String processPath;\n@override@JsonKey() final  String remoteDestination;\n final  List<String> _sourceGeoIP;\n@override@JsonKey() List<String> get sourceGeoIP {\n  if (_sourceGeoIP is EqualUnmodifiableListView) return _sourceGeoIP;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_sourceGeoIP);\n}\n\n final  List<String> _destinationGeoIP;\n@override@JsonKey() List<String> get destinationGeoIP {\n  if (_destinationGeoIP is EqualUnmodifiableListView) return _destinationGeoIP;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_destinationGeoIP);\n}\n\n@override@JsonKey() final  String destinationIPASN;\n@override@JsonKey() final  String sourceIPASN;\n@override@JsonKey() final  String specialRules;\n@override@JsonKey() final  String specialProxy;\n\n/// Create a copy of Metadata\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$MetadataCopyWith<_Metadata> get copyWith => __$MetadataCopyWithImpl<_Metadata>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$MetadataToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Metadata&&(identical(other.uid, uid) || other.uid == uid)&&(identical(other.network, network) || other.network == network)&&(identical(other.sourceIP, sourceIP) || other.sourceIP == sourceIP)&&(identical(other.sourcePort, sourcePort) || other.sourcePort == sourcePort)&&(identical(other.destinationIP, destinationIP) || other.destinationIP == destinationIP)&&(identical(other.destinationPort, destinationPort) || other.destinationPort == destinationPort)&&(identical(other.host, host) || other.host == host)&&(identical(other.dnsMode, dnsMode) || other.dnsMode == dnsMode)&&(identical(other.process, process) || other.process == process)&&(identical(other.processPath, processPath) || other.processPath == processPath)&&(identical(other.remoteDestination, remoteDestination) || other.remoteDestination == remoteDestination)&&const DeepCollectionEquality().equals(other._sourceGeoIP, _sourceGeoIP)&&const DeepCollectionEquality().equals(other._destinationGeoIP, _destinationGeoIP)&&(identical(other.destinationIPASN, destinationIPASN) || other.destinationIPASN == destinationIPASN)&&(identical(other.sourceIPASN, sourceIPASN) || other.sourceIPASN == sourceIPASN)&&(identical(other.specialRules, specialRules) || other.specialRules == specialRules)&&(identical(other.specialProxy, specialProxy) || other.specialProxy == specialProxy));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,uid,network,sourceIP,sourcePort,destinationIP,destinationPort,host,dnsMode,process,processPath,remoteDestination,const DeepCollectionEquality().hash(_sourceGeoIP),const DeepCollectionEquality().hash(_destinationGeoIP),destinationIPASN,sourceIPASN,specialRules,specialProxy);\n\n@override\nString toString() {\n  return 'Metadata(uid: $uid, network: $network, sourceIP: $sourceIP, sourcePort: $sourcePort, destinationIP: $destinationIP, destinationPort: $destinationPort, host: $host, dnsMode: $dnsMode, process: $process, processPath: $processPath, remoteDestination: $remoteDestination, sourceGeoIP: $sourceGeoIP, destinationGeoIP: $destinationGeoIP, destinationIPASN: $destinationIPASN, sourceIPASN: $sourceIPASN, specialRules: $specialRules, specialProxy: $specialProxy)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$MetadataCopyWith<$Res> implements $MetadataCopyWith<$Res> {\n  factory _$MetadataCopyWith(_Metadata value, $Res Function(_Metadata) _then) = __$MetadataCopyWithImpl;\n@override @useResult\n$Res call({\n int uid, String network, String sourceIP, String sourcePort, String destinationIP, String destinationPort, String host, DnsMode? dnsMode, String process, String processPath, String remoteDestination, List<String> sourceGeoIP, List<String> destinationGeoIP, String destinationIPASN, String sourceIPASN, String specialRules, String specialProxy\n});\n\n\n\n\n}\n/// @nodoc\nclass __$MetadataCopyWithImpl<$Res>\n    implements _$MetadataCopyWith<$Res> {\n  __$MetadataCopyWithImpl(this._self, this._then);\n\n  final _Metadata _self;\n  final $Res Function(_Metadata) _then;\n\n/// Create a copy of Metadata\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? uid = null,Object? network = null,Object? sourceIP = null,Object? sourcePort = null,Object? destinationIP = null,Object? destinationPort = null,Object? host = null,Object? dnsMode = freezed,Object? process = null,Object? processPath = null,Object? remoteDestination = null,Object? sourceGeoIP = null,Object? destinationGeoIP = null,Object? destinationIPASN = null,Object? sourceIPASN = null,Object? specialRules = null,Object? specialProxy = null,}) {\n  return _then(_Metadata(\nuid: null == uid ? _self.uid : uid // ignore: cast_nullable_to_non_nullable\nas int,network: null == network ? _self.network : network // ignore: cast_nullable_to_non_nullable\nas String,sourceIP: null == sourceIP ? _self.sourceIP : sourceIP // ignore: cast_nullable_to_non_nullable\nas String,sourcePort: null == sourcePort ? _self.sourcePort : sourcePort // ignore: cast_nullable_to_non_nullable\nas String,destinationIP: null == destinationIP ? _self.destinationIP : destinationIP // ignore: cast_nullable_to_non_nullable\nas String,destinationPort: null == destinationPort ? _self.destinationPort : destinationPort // ignore: cast_nullable_to_non_nullable\nas String,host: null == host ? _self.host : host // ignore: cast_nullable_to_non_nullable\nas String,dnsMode: freezed == dnsMode ? _self.dnsMode : dnsMode // ignore: cast_nullable_to_non_nullable\nas DnsMode?,process: null == process ? _self.process : process // ignore: cast_nullable_to_non_nullable\nas String,processPath: null == processPath ? _self.processPath : processPath // ignore: cast_nullable_to_non_nullable\nas String,remoteDestination: null == remoteDestination ? _self.remoteDestination : remoteDestination // ignore: cast_nullable_to_non_nullable\nas String,sourceGeoIP: null == sourceGeoIP ? _self._sourceGeoIP : sourceGeoIP // ignore: cast_nullable_to_non_nullable\nas List<String>,destinationGeoIP: null == destinationGeoIP ? _self._destinationGeoIP : destinationGeoIP // ignore: cast_nullable_to_non_nullable\nas List<String>,destinationIPASN: null == destinationIPASN ? _self.destinationIPASN : destinationIPASN // ignore: cast_nullable_to_non_nullable\nas String,sourceIPASN: null == sourceIPASN ? _self.sourceIPASN : sourceIPASN // ignore: cast_nullable_to_non_nullable\nas String,specialRules: null == specialRules ? _self.specialRules : specialRules // ignore: cast_nullable_to_non_nullable\nas String,specialProxy: null == specialProxy ? _self.specialProxy : specialProxy // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$TrackerInfo {\n\n String get id; int get upload; int get download; DateTime get start; Metadata get metadata; List<String> get chains; String get rule; String get rulePayload; int? get downloadSpeed; int? get uploadSpeed;\n/// Create a copy of TrackerInfo\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$TrackerInfoCopyWith<TrackerInfo> get copyWith => _$TrackerInfoCopyWithImpl<TrackerInfo>(this as TrackerInfo, _$identity);\n\n  /// Serializes this TrackerInfo to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is TrackerInfo&&(identical(other.id, id) || other.id == id)&&(identical(other.upload, upload) || other.upload == upload)&&(identical(other.download, download) || other.download == download)&&(identical(other.start, start) || other.start == start)&&(identical(other.metadata, metadata) || other.metadata == metadata)&&const DeepCollectionEquality().equals(other.chains, chains)&&(identical(other.rule, rule) || other.rule == rule)&&(identical(other.rulePayload, rulePayload) || other.rulePayload == rulePayload)&&(identical(other.downloadSpeed, downloadSpeed) || other.downloadSpeed == downloadSpeed)&&(identical(other.uploadSpeed, uploadSpeed) || other.uploadSpeed == uploadSpeed));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,id,upload,download,start,metadata,const DeepCollectionEquality().hash(chains),rule,rulePayload,downloadSpeed,uploadSpeed);\n\n@override\nString toString() {\n  return 'TrackerInfo(id: $id, upload: $upload, download: $download, start: $start, metadata: $metadata, chains: $chains, rule: $rule, rulePayload: $rulePayload, downloadSpeed: $downloadSpeed, uploadSpeed: $uploadSpeed)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $TrackerInfoCopyWith<$Res>  {\n  factory $TrackerInfoCopyWith(TrackerInfo value, $Res Function(TrackerInfo) _then) = _$TrackerInfoCopyWithImpl;\n@useResult\n$Res call({\n String id, int upload, int download, DateTime start, Metadata metadata, List<String> chains, String rule, String rulePayload, int? downloadSpeed, int? uploadSpeed\n});\n\n\n$MetadataCopyWith<$Res> get metadata;\n\n}\n/// @nodoc\nclass _$TrackerInfoCopyWithImpl<$Res>\n    implements $TrackerInfoCopyWith<$Res> {\n  _$TrackerInfoCopyWithImpl(this._self, this._then);\n\n  final TrackerInfo _self;\n  final $Res Function(TrackerInfo) _then;\n\n/// Create a copy of TrackerInfo\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? upload = null,Object? download = null,Object? start = null,Object? metadata = null,Object? chains = null,Object? rule = null,Object? rulePayload = null,Object? downloadSpeed = freezed,Object? uploadSpeed = freezed,}) {\n  return _then(_self.copyWith(\nid: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable\nas String,upload: null == upload ? _self.upload : upload // ignore: cast_nullable_to_non_nullable\nas int,download: null == download ? _self.download : download // ignore: cast_nullable_to_non_nullable\nas int,start: null == start ? _self.start : start // ignore: cast_nullable_to_non_nullable\nas DateTime,metadata: null == metadata ? _self.metadata : metadata // ignore: cast_nullable_to_non_nullable\nas Metadata,chains: null == chains ? _self.chains : chains // ignore: cast_nullable_to_non_nullable\nas List<String>,rule: null == rule ? _self.rule : rule // ignore: cast_nullable_to_non_nullable\nas String,rulePayload: null == rulePayload ? _self.rulePayload : rulePayload // ignore: cast_nullable_to_non_nullable\nas String,downloadSpeed: freezed == downloadSpeed ? _self.downloadSpeed : downloadSpeed // ignore: cast_nullable_to_non_nullable\nas int?,uploadSpeed: freezed == uploadSpeed ? _self.uploadSpeed : uploadSpeed // ignore: cast_nullable_to_non_nullable\nas int?,\n  ));\n}\n/// Create a copy of TrackerInfo\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$MetadataCopyWith<$Res> get metadata {\n  \n  return $MetadataCopyWith<$Res>(_self.metadata, (value) {\n    return _then(_self.copyWith(metadata: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [TrackerInfo].\nextension TrackerInfoPatterns on TrackerInfo {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _TrackerInfo value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _TrackerInfo() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _TrackerInfo value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _TrackerInfo():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _TrackerInfo value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _TrackerInfo() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id,  int upload,  int download,  DateTime start,  Metadata metadata,  List<String> chains,  String rule,  String rulePayload,  int? downloadSpeed,  int? uploadSpeed)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _TrackerInfo() when $default != null:\nreturn $default(_that.id,_that.upload,_that.download,_that.start,_that.metadata,_that.chains,_that.rule,_that.rulePayload,_that.downloadSpeed,_that.uploadSpeed);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id,  int upload,  int download,  DateTime start,  Metadata metadata,  List<String> chains,  String rule,  String rulePayload,  int? downloadSpeed,  int? uploadSpeed)  $default,) {final _that = this;\nswitch (_that) {\ncase _TrackerInfo():\nreturn $default(_that.id,_that.upload,_that.download,_that.start,_that.metadata,_that.chains,_that.rule,_that.rulePayload,_that.downloadSpeed,_that.uploadSpeed);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id,  int upload,  int download,  DateTime start,  Metadata metadata,  List<String> chains,  String rule,  String rulePayload,  int? downloadSpeed,  int? uploadSpeed)?  $default,) {final _that = this;\nswitch (_that) {\ncase _TrackerInfo() when $default != null:\nreturn $default(_that.id,_that.upload,_that.download,_that.start,_that.metadata,_that.chains,_that.rule,_that.rulePayload,_that.downloadSpeed,_that.uploadSpeed);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _TrackerInfo implements TrackerInfo {\n  const _TrackerInfo({required this.id, this.upload = 0, this.download = 0, required this.start, required this.metadata, required final  List<String> chains, required this.rule, required this.rulePayload, this.downloadSpeed, this.uploadSpeed}): _chains = chains;\n  factory _TrackerInfo.fromJson(Map<String, dynamic> json) => _$TrackerInfoFromJson(json);\n\n@override final  String id;\n@override@JsonKey() final  int upload;\n@override@JsonKey() final  int download;\n@override final  DateTime start;\n@override final  Metadata metadata;\n final  List<String> _chains;\n@override List<String> get chains {\n  if (_chains is EqualUnmodifiableListView) return _chains;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_chains);\n}\n\n@override final  String rule;\n@override final  String rulePayload;\n@override final  int? downloadSpeed;\n@override final  int? uploadSpeed;\n\n/// Create a copy of TrackerInfo\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$TrackerInfoCopyWith<_TrackerInfo> get copyWith => __$TrackerInfoCopyWithImpl<_TrackerInfo>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$TrackerInfoToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _TrackerInfo&&(identical(other.id, id) || other.id == id)&&(identical(other.upload, upload) || other.upload == upload)&&(identical(other.download, download) || other.download == download)&&(identical(other.start, start) || other.start == start)&&(identical(other.metadata, metadata) || other.metadata == metadata)&&const DeepCollectionEquality().equals(other._chains, _chains)&&(identical(other.rule, rule) || other.rule == rule)&&(identical(other.rulePayload, rulePayload) || other.rulePayload == rulePayload)&&(identical(other.downloadSpeed, downloadSpeed) || other.downloadSpeed == downloadSpeed)&&(identical(other.uploadSpeed, uploadSpeed) || other.uploadSpeed == uploadSpeed));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,id,upload,download,start,metadata,const DeepCollectionEquality().hash(_chains),rule,rulePayload,downloadSpeed,uploadSpeed);\n\n@override\nString toString() {\n  return 'TrackerInfo(id: $id, upload: $upload, download: $download, start: $start, metadata: $metadata, chains: $chains, rule: $rule, rulePayload: $rulePayload, downloadSpeed: $downloadSpeed, uploadSpeed: $uploadSpeed)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$TrackerInfoCopyWith<$Res> implements $TrackerInfoCopyWith<$Res> {\n  factory _$TrackerInfoCopyWith(_TrackerInfo value, $Res Function(_TrackerInfo) _then) = __$TrackerInfoCopyWithImpl;\n@override @useResult\n$Res call({\n String id, int upload, int download, DateTime start, Metadata metadata, List<String> chains, String rule, String rulePayload, int? downloadSpeed, int? uploadSpeed\n});\n\n\n@override $MetadataCopyWith<$Res> get metadata;\n\n}\n/// @nodoc\nclass __$TrackerInfoCopyWithImpl<$Res>\n    implements _$TrackerInfoCopyWith<$Res> {\n  __$TrackerInfoCopyWithImpl(this._self, this._then);\n\n  final _TrackerInfo _self;\n  final $Res Function(_TrackerInfo) _then;\n\n/// Create a copy of TrackerInfo\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? upload = null,Object? download = null,Object? start = null,Object? metadata = null,Object? chains = null,Object? rule = null,Object? rulePayload = null,Object? downloadSpeed = freezed,Object? uploadSpeed = freezed,}) {\n  return _then(_TrackerInfo(\nid: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable\nas String,upload: null == upload ? _self.upload : upload // ignore: cast_nullable_to_non_nullable\nas int,download: null == download ? _self.download : download // ignore: cast_nullable_to_non_nullable\nas int,start: null == start ? _self.start : start // ignore: cast_nullable_to_non_nullable\nas DateTime,metadata: null == metadata ? _self.metadata : metadata // ignore: cast_nullable_to_non_nullable\nas Metadata,chains: null == chains ? _self._chains : chains // ignore: cast_nullable_to_non_nullable\nas List<String>,rule: null == rule ? _self.rule : rule // ignore: cast_nullable_to_non_nullable\nas String,rulePayload: null == rulePayload ? _self.rulePayload : rulePayload // ignore: cast_nullable_to_non_nullable\nas String,downloadSpeed: freezed == downloadSpeed ? _self.downloadSpeed : downloadSpeed // ignore: cast_nullable_to_non_nullable\nas int?,uploadSpeed: freezed == uploadSpeed ? _self.uploadSpeed : uploadSpeed // ignore: cast_nullable_to_non_nullable\nas int?,\n  ));\n}\n\n/// Create a copy of TrackerInfo\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$MetadataCopyWith<$Res> get metadata {\n  \n  return $MetadataCopyWith<$Res>(_self.metadata, (value) {\n    return _then(_self.copyWith(metadata: value));\n  });\n}\n}\n\n\n/// @nodoc\nmixin _$Log {\n\n// @JsonKey(fromJson: _logId) required String id,\n@JsonKey(name: 'LogLevel') LogLevel get logLevel;@JsonKey(name: 'Payload') String get payload;@JsonKey(fromJson: _logDateTime) String get dateTime;\n/// Create a copy of Log\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$LogCopyWith<Log> get copyWith => _$LogCopyWithImpl<Log>(this as Log, _$identity);\n\n  /// Serializes this Log to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is Log&&(identical(other.logLevel, logLevel) || other.logLevel == logLevel)&&(identical(other.payload, payload) || other.payload == payload)&&(identical(other.dateTime, dateTime) || other.dateTime == dateTime));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,logLevel,payload,dateTime);\n\n@override\nString toString() {\n  return 'Log(logLevel: $logLevel, payload: $payload, dateTime: $dateTime)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $LogCopyWith<$Res>  {\n  factory $LogCopyWith(Log value, $Res Function(Log) _then) = _$LogCopyWithImpl;\n@useResult\n$Res call({\n@JsonKey(name: 'LogLevel') LogLevel logLevel,@JsonKey(name: 'Payload') String payload,@JsonKey(fromJson: _logDateTime) String dateTime\n});\n\n\n\n\n}\n/// @nodoc\nclass _$LogCopyWithImpl<$Res>\n    implements $LogCopyWith<$Res> {\n  _$LogCopyWithImpl(this._self, this._then);\n\n  final Log _self;\n  final $Res Function(Log) _then;\n\n/// Create a copy of Log\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? logLevel = null,Object? payload = null,Object? dateTime = null,}) {\n  return _then(_self.copyWith(\nlogLevel: null == logLevel ? _self.logLevel : logLevel // ignore: cast_nullable_to_non_nullable\nas LogLevel,payload: null == payload ? _self.payload : payload // ignore: cast_nullable_to_non_nullable\nas String,dateTime: null == dateTime ? _self.dateTime : dateTime // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [Log].\nextension LogPatterns on Log {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Log value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _Log() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Log value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Log():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Log value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Log() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 'LogLevel')  LogLevel logLevel, @JsonKey(name: 'Payload')  String payload, @JsonKey(fromJson: _logDateTime)  String dateTime)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _Log() when $default != null:\nreturn $default(_that.logLevel,_that.payload,_that.dateTime);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 'LogLevel')  LogLevel logLevel, @JsonKey(name: 'Payload')  String payload, @JsonKey(fromJson: _logDateTime)  String dateTime)  $default,) {final _that = this;\nswitch (_that) {\ncase _Log():\nreturn $default(_that.logLevel,_that.payload,_that.dateTime);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 'LogLevel')  LogLevel logLevel, @JsonKey(name: 'Payload')  String payload, @JsonKey(fromJson: _logDateTime)  String dateTime)?  $default,) {final _that = this;\nswitch (_that) {\ncase _Log() when $default != null:\nreturn $default(_that.logLevel,_that.payload,_that.dateTime);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _Log implements Log {\n  const _Log({@JsonKey(name: 'LogLevel') this.logLevel = LogLevel.info, @JsonKey(name: 'Payload') this.payload = '', @JsonKey(fromJson: _logDateTime) required this.dateTime});\n  factory _Log.fromJson(Map<String, dynamic> json) => _$LogFromJson(json);\n\n// @JsonKey(fromJson: _logId) required String id,\n@override@JsonKey(name: 'LogLevel') final  LogLevel logLevel;\n@override@JsonKey(name: 'Payload') final  String payload;\n@override@JsonKey(fromJson: _logDateTime) final  String dateTime;\n\n/// Create a copy of Log\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$LogCopyWith<_Log> get copyWith => __$LogCopyWithImpl<_Log>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$LogToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Log&&(identical(other.logLevel, logLevel) || other.logLevel == logLevel)&&(identical(other.payload, payload) || other.payload == payload)&&(identical(other.dateTime, dateTime) || other.dateTime == dateTime));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,logLevel,payload,dateTime);\n\n@override\nString toString() {\n  return 'Log(logLevel: $logLevel, payload: $payload, dateTime: $dateTime)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$LogCopyWith<$Res> implements $LogCopyWith<$Res> {\n  factory _$LogCopyWith(_Log value, $Res Function(_Log) _then) = __$LogCopyWithImpl;\n@override @useResult\n$Res call({\n@JsonKey(name: 'LogLevel') LogLevel logLevel,@JsonKey(name: 'Payload') String payload,@JsonKey(fromJson: _logDateTime) String dateTime\n});\n\n\n\n\n}\n/// @nodoc\nclass __$LogCopyWithImpl<$Res>\n    implements _$LogCopyWith<$Res> {\n  __$LogCopyWithImpl(this._self, this._then);\n\n  final _Log _self;\n  final $Res Function(_Log) _then;\n\n/// Create a copy of Log\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? logLevel = null,Object? payload = null,Object? dateTime = null,}) {\n  return _then(_Log(\nlogLevel: null == logLevel ? _self.logLevel : logLevel // ignore: cast_nullable_to_non_nullable\nas LogLevel,payload: null == payload ? _self.payload : payload // ignore: cast_nullable_to_non_nullable\nas String,dateTime: null == dateTime ? _self.dateTime : dateTime // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$LogsState {\n\n List<Log> get logs; List<String> get keywords; String get query; bool get autoScrollToEnd;\n/// Create a copy of LogsState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$LogsStateCopyWith<LogsState> get copyWith => _$LogsStateCopyWithImpl<LogsState>(this as LogsState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is LogsState&&const DeepCollectionEquality().equals(other.logs, logs)&&const DeepCollectionEquality().equals(other.keywords, keywords)&&(identical(other.query, query) || other.query == query)&&(identical(other.autoScrollToEnd, autoScrollToEnd) || other.autoScrollToEnd == autoScrollToEnd));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(logs),const DeepCollectionEquality().hash(keywords),query,autoScrollToEnd);\n\n@override\nString toString() {\n  return 'LogsState(logs: $logs, keywords: $keywords, query: $query, autoScrollToEnd: $autoScrollToEnd)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $LogsStateCopyWith<$Res>  {\n  factory $LogsStateCopyWith(LogsState value, $Res Function(LogsState) _then) = _$LogsStateCopyWithImpl;\n@useResult\n$Res call({\n List<Log> logs, List<String> keywords, String query, bool autoScrollToEnd\n});\n\n\n\n\n}\n/// @nodoc\nclass _$LogsStateCopyWithImpl<$Res>\n    implements $LogsStateCopyWith<$Res> {\n  _$LogsStateCopyWithImpl(this._self, this._then);\n\n  final LogsState _self;\n  final $Res Function(LogsState) _then;\n\n/// Create a copy of LogsState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? logs = null,Object? keywords = null,Object? query = null,Object? autoScrollToEnd = null,}) {\n  return _then(_self.copyWith(\nlogs: null == logs ? _self.logs : logs // ignore: cast_nullable_to_non_nullable\nas List<Log>,keywords: null == keywords ? _self.keywords : keywords // ignore: cast_nullable_to_non_nullable\nas List<String>,query: null == query ? _self.query : query // ignore: cast_nullable_to_non_nullable\nas String,autoScrollToEnd: null == autoScrollToEnd ? _self.autoScrollToEnd : autoScrollToEnd // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [LogsState].\nextension LogsStatePatterns on LogsState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _LogsState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _LogsState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _LogsState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _LogsState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _LogsState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _LogsState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( List<Log> logs,  List<String> keywords,  String query,  bool autoScrollToEnd)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _LogsState() when $default != null:\nreturn $default(_that.logs,_that.keywords,_that.query,_that.autoScrollToEnd);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( List<Log> logs,  List<String> keywords,  String query,  bool autoScrollToEnd)  $default,) {final _that = this;\nswitch (_that) {\ncase _LogsState():\nreturn $default(_that.logs,_that.keywords,_that.query,_that.autoScrollToEnd);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( List<Log> logs,  List<String> keywords,  String query,  bool autoScrollToEnd)?  $default,) {final _that = this;\nswitch (_that) {\ncase _LogsState() when $default != null:\nreturn $default(_that.logs,_that.keywords,_that.query,_that.autoScrollToEnd);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _LogsState implements LogsState {\n  const _LogsState({final  List<Log> logs = const [], final  List<String> keywords = const [], this.query = '', this.autoScrollToEnd = true}): _logs = logs,_keywords = keywords;\n  \n\n final  List<Log> _logs;\n@override@JsonKey() List<Log> get logs {\n  if (_logs is EqualUnmodifiableListView) return _logs;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_logs);\n}\n\n final  List<String> _keywords;\n@override@JsonKey() List<String> get keywords {\n  if (_keywords is EqualUnmodifiableListView) return _keywords;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_keywords);\n}\n\n@override@JsonKey() final  String query;\n@override@JsonKey() final  bool autoScrollToEnd;\n\n/// Create a copy of LogsState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$LogsStateCopyWith<_LogsState> get copyWith => __$LogsStateCopyWithImpl<_LogsState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _LogsState&&const DeepCollectionEquality().equals(other._logs, _logs)&&const DeepCollectionEquality().equals(other._keywords, _keywords)&&(identical(other.query, query) || other.query == query)&&(identical(other.autoScrollToEnd, autoScrollToEnd) || other.autoScrollToEnd == autoScrollToEnd));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_logs),const DeepCollectionEquality().hash(_keywords),query,autoScrollToEnd);\n\n@override\nString toString() {\n  return 'LogsState(logs: $logs, keywords: $keywords, query: $query, autoScrollToEnd: $autoScrollToEnd)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$LogsStateCopyWith<$Res> implements $LogsStateCopyWith<$Res> {\n  factory _$LogsStateCopyWith(_LogsState value, $Res Function(_LogsState) _then) = __$LogsStateCopyWithImpl;\n@override @useResult\n$Res call({\n List<Log> logs, List<String> keywords, String query, bool autoScrollToEnd\n});\n\n\n\n\n}\n/// @nodoc\nclass __$LogsStateCopyWithImpl<$Res>\n    implements _$LogsStateCopyWith<$Res> {\n  __$LogsStateCopyWithImpl(this._self, this._then);\n\n  final _LogsState _self;\n  final $Res Function(_LogsState) _then;\n\n/// Create a copy of LogsState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? logs = null,Object? keywords = null,Object? query = null,Object? autoScrollToEnd = null,}) {\n  return _then(_LogsState(\nlogs: null == logs ? _self._logs : logs // ignore: cast_nullable_to_non_nullable\nas List<Log>,keywords: null == keywords ? _self._keywords : keywords // ignore: cast_nullable_to_non_nullable\nas List<String>,query: null == query ? _self.query : query // ignore: cast_nullable_to_non_nullable\nas String,autoScrollToEnd: null == autoScrollToEnd ? _self.autoScrollToEnd : autoScrollToEnd // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$TrackerInfosState {\n\n List<TrackerInfo> get trackerInfos; List<String> get keywords; String get query; bool get autoScrollToEnd;\n/// Create a copy of TrackerInfosState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$TrackerInfosStateCopyWith<TrackerInfosState> get copyWith => _$TrackerInfosStateCopyWithImpl<TrackerInfosState>(this as TrackerInfosState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is TrackerInfosState&&const DeepCollectionEquality().equals(other.trackerInfos, trackerInfos)&&const DeepCollectionEquality().equals(other.keywords, keywords)&&(identical(other.query, query) || other.query == query)&&(identical(other.autoScrollToEnd, autoScrollToEnd) || other.autoScrollToEnd == autoScrollToEnd));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(trackerInfos),const DeepCollectionEquality().hash(keywords),query,autoScrollToEnd);\n\n@override\nString toString() {\n  return 'TrackerInfosState(trackerInfos: $trackerInfos, keywords: $keywords, query: $query, autoScrollToEnd: $autoScrollToEnd)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $TrackerInfosStateCopyWith<$Res>  {\n  factory $TrackerInfosStateCopyWith(TrackerInfosState value, $Res Function(TrackerInfosState) _then) = _$TrackerInfosStateCopyWithImpl;\n@useResult\n$Res call({\n List<TrackerInfo> trackerInfos, List<String> keywords, String query, bool autoScrollToEnd\n});\n\n\n\n\n}\n/// @nodoc\nclass _$TrackerInfosStateCopyWithImpl<$Res>\n    implements $TrackerInfosStateCopyWith<$Res> {\n  _$TrackerInfosStateCopyWithImpl(this._self, this._then);\n\n  final TrackerInfosState _self;\n  final $Res Function(TrackerInfosState) _then;\n\n/// Create a copy of TrackerInfosState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? trackerInfos = null,Object? keywords = null,Object? query = null,Object? autoScrollToEnd = null,}) {\n  return _then(_self.copyWith(\ntrackerInfos: null == trackerInfos ? _self.trackerInfos : trackerInfos // ignore: cast_nullable_to_non_nullable\nas List<TrackerInfo>,keywords: null == keywords ? _self.keywords : keywords // ignore: cast_nullable_to_non_nullable\nas List<String>,query: null == query ? _self.query : query // ignore: cast_nullable_to_non_nullable\nas String,autoScrollToEnd: null == autoScrollToEnd ? _self.autoScrollToEnd : autoScrollToEnd // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [TrackerInfosState].\nextension TrackerInfosStatePatterns on TrackerInfosState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _TrackerInfosState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _TrackerInfosState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _TrackerInfosState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _TrackerInfosState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _TrackerInfosState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _TrackerInfosState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( List<TrackerInfo> trackerInfos,  List<String> keywords,  String query,  bool autoScrollToEnd)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _TrackerInfosState() when $default != null:\nreturn $default(_that.trackerInfos,_that.keywords,_that.query,_that.autoScrollToEnd);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( List<TrackerInfo> trackerInfos,  List<String> keywords,  String query,  bool autoScrollToEnd)  $default,) {final _that = this;\nswitch (_that) {\ncase _TrackerInfosState():\nreturn $default(_that.trackerInfos,_that.keywords,_that.query,_that.autoScrollToEnd);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( List<TrackerInfo> trackerInfos,  List<String> keywords,  String query,  bool autoScrollToEnd)?  $default,) {final _that = this;\nswitch (_that) {\ncase _TrackerInfosState() when $default != null:\nreturn $default(_that.trackerInfos,_that.keywords,_that.query,_that.autoScrollToEnd);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _TrackerInfosState implements TrackerInfosState {\n  const _TrackerInfosState({final  List<TrackerInfo> trackerInfos = const [], final  List<String> keywords = const [], this.query = '', this.autoScrollToEnd = true}): _trackerInfos = trackerInfos,_keywords = keywords;\n  \n\n final  List<TrackerInfo> _trackerInfos;\n@override@JsonKey() List<TrackerInfo> get trackerInfos {\n  if (_trackerInfos is EqualUnmodifiableListView) return _trackerInfos;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_trackerInfos);\n}\n\n final  List<String> _keywords;\n@override@JsonKey() List<String> get keywords {\n  if (_keywords is EqualUnmodifiableListView) return _keywords;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_keywords);\n}\n\n@override@JsonKey() final  String query;\n@override@JsonKey() final  bool autoScrollToEnd;\n\n/// Create a copy of TrackerInfosState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$TrackerInfosStateCopyWith<_TrackerInfosState> get copyWith => __$TrackerInfosStateCopyWithImpl<_TrackerInfosState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _TrackerInfosState&&const DeepCollectionEquality().equals(other._trackerInfos, _trackerInfos)&&const DeepCollectionEquality().equals(other._keywords, _keywords)&&(identical(other.query, query) || other.query == query)&&(identical(other.autoScrollToEnd, autoScrollToEnd) || other.autoScrollToEnd == autoScrollToEnd));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_trackerInfos),const DeepCollectionEquality().hash(_keywords),query,autoScrollToEnd);\n\n@override\nString toString() {\n  return 'TrackerInfosState(trackerInfos: $trackerInfos, keywords: $keywords, query: $query, autoScrollToEnd: $autoScrollToEnd)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$TrackerInfosStateCopyWith<$Res> implements $TrackerInfosStateCopyWith<$Res> {\n  factory _$TrackerInfosStateCopyWith(_TrackerInfosState value, $Res Function(_TrackerInfosState) _then) = __$TrackerInfosStateCopyWithImpl;\n@override @useResult\n$Res call({\n List<TrackerInfo> trackerInfos, List<String> keywords, String query, bool autoScrollToEnd\n});\n\n\n\n\n}\n/// @nodoc\nclass __$TrackerInfosStateCopyWithImpl<$Res>\n    implements _$TrackerInfosStateCopyWith<$Res> {\n  __$TrackerInfosStateCopyWithImpl(this._self, this._then);\n\n  final _TrackerInfosState _self;\n  final $Res Function(_TrackerInfosState) _then;\n\n/// Create a copy of TrackerInfosState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? trackerInfos = null,Object? keywords = null,Object? query = null,Object? autoScrollToEnd = null,}) {\n  return _then(_TrackerInfosState(\ntrackerInfos: null == trackerInfos ? _self._trackerInfos : trackerInfos // ignore: cast_nullable_to_non_nullable\nas List<TrackerInfo>,keywords: null == keywords ? _self._keywords : keywords // ignore: cast_nullable_to_non_nullable\nas List<String>,query: null == query ? _self.query : query // ignore: cast_nullable_to_non_nullable\nas String,autoScrollToEnd: null == autoScrollToEnd ? _self.autoScrollToEnd : autoScrollToEnd // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$DAVProps {\n\n String get uri; String get user; String get password; String get fileName;\n/// Create a copy of DAVProps\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$DAVPropsCopyWith<DAVProps> get copyWith => _$DAVPropsCopyWithImpl<DAVProps>(this as DAVProps, _$identity);\n\n  /// Serializes this DAVProps to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is DAVProps&&(identical(other.uri, uri) || other.uri == uri)&&(identical(other.user, user) || other.user == user)&&(identical(other.password, password) || other.password == password)&&(identical(other.fileName, fileName) || other.fileName == fileName));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,uri,user,password,fileName);\n\n@override\nString toString() {\n  return 'DAVProps(uri: $uri, user: $user, password: $password, fileName: $fileName)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $DAVPropsCopyWith<$Res>  {\n  factory $DAVPropsCopyWith(DAVProps value, $Res Function(DAVProps) _then) = _$DAVPropsCopyWithImpl;\n@useResult\n$Res call({\n String uri, String user, String password, String fileName\n});\n\n\n\n\n}\n/// @nodoc\nclass _$DAVPropsCopyWithImpl<$Res>\n    implements $DAVPropsCopyWith<$Res> {\n  _$DAVPropsCopyWithImpl(this._self, this._then);\n\n  final DAVProps _self;\n  final $Res Function(DAVProps) _then;\n\n/// Create a copy of DAVProps\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? uri = null,Object? user = null,Object? password = null,Object? fileName = null,}) {\n  return _then(_self.copyWith(\nuri: null == uri ? _self.uri : uri // ignore: cast_nullable_to_non_nullable\nas String,user: null == user ? _self.user : user // ignore: cast_nullable_to_non_nullable\nas String,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable\nas String,fileName: null == fileName ? _self.fileName : fileName // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [DAVProps].\nextension DAVPropsPatterns on DAVProps {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _DAVProps value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _DAVProps() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _DAVProps value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _DAVProps():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _DAVProps value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _DAVProps() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String uri,  String user,  String password,  String fileName)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _DAVProps() when $default != null:\nreturn $default(_that.uri,_that.user,_that.password,_that.fileName);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String uri,  String user,  String password,  String fileName)  $default,) {final _that = this;\nswitch (_that) {\ncase _DAVProps():\nreturn $default(_that.uri,_that.user,_that.password,_that.fileName);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String uri,  String user,  String password,  String fileName)?  $default,) {final _that = this;\nswitch (_that) {\ncase _DAVProps() when $default != null:\nreturn $default(_that.uri,_that.user,_that.password,_that.fileName);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _DAVProps implements DAVProps {\n  const _DAVProps({required this.uri, required this.user, required this.password, this.fileName = defaultDavFileName});\n  factory _DAVProps.fromJson(Map<String, dynamic> json) => _$DAVPropsFromJson(json);\n\n@override final  String uri;\n@override final  String user;\n@override final  String password;\n@override@JsonKey() final  String fileName;\n\n/// Create a copy of DAVProps\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$DAVPropsCopyWith<_DAVProps> get copyWith => __$DAVPropsCopyWithImpl<_DAVProps>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$DAVPropsToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _DAVProps&&(identical(other.uri, uri) || other.uri == uri)&&(identical(other.user, user) || other.user == user)&&(identical(other.password, password) || other.password == password)&&(identical(other.fileName, fileName) || other.fileName == fileName));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,uri,user,password,fileName);\n\n@override\nString toString() {\n  return 'DAVProps(uri: $uri, user: $user, password: $password, fileName: $fileName)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$DAVPropsCopyWith<$Res> implements $DAVPropsCopyWith<$Res> {\n  factory _$DAVPropsCopyWith(_DAVProps value, $Res Function(_DAVProps) _then) = __$DAVPropsCopyWithImpl;\n@override @useResult\n$Res call({\n String uri, String user, String password, String fileName\n});\n\n\n\n\n}\n/// @nodoc\nclass __$DAVPropsCopyWithImpl<$Res>\n    implements _$DAVPropsCopyWith<$Res> {\n  __$DAVPropsCopyWithImpl(this._self, this._then);\n\n  final _DAVProps _self;\n  final $Res Function(_DAVProps) _then;\n\n/// Create a copy of DAVProps\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? uri = null,Object? user = null,Object? password = null,Object? fileName = null,}) {\n  return _then(_DAVProps(\nuri: null == uri ? _self.uri : uri // ignore: cast_nullable_to_non_nullable\nas String,user: null == user ? _self.user : user // ignore: cast_nullable_to_non_nullable\nas String,password: null == password ? _self.password : password // ignore: cast_nullable_to_non_nullable\nas String,fileName: null == fileName ? _self.fileName : fileName // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$FileInfo {\n\n int get size; DateTime get lastModified;\n/// Create a copy of FileInfo\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$FileInfoCopyWith<FileInfo> get copyWith => _$FileInfoCopyWithImpl<FileInfo>(this as FileInfo, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is FileInfo&&(identical(other.size, size) || other.size == size)&&(identical(other.lastModified, lastModified) || other.lastModified == lastModified));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,size,lastModified);\n\n@override\nString toString() {\n  return 'FileInfo(size: $size, lastModified: $lastModified)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $FileInfoCopyWith<$Res>  {\n  factory $FileInfoCopyWith(FileInfo value, $Res Function(FileInfo) _then) = _$FileInfoCopyWithImpl;\n@useResult\n$Res call({\n int size, DateTime lastModified\n});\n\n\n\n\n}\n/// @nodoc\nclass _$FileInfoCopyWithImpl<$Res>\n    implements $FileInfoCopyWith<$Res> {\n  _$FileInfoCopyWithImpl(this._self, this._then);\n\n  final FileInfo _self;\n  final $Res Function(FileInfo) _then;\n\n/// Create a copy of FileInfo\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? size = null,Object? lastModified = null,}) {\n  return _then(_self.copyWith(\nsize: null == size ? _self.size : size // ignore: cast_nullable_to_non_nullable\nas int,lastModified: null == lastModified ? _self.lastModified : lastModified // ignore: cast_nullable_to_non_nullable\nas DateTime,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [FileInfo].\nextension FileInfoPatterns on FileInfo {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _FileInfo value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _FileInfo() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _FileInfo value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _FileInfo():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _FileInfo value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _FileInfo() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int size,  DateTime lastModified)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _FileInfo() when $default != null:\nreturn $default(_that.size,_that.lastModified);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int size,  DateTime lastModified)  $default,) {final _that = this;\nswitch (_that) {\ncase _FileInfo():\nreturn $default(_that.size,_that.lastModified);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int size,  DateTime lastModified)?  $default,) {final _that = this;\nswitch (_that) {\ncase _FileInfo() when $default != null:\nreturn $default(_that.size,_that.lastModified);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _FileInfo implements FileInfo {\n  const _FileInfo({required this.size, required this.lastModified});\n  \n\n@override final  int size;\n@override final  DateTime lastModified;\n\n/// Create a copy of FileInfo\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$FileInfoCopyWith<_FileInfo> get copyWith => __$FileInfoCopyWithImpl<_FileInfo>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _FileInfo&&(identical(other.size, size) || other.size == size)&&(identical(other.lastModified, lastModified) || other.lastModified == lastModified));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,size,lastModified);\n\n@override\nString toString() {\n  return 'FileInfo(size: $size, lastModified: $lastModified)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$FileInfoCopyWith<$Res> implements $FileInfoCopyWith<$Res> {\n  factory _$FileInfoCopyWith(_FileInfo value, $Res Function(_FileInfo) _then) = __$FileInfoCopyWithImpl;\n@override @useResult\n$Res call({\n int size, DateTime lastModified\n});\n\n\n\n\n}\n/// @nodoc\nclass __$FileInfoCopyWithImpl<$Res>\n    implements _$FileInfoCopyWith<$Res> {\n  __$FileInfoCopyWithImpl(this._self, this._then);\n\n  final _FileInfo _self;\n  final $Res Function(_FileInfo) _then;\n\n/// Create a copy of FileInfo\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? size = null,Object? lastModified = null,}) {\n  return _then(_FileInfo(\nsize: null == size ? _self.size : size // ignore: cast_nullable_to_non_nullable\nas int,lastModified: null == lastModified ? _self.lastModified : lastModified // ignore: cast_nullable_to_non_nullable\nas DateTime,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$VersionInfo {\n\n String get clashName; String get version;\n/// Create a copy of VersionInfo\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$VersionInfoCopyWith<VersionInfo> get copyWith => _$VersionInfoCopyWithImpl<VersionInfo>(this as VersionInfo, _$identity);\n\n  /// Serializes this VersionInfo to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is VersionInfo&&(identical(other.clashName, clashName) || other.clashName == clashName)&&(identical(other.version, version) || other.version == version));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,clashName,version);\n\n@override\nString toString() {\n  return 'VersionInfo(clashName: $clashName, version: $version)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $VersionInfoCopyWith<$Res>  {\n  factory $VersionInfoCopyWith(VersionInfo value, $Res Function(VersionInfo) _then) = _$VersionInfoCopyWithImpl;\n@useResult\n$Res call({\n String clashName, String version\n});\n\n\n\n\n}\n/// @nodoc\nclass _$VersionInfoCopyWithImpl<$Res>\n    implements $VersionInfoCopyWith<$Res> {\n  _$VersionInfoCopyWithImpl(this._self, this._then);\n\n  final VersionInfo _self;\n  final $Res Function(VersionInfo) _then;\n\n/// Create a copy of VersionInfo\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? clashName = null,Object? version = null,}) {\n  return _then(_self.copyWith(\nclashName: null == clashName ? _self.clashName : clashName // ignore: cast_nullable_to_non_nullable\nas String,version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [VersionInfo].\nextension VersionInfoPatterns on VersionInfo {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _VersionInfo value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _VersionInfo() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _VersionInfo value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _VersionInfo():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _VersionInfo value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _VersionInfo() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String clashName,  String version)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _VersionInfo() when $default != null:\nreturn $default(_that.clashName,_that.version);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String clashName,  String version)  $default,) {final _that = this;\nswitch (_that) {\ncase _VersionInfo():\nreturn $default(_that.clashName,_that.version);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String clashName,  String version)?  $default,) {final _that = this;\nswitch (_that) {\ncase _VersionInfo() when $default != null:\nreturn $default(_that.clashName,_that.version);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _VersionInfo implements VersionInfo {\n  const _VersionInfo({this.clashName = '', this.version = ''});\n  factory _VersionInfo.fromJson(Map<String, dynamic> json) => _$VersionInfoFromJson(json);\n\n@override@JsonKey() final  String clashName;\n@override@JsonKey() final  String version;\n\n/// Create a copy of VersionInfo\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$VersionInfoCopyWith<_VersionInfo> get copyWith => __$VersionInfoCopyWithImpl<_VersionInfo>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$VersionInfoToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _VersionInfo&&(identical(other.clashName, clashName) || other.clashName == clashName)&&(identical(other.version, version) || other.version == version));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,clashName,version);\n\n@override\nString toString() {\n  return 'VersionInfo(clashName: $clashName, version: $version)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$VersionInfoCopyWith<$Res> implements $VersionInfoCopyWith<$Res> {\n  factory _$VersionInfoCopyWith(_VersionInfo value, $Res Function(_VersionInfo) _then) = __$VersionInfoCopyWithImpl;\n@override @useResult\n$Res call({\n String clashName, String version\n});\n\n\n\n\n}\n/// @nodoc\nclass __$VersionInfoCopyWithImpl<$Res>\n    implements _$VersionInfoCopyWith<$Res> {\n  __$VersionInfoCopyWithImpl(this._self, this._then);\n\n  final _VersionInfo _self;\n  final $Res Function(_VersionInfo) _then;\n\n/// Create a copy of VersionInfo\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? clashName = null,Object? version = null,}) {\n  return _then(_VersionInfo(\nclashName: null == clashName ? _self.clashName : clashName // ignore: cast_nullable_to_non_nullable\nas String,version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$Traffic {\n\n num get up; num get down;\n/// Create a copy of Traffic\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$TrafficCopyWith<Traffic> get copyWith => _$TrafficCopyWithImpl<Traffic>(this as Traffic, _$identity);\n\n  /// Serializes this Traffic to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is Traffic&&(identical(other.up, up) || other.up == up)&&(identical(other.down, down) || other.down == down));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,up,down);\n\n@override\nString toString() {\n  return 'Traffic(up: $up, down: $down)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $TrafficCopyWith<$Res>  {\n  factory $TrafficCopyWith(Traffic value, $Res Function(Traffic) _then) = _$TrafficCopyWithImpl;\n@useResult\n$Res call({\n num up, num down\n});\n\n\n\n\n}\n/// @nodoc\nclass _$TrafficCopyWithImpl<$Res>\n    implements $TrafficCopyWith<$Res> {\n  _$TrafficCopyWithImpl(this._self, this._then);\n\n  final Traffic _self;\n  final $Res Function(Traffic) _then;\n\n/// Create a copy of Traffic\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? up = null,Object? down = null,}) {\n  return _then(_self.copyWith(\nup: null == up ? _self.up : up // ignore: cast_nullable_to_non_nullable\nas num,down: null == down ? _self.down : down // ignore: cast_nullable_to_non_nullable\nas num,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [Traffic].\nextension TrafficPatterns on Traffic {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Traffic value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _Traffic() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Traffic value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Traffic():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Traffic value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Traffic() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( num up,  num down)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _Traffic() when $default != null:\nreturn $default(_that.up,_that.down);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( num up,  num down)  $default,) {final _that = this;\nswitch (_that) {\ncase _Traffic():\nreturn $default(_that.up,_that.down);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( num up,  num down)?  $default,) {final _that = this;\nswitch (_that) {\ncase _Traffic() when $default != null:\nreturn $default(_that.up,_that.down);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _Traffic implements Traffic {\n  const _Traffic({this.up = 0, this.down = 0});\n  factory _Traffic.fromJson(Map<String, dynamic> json) => _$TrafficFromJson(json);\n\n@override@JsonKey() final  num up;\n@override@JsonKey() final  num down;\n\n/// Create a copy of Traffic\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$TrafficCopyWith<_Traffic> get copyWith => __$TrafficCopyWithImpl<_Traffic>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$TrafficToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Traffic&&(identical(other.up, up) || other.up == up)&&(identical(other.down, down) || other.down == down));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,up,down);\n\n@override\nString toString() {\n  return 'Traffic(up: $up, down: $down)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$TrafficCopyWith<$Res> implements $TrafficCopyWith<$Res> {\n  factory _$TrafficCopyWith(_Traffic value, $Res Function(_Traffic) _then) = __$TrafficCopyWithImpl;\n@override @useResult\n$Res call({\n num up, num down\n});\n\n\n\n\n}\n/// @nodoc\nclass __$TrafficCopyWithImpl<$Res>\n    implements _$TrafficCopyWith<$Res> {\n  __$TrafficCopyWithImpl(this._self, this._then);\n\n  final _Traffic _self;\n  final $Res Function(_Traffic) _then;\n\n/// Create a copy of Traffic\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? up = null,Object? down = null,}) {\n  return _then(_Traffic(\nup: null == up ? _self.up : up // ignore: cast_nullable_to_non_nullable\nas num,down: null == down ? _self.down : down // ignore: cast_nullable_to_non_nullable\nas num,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$TrafficShow {\n\n String get value; String get unit;\n/// Create a copy of TrafficShow\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$TrafficShowCopyWith<TrafficShow> get copyWith => _$TrafficShowCopyWithImpl<TrafficShow>(this as TrafficShow, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is TrafficShow&&(identical(other.value, value) || other.value == value)&&(identical(other.unit, unit) || other.unit == unit));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,value,unit);\n\n@override\nString toString() {\n  return 'TrafficShow(value: $value, unit: $unit)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $TrafficShowCopyWith<$Res>  {\n  factory $TrafficShowCopyWith(TrafficShow value, $Res Function(TrafficShow) _then) = _$TrafficShowCopyWithImpl;\n@useResult\n$Res call({\n String value, String unit\n});\n\n\n\n\n}\n/// @nodoc\nclass _$TrafficShowCopyWithImpl<$Res>\n    implements $TrafficShowCopyWith<$Res> {\n  _$TrafficShowCopyWithImpl(this._self, this._then);\n\n  final TrafficShow _self;\n  final $Res Function(TrafficShow) _then;\n\n/// Create a copy of TrafficShow\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? value = null,Object? unit = null,}) {\n  return _then(_self.copyWith(\nvalue: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable\nas String,unit: null == unit ? _self.unit : unit // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [TrafficShow].\nextension TrafficShowPatterns on TrafficShow {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _TrafficShow value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _TrafficShow() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _TrafficShow value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _TrafficShow():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _TrafficShow value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _TrafficShow() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String value,  String unit)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _TrafficShow() when $default != null:\nreturn $default(_that.value,_that.unit);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String value,  String unit)  $default,) {final _that = this;\nswitch (_that) {\ncase _TrafficShow():\nreturn $default(_that.value,_that.unit);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String value,  String unit)?  $default,) {final _that = this;\nswitch (_that) {\ncase _TrafficShow() when $default != null:\nreturn $default(_that.value,_that.unit);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _TrafficShow implements TrafficShow {\n  const _TrafficShow({required this.value, required this.unit});\n  \n\n@override final  String value;\n@override final  String unit;\n\n/// Create a copy of TrafficShow\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$TrafficShowCopyWith<_TrafficShow> get copyWith => __$TrafficShowCopyWithImpl<_TrafficShow>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _TrafficShow&&(identical(other.value, value) || other.value == value)&&(identical(other.unit, unit) || other.unit == unit));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,value,unit);\n\n@override\nString toString() {\n  return 'TrafficShow(value: $value, unit: $unit)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$TrafficShowCopyWith<$Res> implements $TrafficShowCopyWith<$Res> {\n  factory _$TrafficShowCopyWith(_TrafficShow value, $Res Function(_TrafficShow) _then) = __$TrafficShowCopyWithImpl;\n@override @useResult\n$Res call({\n String value, String unit\n});\n\n\n\n\n}\n/// @nodoc\nclass __$TrafficShowCopyWithImpl<$Res>\n    implements _$TrafficShowCopyWith<$Res> {\n  __$TrafficShowCopyWithImpl(this._self, this._then);\n\n  final _TrafficShow _self;\n  final $Res Function(_TrafficShow) _then;\n\n/// Create a copy of TrafficShow\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? value = null,Object? unit = null,}) {\n  return _then(_TrafficShow(\nvalue: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable\nas String,unit: null == unit ? _self.unit : unit // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$Proxy {\n\n String get name; String get type; String? get now;\n/// Create a copy of Proxy\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ProxyCopyWith<Proxy> get copyWith => _$ProxyCopyWithImpl<Proxy>(this as Proxy, _$identity);\n\n  /// Serializes this Proxy to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is Proxy&&(identical(other.name, name) || other.name == name)&&(identical(other.type, type) || other.type == type)&&(identical(other.now, now) || other.now == now));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,name,type,now);\n\n@override\nString toString() {\n  return 'Proxy(name: $name, type: $type, now: $now)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ProxyCopyWith<$Res>  {\n  factory $ProxyCopyWith(Proxy value, $Res Function(Proxy) _then) = _$ProxyCopyWithImpl;\n@useResult\n$Res call({\n String name, String type, String? now\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ProxyCopyWithImpl<$Res>\n    implements $ProxyCopyWith<$Res> {\n  _$ProxyCopyWithImpl(this._self, this._then);\n\n  final Proxy _self;\n  final $Res Function(Proxy) _then;\n\n/// Create a copy of Proxy\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? type = null,Object? now = freezed,}) {\n  return _then(_self.copyWith(\nname: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable\nas String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable\nas String,now: freezed == now ? _self.now : now // ignore: cast_nullable_to_non_nullable\nas String?,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [Proxy].\nextension ProxyPatterns on Proxy {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Proxy value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _Proxy() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Proxy value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Proxy():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Proxy value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Proxy() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String name,  String type,  String? now)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _Proxy() when $default != null:\nreturn $default(_that.name,_that.type,_that.now);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String name,  String type,  String? now)  $default,) {final _that = this;\nswitch (_that) {\ncase _Proxy():\nreturn $default(_that.name,_that.type,_that.now);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String name,  String type,  String? now)?  $default,) {final _that = this;\nswitch (_that) {\ncase _Proxy() when $default != null:\nreturn $default(_that.name,_that.type,_that.now);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _Proxy implements Proxy {\n  const _Proxy({required this.name, required this.type, this.now});\n  factory _Proxy.fromJson(Map<String, dynamic> json) => _$ProxyFromJson(json);\n\n@override final  String name;\n@override final  String type;\n@override final  String? now;\n\n/// Create a copy of Proxy\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ProxyCopyWith<_Proxy> get copyWith => __$ProxyCopyWithImpl<_Proxy>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$ProxyToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Proxy&&(identical(other.name, name) || other.name == name)&&(identical(other.type, type) || other.type == type)&&(identical(other.now, now) || other.now == now));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,name,type,now);\n\n@override\nString toString() {\n  return 'Proxy(name: $name, type: $type, now: $now)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ProxyCopyWith<$Res> implements $ProxyCopyWith<$Res> {\n  factory _$ProxyCopyWith(_Proxy value, $Res Function(_Proxy) _then) = __$ProxyCopyWithImpl;\n@override @useResult\n$Res call({\n String name, String type, String? now\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ProxyCopyWithImpl<$Res>\n    implements _$ProxyCopyWith<$Res> {\n  __$ProxyCopyWithImpl(this._self, this._then);\n\n  final _Proxy _self;\n  final $Res Function(_Proxy) _then;\n\n/// Create a copy of Proxy\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? type = null,Object? now = freezed,}) {\n  return _then(_Proxy(\nname: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable\nas String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable\nas String,now: freezed == now ? _self.now : now // ignore: cast_nullable_to_non_nullable\nas String?,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$Group {\n\n GroupType get type; List<Proxy> get all; String? get now; bool? get hidden; String? get testUrl; String get icon; String get name;\n/// Create a copy of Group\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$GroupCopyWith<Group> get copyWith => _$GroupCopyWithImpl<Group>(this as Group, _$identity);\n\n  /// Serializes this Group to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is Group&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other.all, all)&&(identical(other.now, now) || other.now == now)&&(identical(other.hidden, hidden) || other.hidden == hidden)&&(identical(other.testUrl, testUrl) || other.testUrl == testUrl)&&(identical(other.icon, icon) || other.icon == icon)&&(identical(other.name, name) || other.name == name));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,type,const DeepCollectionEquality().hash(all),now,hidden,testUrl,icon,name);\n\n@override\nString toString() {\n  return 'Group(type: $type, all: $all, now: $now, hidden: $hidden, testUrl: $testUrl, icon: $icon, name: $name)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $GroupCopyWith<$Res>  {\n  factory $GroupCopyWith(Group value, $Res Function(Group) _then) = _$GroupCopyWithImpl;\n@useResult\n$Res call({\n GroupType type, List<Proxy> all, String? now, bool? hidden, String? testUrl, String icon, String name\n});\n\n\n\n\n}\n/// @nodoc\nclass _$GroupCopyWithImpl<$Res>\n    implements $GroupCopyWith<$Res> {\n  _$GroupCopyWithImpl(this._self, this._then);\n\n  final Group _self;\n  final $Res Function(Group) _then;\n\n/// Create a copy of Group\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? type = null,Object? all = null,Object? now = freezed,Object? hidden = freezed,Object? testUrl = freezed,Object? icon = null,Object? name = null,}) {\n  return _then(_self.copyWith(\ntype: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable\nas GroupType,all: null == all ? _self.all : all // ignore: cast_nullable_to_non_nullable\nas List<Proxy>,now: freezed == now ? _self.now : now // ignore: cast_nullable_to_non_nullable\nas String?,hidden: freezed == hidden ? _self.hidden : hidden // ignore: cast_nullable_to_non_nullable\nas bool?,testUrl: freezed == testUrl ? _self.testUrl : testUrl // ignore: cast_nullable_to_non_nullable\nas String?,icon: null == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable\nas String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [Group].\nextension GroupPatterns on Group {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Group value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _Group() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Group value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Group():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Group value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Group() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( GroupType type,  List<Proxy> all,  String? now,  bool? hidden,  String? testUrl,  String icon,  String name)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _Group() when $default != null:\nreturn $default(_that.type,_that.all,_that.now,_that.hidden,_that.testUrl,_that.icon,_that.name);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( GroupType type,  List<Proxy> all,  String? now,  bool? hidden,  String? testUrl,  String icon,  String name)  $default,) {final _that = this;\nswitch (_that) {\ncase _Group():\nreturn $default(_that.type,_that.all,_that.now,_that.hidden,_that.testUrl,_that.icon,_that.name);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( GroupType type,  List<Proxy> all,  String? now,  bool? hidden,  String? testUrl,  String icon,  String name)?  $default,) {final _that = this;\nswitch (_that) {\ncase _Group() when $default != null:\nreturn $default(_that.type,_that.all,_that.now,_that.hidden,_that.testUrl,_that.icon,_that.name);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _Group implements Group {\n  const _Group({required this.type, final  List<Proxy> all = const [], this.now, this.hidden, this.testUrl, this.icon = '', required this.name}): _all = all;\n  factory _Group.fromJson(Map<String, dynamic> json) => _$GroupFromJson(json);\n\n@override final  GroupType type;\n final  List<Proxy> _all;\n@override@JsonKey() List<Proxy> get all {\n  if (_all is EqualUnmodifiableListView) return _all;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_all);\n}\n\n@override final  String? now;\n@override final  bool? hidden;\n@override final  String? testUrl;\n@override@JsonKey() final  String icon;\n@override final  String name;\n\n/// Create a copy of Group\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$GroupCopyWith<_Group> get copyWith => __$GroupCopyWithImpl<_Group>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$GroupToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Group&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other._all, _all)&&(identical(other.now, now) || other.now == now)&&(identical(other.hidden, hidden) || other.hidden == hidden)&&(identical(other.testUrl, testUrl) || other.testUrl == testUrl)&&(identical(other.icon, icon) || other.icon == icon)&&(identical(other.name, name) || other.name == name));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,type,const DeepCollectionEquality().hash(_all),now,hidden,testUrl,icon,name);\n\n@override\nString toString() {\n  return 'Group(type: $type, all: $all, now: $now, hidden: $hidden, testUrl: $testUrl, icon: $icon, name: $name)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$GroupCopyWith<$Res> implements $GroupCopyWith<$Res> {\n  factory _$GroupCopyWith(_Group value, $Res Function(_Group) _then) = __$GroupCopyWithImpl;\n@override @useResult\n$Res call({\n GroupType type, List<Proxy> all, String? now, bool? hidden, String? testUrl, String icon, String name\n});\n\n\n\n\n}\n/// @nodoc\nclass __$GroupCopyWithImpl<$Res>\n    implements _$GroupCopyWith<$Res> {\n  __$GroupCopyWithImpl(this._self, this._then);\n\n  final _Group _self;\n  final $Res Function(_Group) _then;\n\n/// Create a copy of Group\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? type = null,Object? all = null,Object? now = freezed,Object? hidden = freezed,Object? testUrl = freezed,Object? icon = null,Object? name = null,}) {\n  return _then(_Group(\ntype: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable\nas GroupType,all: null == all ? _self._all : all // ignore: cast_nullable_to_non_nullable\nas List<Proxy>,now: freezed == now ? _self.now : now // ignore: cast_nullable_to_non_nullable\nas String?,hidden: freezed == hidden ? _self.hidden : hidden // ignore: cast_nullable_to_non_nullable\nas bool?,testUrl: freezed == testUrl ? _self.testUrl : testUrl // ignore: cast_nullable_to_non_nullable\nas String?,icon: null == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable\nas String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$ColorSchemes {\n\n ColorScheme? get lightColorScheme; ColorScheme? get darkColorScheme;\n/// Create a copy of ColorSchemes\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ColorSchemesCopyWith<ColorSchemes> get copyWith => _$ColorSchemesCopyWithImpl<ColorSchemes>(this as ColorSchemes, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ColorSchemes&&(identical(other.lightColorScheme, lightColorScheme) || other.lightColorScheme == lightColorScheme)&&(identical(other.darkColorScheme, darkColorScheme) || other.darkColorScheme == darkColorScheme));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,lightColorScheme,darkColorScheme);\n\n@override\nString toString() {\n  return 'ColorSchemes(lightColorScheme: $lightColorScheme, darkColorScheme: $darkColorScheme)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ColorSchemesCopyWith<$Res>  {\n  factory $ColorSchemesCopyWith(ColorSchemes value, $Res Function(ColorSchemes) _then) = _$ColorSchemesCopyWithImpl;\n@useResult\n$Res call({\n ColorScheme? lightColorScheme, ColorScheme? darkColorScheme\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ColorSchemesCopyWithImpl<$Res>\n    implements $ColorSchemesCopyWith<$Res> {\n  _$ColorSchemesCopyWithImpl(this._self, this._then);\n\n  final ColorSchemes _self;\n  final $Res Function(ColorSchemes) _then;\n\n/// Create a copy of ColorSchemes\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? lightColorScheme = freezed,Object? darkColorScheme = freezed,}) {\n  return _then(_self.copyWith(\nlightColorScheme: freezed == lightColorScheme ? _self.lightColorScheme : lightColorScheme // ignore: cast_nullable_to_non_nullable\nas ColorScheme?,darkColorScheme: freezed == darkColorScheme ? _self.darkColorScheme : darkColorScheme // ignore: cast_nullable_to_non_nullable\nas ColorScheme?,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [ColorSchemes].\nextension ColorSchemesPatterns on ColorSchemes {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ColorSchemes value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ColorSchemes() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ColorSchemes value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ColorSchemes():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ColorSchemes value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ColorSchemes() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( ColorScheme? lightColorScheme,  ColorScheme? darkColorScheme)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ColorSchemes() when $default != null:\nreturn $default(_that.lightColorScheme,_that.darkColorScheme);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( ColorScheme? lightColorScheme,  ColorScheme? darkColorScheme)  $default,) {final _that = this;\nswitch (_that) {\ncase _ColorSchemes():\nreturn $default(_that.lightColorScheme,_that.darkColorScheme);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( ColorScheme? lightColorScheme,  ColorScheme? darkColorScheme)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ColorSchemes() when $default != null:\nreturn $default(_that.lightColorScheme,_that.darkColorScheme);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _ColorSchemes implements ColorSchemes {\n  const _ColorSchemes({this.lightColorScheme, this.darkColorScheme});\n  \n\n@override final  ColorScheme? lightColorScheme;\n@override final  ColorScheme? darkColorScheme;\n\n/// Create a copy of ColorSchemes\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ColorSchemesCopyWith<_ColorSchemes> get copyWith => __$ColorSchemesCopyWithImpl<_ColorSchemes>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ColorSchemes&&(identical(other.lightColorScheme, lightColorScheme) || other.lightColorScheme == lightColorScheme)&&(identical(other.darkColorScheme, darkColorScheme) || other.darkColorScheme == darkColorScheme));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,lightColorScheme,darkColorScheme);\n\n@override\nString toString() {\n  return 'ColorSchemes(lightColorScheme: $lightColorScheme, darkColorScheme: $darkColorScheme)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ColorSchemesCopyWith<$Res> implements $ColorSchemesCopyWith<$Res> {\n  factory _$ColorSchemesCopyWith(_ColorSchemes value, $Res Function(_ColorSchemes) _then) = __$ColorSchemesCopyWithImpl;\n@override @useResult\n$Res call({\n ColorScheme? lightColorScheme, ColorScheme? darkColorScheme\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ColorSchemesCopyWithImpl<$Res>\n    implements _$ColorSchemesCopyWith<$Res> {\n  __$ColorSchemesCopyWithImpl(this._self, this._then);\n\n  final _ColorSchemes _self;\n  final $Res Function(_ColorSchemes) _then;\n\n/// Create a copy of ColorSchemes\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? lightColorScheme = freezed,Object? darkColorScheme = freezed,}) {\n  return _then(_ColorSchemes(\nlightColorScheme: freezed == lightColorScheme ? _self.lightColorScheme : lightColorScheme // ignore: cast_nullable_to_non_nullable\nas ColorScheme?,darkColorScheme: freezed == darkColorScheme ? _self.darkColorScheme : darkColorScheme // ignore: cast_nullable_to_non_nullable\nas ColorScheme?,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$IpInfo {\n\n String get ip; String get countryCode;\n/// Create a copy of IpInfo\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$IpInfoCopyWith<IpInfo> get copyWith => _$IpInfoCopyWithImpl<IpInfo>(this as IpInfo, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is IpInfo&&(identical(other.ip, ip) || other.ip == ip)&&(identical(other.countryCode, countryCode) || other.countryCode == countryCode));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,ip,countryCode);\n\n@override\nString toString() {\n  return 'IpInfo(ip: $ip, countryCode: $countryCode)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $IpInfoCopyWith<$Res>  {\n  factory $IpInfoCopyWith(IpInfo value, $Res Function(IpInfo) _then) = _$IpInfoCopyWithImpl;\n@useResult\n$Res call({\n String ip, String countryCode\n});\n\n\n\n\n}\n/// @nodoc\nclass _$IpInfoCopyWithImpl<$Res>\n    implements $IpInfoCopyWith<$Res> {\n  _$IpInfoCopyWithImpl(this._self, this._then);\n\n  final IpInfo _self;\n  final $Res Function(IpInfo) _then;\n\n/// Create a copy of IpInfo\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? ip = null,Object? countryCode = null,}) {\n  return _then(_self.copyWith(\nip: null == ip ? _self.ip : ip // ignore: cast_nullable_to_non_nullable\nas String,countryCode: null == countryCode ? _self.countryCode : countryCode // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [IpInfo].\nextension IpInfoPatterns on IpInfo {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _IpInfo value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _IpInfo() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _IpInfo value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _IpInfo():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _IpInfo value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _IpInfo() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String ip,  String countryCode)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _IpInfo() when $default != null:\nreturn $default(_that.ip,_that.countryCode);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String ip,  String countryCode)  $default,) {final _that = this;\nswitch (_that) {\ncase _IpInfo():\nreturn $default(_that.ip,_that.countryCode);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String ip,  String countryCode)?  $default,) {final _that = this;\nswitch (_that) {\ncase _IpInfo() when $default != null:\nreturn $default(_that.ip,_that.countryCode);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _IpInfo implements IpInfo {\n  const _IpInfo({required this.ip, required this.countryCode});\n  \n\n@override final  String ip;\n@override final  String countryCode;\n\n/// Create a copy of IpInfo\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$IpInfoCopyWith<_IpInfo> get copyWith => __$IpInfoCopyWithImpl<_IpInfo>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _IpInfo&&(identical(other.ip, ip) || other.ip == ip)&&(identical(other.countryCode, countryCode) || other.countryCode == countryCode));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,ip,countryCode);\n\n@override\nString toString() {\n  return 'IpInfo(ip: $ip, countryCode: $countryCode)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$IpInfoCopyWith<$Res> implements $IpInfoCopyWith<$Res> {\n  factory _$IpInfoCopyWith(_IpInfo value, $Res Function(_IpInfo) _then) = __$IpInfoCopyWithImpl;\n@override @useResult\n$Res call({\n String ip, String countryCode\n});\n\n\n\n\n}\n/// @nodoc\nclass __$IpInfoCopyWithImpl<$Res>\n    implements _$IpInfoCopyWith<$Res> {\n  __$IpInfoCopyWithImpl(this._self, this._then);\n\n  final _IpInfo _self;\n  final $Res Function(_IpInfo) _then;\n\n/// Create a copy of IpInfo\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? ip = null,Object? countryCode = null,}) {\n  return _then(_IpInfo(\nip: null == ip ? _self.ip : ip // ignore: cast_nullable_to_non_nullable\nas String,countryCode: null == countryCode ? _self.countryCode : countryCode // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$HotKeyAction {\n\n HotAction get action; int? get key; Set<KeyboardModifier> get modifiers;\n/// Create a copy of HotKeyAction\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$HotKeyActionCopyWith<HotKeyAction> get copyWith => _$HotKeyActionCopyWithImpl<HotKeyAction>(this as HotKeyAction, _$identity);\n\n  /// Serializes this HotKeyAction to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is HotKeyAction&&(identical(other.action, action) || other.action == action)&&(identical(other.key, key) || other.key == key)&&const DeepCollectionEquality().equals(other.modifiers, modifiers));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,action,key,const DeepCollectionEquality().hash(modifiers));\n\n@override\nString toString() {\n  return 'HotKeyAction(action: $action, key: $key, modifiers: $modifiers)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $HotKeyActionCopyWith<$Res>  {\n  factory $HotKeyActionCopyWith(HotKeyAction value, $Res Function(HotKeyAction) _then) = _$HotKeyActionCopyWithImpl;\n@useResult\n$Res call({\n HotAction action, int? key, Set<KeyboardModifier> modifiers\n});\n\n\n\n\n}\n/// @nodoc\nclass _$HotKeyActionCopyWithImpl<$Res>\n    implements $HotKeyActionCopyWith<$Res> {\n  _$HotKeyActionCopyWithImpl(this._self, this._then);\n\n  final HotKeyAction _self;\n  final $Res Function(HotKeyAction) _then;\n\n/// Create a copy of HotKeyAction\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? action = null,Object? key = freezed,Object? modifiers = null,}) {\n  return _then(_self.copyWith(\naction: null == action ? _self.action : action // ignore: cast_nullable_to_non_nullable\nas HotAction,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable\nas int?,modifiers: null == modifiers ? _self.modifiers : modifiers // ignore: cast_nullable_to_non_nullable\nas Set<KeyboardModifier>,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [HotKeyAction].\nextension HotKeyActionPatterns on HotKeyAction {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _HotKeyAction value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _HotKeyAction() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _HotKeyAction value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _HotKeyAction():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _HotKeyAction value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _HotKeyAction() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( HotAction action,  int? key,  Set<KeyboardModifier> modifiers)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _HotKeyAction() when $default != null:\nreturn $default(_that.action,_that.key,_that.modifiers);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( HotAction action,  int? key,  Set<KeyboardModifier> modifiers)  $default,) {final _that = this;\nswitch (_that) {\ncase _HotKeyAction():\nreturn $default(_that.action,_that.key,_that.modifiers);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( HotAction action,  int? key,  Set<KeyboardModifier> modifiers)?  $default,) {final _that = this;\nswitch (_that) {\ncase _HotKeyAction() when $default != null:\nreturn $default(_that.action,_that.key,_that.modifiers);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _HotKeyAction implements HotKeyAction {\n  const _HotKeyAction({required this.action, this.key, final  Set<KeyboardModifier> modifiers = const {}}): _modifiers = modifiers;\n  factory _HotKeyAction.fromJson(Map<String, dynamic> json) => _$HotKeyActionFromJson(json);\n\n@override final  HotAction action;\n@override final  int? key;\n final  Set<KeyboardModifier> _modifiers;\n@override@JsonKey() Set<KeyboardModifier> get modifiers {\n  if (_modifiers is EqualUnmodifiableSetView) return _modifiers;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableSetView(_modifiers);\n}\n\n\n/// Create a copy of HotKeyAction\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$HotKeyActionCopyWith<_HotKeyAction> get copyWith => __$HotKeyActionCopyWithImpl<_HotKeyAction>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$HotKeyActionToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _HotKeyAction&&(identical(other.action, action) || other.action == action)&&(identical(other.key, key) || other.key == key)&&const DeepCollectionEquality().equals(other._modifiers, _modifiers));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,action,key,const DeepCollectionEquality().hash(_modifiers));\n\n@override\nString toString() {\n  return 'HotKeyAction(action: $action, key: $key, modifiers: $modifiers)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$HotKeyActionCopyWith<$Res> implements $HotKeyActionCopyWith<$Res> {\n  factory _$HotKeyActionCopyWith(_HotKeyAction value, $Res Function(_HotKeyAction) _then) = __$HotKeyActionCopyWithImpl;\n@override @useResult\n$Res call({\n HotAction action, int? key, Set<KeyboardModifier> modifiers\n});\n\n\n\n\n}\n/// @nodoc\nclass __$HotKeyActionCopyWithImpl<$Res>\n    implements _$HotKeyActionCopyWith<$Res> {\n  __$HotKeyActionCopyWithImpl(this._self, this._then);\n\n  final _HotKeyAction _self;\n  final $Res Function(_HotKeyAction) _then;\n\n/// Create a copy of HotKeyAction\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? action = null,Object? key = freezed,Object? modifiers = null,}) {\n  return _then(_HotKeyAction(\naction: null == action ? _self.action : action // ignore: cast_nullable_to_non_nullable\nas HotAction,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable\nas int?,modifiers: null == modifiers ? _self._modifiers : modifiers // ignore: cast_nullable_to_non_nullable\nas Set<KeyboardModifier>,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$Field {\n\n String get label; String get value; Validator? get validator;\n/// Create a copy of Field\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$FieldCopyWith<Field> get copyWith => _$FieldCopyWithImpl<Field>(this as Field, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is Field&&(identical(other.label, label) || other.label == label)&&(identical(other.value, value) || other.value == value)&&(identical(other.validator, validator) || other.validator == validator));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,label,value,validator);\n\n@override\nString toString() {\n  return 'Field(label: $label, value: $value, validator: $validator)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $FieldCopyWith<$Res>  {\n  factory $FieldCopyWith(Field value, $Res Function(Field) _then) = _$FieldCopyWithImpl;\n@useResult\n$Res call({\n String label, String value, Validator? validator\n});\n\n\n\n\n}\n/// @nodoc\nclass _$FieldCopyWithImpl<$Res>\n    implements $FieldCopyWith<$Res> {\n  _$FieldCopyWithImpl(this._self, this._then);\n\n  final Field _self;\n  final $Res Function(Field) _then;\n\n/// Create a copy of Field\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? label = null,Object? value = null,Object? validator = freezed,}) {\n  return _then(_self.copyWith(\nlabel: null == label ? _self.label : label // ignore: cast_nullable_to_non_nullable\nas String,value: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable\nas String,validator: freezed == validator ? _self.validator : validator // ignore: cast_nullable_to_non_nullable\nas Validator?,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [Field].\nextension FieldPatterns on Field {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Field value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _Field() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Field value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Field():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Field value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Field() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String label,  String value,  Validator? validator)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _Field() when $default != null:\nreturn $default(_that.label,_that.value,_that.validator);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String label,  String value,  Validator? validator)  $default,) {final _that = this;\nswitch (_that) {\ncase _Field():\nreturn $default(_that.label,_that.value,_that.validator);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String label,  String value,  Validator? validator)?  $default,) {final _that = this;\nswitch (_that) {\ncase _Field() when $default != null:\nreturn $default(_that.label,_that.value,_that.validator);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _Field implements Field {\n  const _Field({required this.label, required this.value, this.validator});\n  \n\n@override final  String label;\n@override final  String value;\n@override final  Validator? validator;\n\n/// Create a copy of Field\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$FieldCopyWith<_Field> get copyWith => __$FieldCopyWithImpl<_Field>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Field&&(identical(other.label, label) || other.label == label)&&(identical(other.value, value) || other.value == value)&&(identical(other.validator, validator) || other.validator == validator));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,label,value,validator);\n\n@override\nString toString() {\n  return 'Field(label: $label, value: $value, validator: $validator)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$FieldCopyWith<$Res> implements $FieldCopyWith<$Res> {\n  factory _$FieldCopyWith(_Field value, $Res Function(_Field) _then) = __$FieldCopyWithImpl;\n@override @useResult\n$Res call({\n String label, String value, Validator? validator\n});\n\n\n\n\n}\n/// @nodoc\nclass __$FieldCopyWithImpl<$Res>\n    implements _$FieldCopyWith<$Res> {\n  __$FieldCopyWithImpl(this._self, this._then);\n\n  final _Field _self;\n  final $Res Function(_Field) _then;\n\n/// Create a copy of Field\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? label = null,Object? value = null,Object? validator = freezed,}) {\n  return _then(_Field(\nlabel: null == label ? _self.label : label // ignore: cast_nullable_to_non_nullable\nas String,value: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable\nas String,validator: freezed == validator ? _self.validator : validator // ignore: cast_nullable_to_non_nullable\nas Validator?,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$Result<T> {\n\n T? get data; ResultType get type; String get message;\n/// Create a copy of Result\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ResultCopyWith<T, Result<T>> get copyWith => _$ResultCopyWithImpl<T, Result<T>>(this as Result<T>, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is Result<T>&&const DeepCollectionEquality().equals(other.data, data)&&(identical(other.type, type) || other.type == type)&&(identical(other.message, message) || other.message == message));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(data),type,message);\n\n@override\nString toString() {\n  return 'Result<$T>(data: $data, type: $type, message: $message)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ResultCopyWith<T,$Res>  {\n  factory $ResultCopyWith(Result<T> value, $Res Function(Result<T>) _then) = _$ResultCopyWithImpl;\n@useResult\n$Res call({\n T? data, ResultType type, String message\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ResultCopyWithImpl<T,$Res>\n    implements $ResultCopyWith<T, $Res> {\n  _$ResultCopyWithImpl(this._self, this._then);\n\n  final Result<T> _self;\n  final $Res Function(Result<T>) _then;\n\n/// Create a copy of Result\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? data = freezed,Object? type = null,Object? message = null,}) {\n  return _then(_self.copyWith(\ndata: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable\nas T?,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable\nas ResultType,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [Result].\nextension ResultPatterns<T> on Result<T> {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Result<T> value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _Result() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Result<T> value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Result():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Result<T> value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Result() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( T? data,  ResultType type,  String message)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _Result() when $default != null:\nreturn $default(_that.data,_that.type,_that.message);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( T? data,  ResultType type,  String message)  $default,) {final _that = this;\nswitch (_that) {\ncase _Result():\nreturn $default(_that.data,_that.type,_that.message);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( T? data,  ResultType type,  String message)?  $default,) {final _that = this;\nswitch (_that) {\ncase _Result() when $default != null:\nreturn $default(_that.data,_that.type,_that.message);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _Result<T> implements Result<T> {\n  const _Result({required this.data, required this.type, required this.message});\n  \n\n@override final  T? data;\n@override final  ResultType type;\n@override final  String message;\n\n/// Create a copy of Result\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ResultCopyWith<T, _Result<T>> get copyWith => __$ResultCopyWithImpl<T, _Result<T>>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Result<T>&&const DeepCollectionEquality().equals(other.data, data)&&(identical(other.type, type) || other.type == type)&&(identical(other.message, message) || other.message == message));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(data),type,message);\n\n@override\nString toString() {\n  return 'Result<$T>(data: $data, type: $type, message: $message)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ResultCopyWith<T,$Res> implements $ResultCopyWith<T, $Res> {\n  factory _$ResultCopyWith(_Result<T> value, $Res Function(_Result<T>) _then) = __$ResultCopyWithImpl;\n@override @useResult\n$Res call({\n T? data, ResultType type, String message\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ResultCopyWithImpl<T,$Res>\n    implements _$ResultCopyWith<T, $Res> {\n  __$ResultCopyWithImpl(this._self, this._then);\n\n  final _Result<T> _self;\n  final $Res Function(_Result<T>) _then;\n\n/// Create a copy of Result\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? data = freezed,Object? type = null,Object? message = null,}) {\n  return _then(_Result<T>(\ndata: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable\nas T?,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable\nas ResultType,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$Script {\n\n int get id; String get label; DateTime get lastUpdateTime;\n/// Create a copy of Script\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ScriptCopyWith<Script> get copyWith => _$ScriptCopyWithImpl<Script>(this as Script, _$identity);\n\n  /// Serializes this Script to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is Script&&(identical(other.id, id) || other.id == id)&&(identical(other.label, label) || other.label == label)&&(identical(other.lastUpdateTime, lastUpdateTime) || other.lastUpdateTime == lastUpdateTime));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,id,label,lastUpdateTime);\n\n@override\nString toString() {\n  return 'Script(id: $id, label: $label, lastUpdateTime: $lastUpdateTime)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ScriptCopyWith<$Res>  {\n  factory $ScriptCopyWith(Script value, $Res Function(Script) _then) = _$ScriptCopyWithImpl;\n@useResult\n$Res call({\n int id, String label, DateTime lastUpdateTime\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ScriptCopyWithImpl<$Res>\n    implements $ScriptCopyWith<$Res> {\n  _$ScriptCopyWithImpl(this._self, this._then);\n\n  final Script _self;\n  final $Res Function(Script) _then;\n\n/// Create a copy of Script\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? label = null,Object? lastUpdateTime = null,}) {\n  return _then(_self.copyWith(\nid: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable\nas int,label: null == label ? _self.label : label // ignore: cast_nullable_to_non_nullable\nas String,lastUpdateTime: null == lastUpdateTime ? _self.lastUpdateTime : lastUpdateTime // ignore: cast_nullable_to_non_nullable\nas DateTime,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [Script].\nextension ScriptPatterns on Script {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Script value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _Script() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Script value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Script():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Script value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Script() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int id,  String label,  DateTime lastUpdateTime)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _Script() when $default != null:\nreturn $default(_that.id,_that.label,_that.lastUpdateTime);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int id,  String label,  DateTime lastUpdateTime)  $default,) {final _that = this;\nswitch (_that) {\ncase _Script():\nreturn $default(_that.id,_that.label,_that.lastUpdateTime);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int id,  String label,  DateTime lastUpdateTime)?  $default,) {final _that = this;\nswitch (_that) {\ncase _Script() when $default != null:\nreturn $default(_that.id,_that.label,_that.lastUpdateTime);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _Script implements Script {\n  const _Script({required this.id, required this.label, required this.lastUpdateTime});\n  factory _Script.fromJson(Map<String, dynamic> json) => _$ScriptFromJson(json);\n\n@override final  int id;\n@override final  String label;\n@override final  DateTime lastUpdateTime;\n\n/// Create a copy of Script\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ScriptCopyWith<_Script> get copyWith => __$ScriptCopyWithImpl<_Script>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$ScriptToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Script&&(identical(other.id, id) || other.id == id)&&(identical(other.label, label) || other.label == label)&&(identical(other.lastUpdateTime, lastUpdateTime) || other.lastUpdateTime == lastUpdateTime));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,id,label,lastUpdateTime);\n\n@override\nString toString() {\n  return 'Script(id: $id, label: $label, lastUpdateTime: $lastUpdateTime)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ScriptCopyWith<$Res> implements $ScriptCopyWith<$Res> {\n  factory _$ScriptCopyWith(_Script value, $Res Function(_Script) _then) = __$ScriptCopyWithImpl;\n@override @useResult\n$Res call({\n int id, String label, DateTime lastUpdateTime\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ScriptCopyWithImpl<$Res>\n    implements _$ScriptCopyWith<$Res> {\n  __$ScriptCopyWithImpl(this._self, this._then);\n\n  final _Script _self;\n  final $Res Function(_Script) _then;\n\n/// Create a copy of Script\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? label = null,Object? lastUpdateTime = null,}) {\n  return _then(_Script(\nid: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable\nas int,label: null == label ? _self.label : label // ignore: cast_nullable_to_non_nullable\nas String,lastUpdateTime: null == lastUpdateTime ? _self.lastUpdateTime : lastUpdateTime // ignore: cast_nullable_to_non_nullable\nas DateTime,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$DelayState {\n\n int get delay; bool get group;\n/// Create a copy of DelayState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$DelayStateCopyWith<DelayState> get copyWith => _$DelayStateCopyWithImpl<DelayState>(this as DelayState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is DelayState&&(identical(other.delay, delay) || other.delay == delay)&&(identical(other.group, group) || other.group == group));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,delay,group);\n\n@override\nString toString() {\n  return 'DelayState(delay: $delay, group: $group)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $DelayStateCopyWith<$Res>  {\n  factory $DelayStateCopyWith(DelayState value, $Res Function(DelayState) _then) = _$DelayStateCopyWithImpl;\n@useResult\n$Res call({\n int delay, bool group\n});\n\n\n\n\n}\n/// @nodoc\nclass _$DelayStateCopyWithImpl<$Res>\n    implements $DelayStateCopyWith<$Res> {\n  _$DelayStateCopyWithImpl(this._self, this._then);\n\n  final DelayState _self;\n  final $Res Function(DelayState) _then;\n\n/// Create a copy of DelayState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? delay = null,Object? group = null,}) {\n  return _then(_self.copyWith(\ndelay: null == delay ? _self.delay : delay // ignore: cast_nullable_to_non_nullable\nas int,group: null == group ? _self.group : group // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [DelayState].\nextension DelayStatePatterns on DelayState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _DelayState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _DelayState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _DelayState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _DelayState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _DelayState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _DelayState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int delay,  bool group)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _DelayState() when $default != null:\nreturn $default(_that.delay,_that.group);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int delay,  bool group)  $default,) {final _that = this;\nswitch (_that) {\ncase _DelayState():\nreturn $default(_that.delay,_that.group);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int delay,  bool group)?  $default,) {final _that = this;\nswitch (_that) {\ncase _DelayState() when $default != null:\nreturn $default(_that.delay,_that.group);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _DelayState implements DelayState {\n  const _DelayState({required this.delay, required this.group});\n  \n\n@override final  int delay;\n@override final  bool group;\n\n/// Create a copy of DelayState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$DelayStateCopyWith<_DelayState> get copyWith => __$DelayStateCopyWithImpl<_DelayState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _DelayState&&(identical(other.delay, delay) || other.delay == delay)&&(identical(other.group, group) || other.group == group));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,delay,group);\n\n@override\nString toString() {\n  return 'DelayState(delay: $delay, group: $group)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$DelayStateCopyWith<$Res> implements $DelayStateCopyWith<$Res> {\n  factory _$DelayStateCopyWith(_DelayState value, $Res Function(_DelayState) _then) = __$DelayStateCopyWithImpl;\n@override @useResult\n$Res call({\n int delay, bool group\n});\n\n\n\n\n}\n/// @nodoc\nclass __$DelayStateCopyWithImpl<$Res>\n    implements _$DelayStateCopyWith<$Res> {\n  __$DelayStateCopyWithImpl(this._self, this._then);\n\n  final _DelayState _self;\n  final $Res Function(_DelayState) _then;\n\n/// Create a copy of DelayState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? delay = null,Object? group = null,}) {\n  return _then(_DelayState(\ndelay: null == delay ? _self.delay : delay // ignore: cast_nullable_to_non_nullable\nas int,group: null == group ? _self.group : group // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$UpdatingMessage {\n\n String get label; String get message;\n/// Create a copy of UpdatingMessage\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$UpdatingMessageCopyWith<UpdatingMessage> get copyWith => _$UpdatingMessageCopyWithImpl<UpdatingMessage>(this as UpdatingMessage, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is UpdatingMessage&&(identical(other.label, label) || other.label == label)&&(identical(other.message, message) || other.message == message));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,label,message);\n\n@override\nString toString() {\n  return 'UpdatingMessage(label: $label, message: $message)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $UpdatingMessageCopyWith<$Res>  {\n  factory $UpdatingMessageCopyWith(UpdatingMessage value, $Res Function(UpdatingMessage) _then) = _$UpdatingMessageCopyWithImpl;\n@useResult\n$Res call({\n String label, String message\n});\n\n\n\n\n}\n/// @nodoc\nclass _$UpdatingMessageCopyWithImpl<$Res>\n    implements $UpdatingMessageCopyWith<$Res> {\n  _$UpdatingMessageCopyWithImpl(this._self, this._then);\n\n  final UpdatingMessage _self;\n  final $Res Function(UpdatingMessage) _then;\n\n/// Create a copy of UpdatingMessage\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? label = null,Object? message = null,}) {\n  return _then(_self.copyWith(\nlabel: null == label ? _self.label : label // ignore: cast_nullable_to_non_nullable\nas String,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [UpdatingMessage].\nextension UpdatingMessagePatterns on UpdatingMessage {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _UpdatingMessage value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _UpdatingMessage() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _UpdatingMessage value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _UpdatingMessage():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _UpdatingMessage value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _UpdatingMessage() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String label,  String message)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _UpdatingMessage() when $default != null:\nreturn $default(_that.label,_that.message);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String label,  String message)  $default,) {final _that = this;\nswitch (_that) {\ncase _UpdatingMessage():\nreturn $default(_that.label,_that.message);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String label,  String message)?  $default,) {final _that = this;\nswitch (_that) {\ncase _UpdatingMessage() when $default != null:\nreturn $default(_that.label,_that.message);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _UpdatingMessage implements UpdatingMessage {\n  const _UpdatingMessage({required this.label, required this.message});\n  \n\n@override final  String label;\n@override final  String message;\n\n/// Create a copy of UpdatingMessage\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$UpdatingMessageCopyWith<_UpdatingMessage> get copyWith => __$UpdatingMessageCopyWithImpl<_UpdatingMessage>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _UpdatingMessage&&(identical(other.label, label) || other.label == label)&&(identical(other.message, message) || other.message == message));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,label,message);\n\n@override\nString toString() {\n  return 'UpdatingMessage(label: $label, message: $message)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$UpdatingMessageCopyWith<$Res> implements $UpdatingMessageCopyWith<$Res> {\n  factory _$UpdatingMessageCopyWith(_UpdatingMessage value, $Res Function(_UpdatingMessage) _then) = __$UpdatingMessageCopyWithImpl;\n@override @useResult\n$Res call({\n String label, String message\n});\n\n\n\n\n}\n/// @nodoc\nclass __$UpdatingMessageCopyWithImpl<$Res>\n    implements _$UpdatingMessageCopyWith<$Res> {\n  __$UpdatingMessageCopyWithImpl(this._self, this._then);\n\n  final _UpdatingMessage _self;\n  final $Res Function(_UpdatingMessage) _then;\n\n/// Create a copy of UpdatingMessage\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? label = null,Object? message = null,}) {\n  return _then(_UpdatingMessage(\nlabel: null == label ? _self.label : label // ignore: cast_nullable_to_non_nullable\nas String,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n\n}\n\n// dart format on\n"
  },
  {
    "path": "lib/models/generated/common.g.dart",
    "content": "// GENERATED CODE - DO NOT MODIFY BY HAND\n\npart of '../common.dart';\n\n// **************************************************************************\n// JsonSerializableGenerator\n// **************************************************************************\n\n_Package _$PackageFromJson(Map<String, dynamic> json) => _Package(\n  packageName: json['packageName'] as String,\n  label: json['label'] as String,\n  system: json['system'] as bool,\n  internet: json['internet'] as bool,\n  lastUpdateTime: (json['lastUpdateTime'] as num).toInt(),\n);\n\nMap<String, dynamic> _$PackageToJson(_Package instance) => <String, dynamic>{\n  'packageName': instance.packageName,\n  'label': instance.label,\n  'system': instance.system,\n  'internet': instance.internet,\n  'lastUpdateTime': instance.lastUpdateTime,\n};\n\n_Metadata _$MetadataFromJson(Map<String, dynamic> json) => _Metadata(\n  uid: (json['uid'] as num?)?.toInt() ?? 0,\n  network: json['network'] as String? ?? '',\n  sourceIP: json['sourceIP'] as String? ?? '',\n  sourcePort: json['sourcePort'] as String? ?? '',\n  destinationIP: json['destinationIP'] as String? ?? '',\n  destinationPort: json['destinationPort'] as String? ?? '',\n  host: json['host'] as String? ?? '',\n  dnsMode: $enumDecodeNullable(_$DnsModeEnumMap, json['dnsMode']),\n  process: json['process'] as String? ?? '',\n  processPath: json['processPath'] as String? ?? '',\n  remoteDestination: json['remoteDestination'] as String? ?? '',\n  sourceGeoIP:\n      (json['sourceGeoIP'] as List<dynamic>?)\n          ?.map((e) => e as String)\n          .toList() ??\n      const [],\n  destinationGeoIP:\n      (json['destinationGeoIP'] as List<dynamic>?)\n          ?.map((e) => e as String)\n          .toList() ??\n      const [],\n  destinationIPASN: json['destinationIPASN'] as String? ?? '',\n  sourceIPASN: json['sourceIPASN'] as String? ?? '',\n  specialRules: json['specialRules'] as String? ?? '',\n  specialProxy: json['specialProxy'] as String? ?? '',\n);\n\nMap<String, dynamic> _$MetadataToJson(_Metadata instance) => <String, dynamic>{\n  'uid': instance.uid,\n  'network': instance.network,\n  'sourceIP': instance.sourceIP,\n  'sourcePort': instance.sourcePort,\n  'destinationIP': instance.destinationIP,\n  'destinationPort': instance.destinationPort,\n  'host': instance.host,\n  'dnsMode': _$DnsModeEnumMap[instance.dnsMode],\n  'process': instance.process,\n  'processPath': instance.processPath,\n  'remoteDestination': instance.remoteDestination,\n  'sourceGeoIP': instance.sourceGeoIP,\n  'destinationGeoIP': instance.destinationGeoIP,\n  'destinationIPASN': instance.destinationIPASN,\n  'sourceIPASN': instance.sourceIPASN,\n  'specialRules': instance.specialRules,\n  'specialProxy': instance.specialProxy,\n};\n\nconst _$DnsModeEnumMap = {\n  DnsMode.normal: 'normal',\n  DnsMode.fakeIp: 'fake-ip',\n  DnsMode.redirHost: 'redir-host',\n  DnsMode.hosts: 'hosts',\n};\n\n_TrackerInfo _$TrackerInfoFromJson(Map<String, dynamic> json) => _TrackerInfo(\n  id: json['id'] as String,\n  upload: (json['upload'] as num?)?.toInt() ?? 0,\n  download: (json['download'] as num?)?.toInt() ?? 0,\n  start: DateTime.parse(json['start'] as String),\n  metadata: Metadata.fromJson(json['metadata'] as Map<String, dynamic>),\n  chains: (json['chains'] as List<dynamic>).map((e) => e as String).toList(),\n  rule: json['rule'] as String,\n  rulePayload: json['rulePayload'] as String,\n  downloadSpeed: (json['downloadSpeed'] as num?)?.toInt(),\n  uploadSpeed: (json['uploadSpeed'] as num?)?.toInt(),\n);\n\nMap<String, dynamic> _$TrackerInfoToJson(_TrackerInfo instance) =>\n    <String, dynamic>{\n      'id': instance.id,\n      'upload': instance.upload,\n      'download': instance.download,\n      'start': instance.start.toIso8601String(),\n      'metadata': instance.metadata,\n      'chains': instance.chains,\n      'rule': instance.rule,\n      'rulePayload': instance.rulePayload,\n      'downloadSpeed': instance.downloadSpeed,\n      'uploadSpeed': instance.uploadSpeed,\n    };\n\n_Log _$LogFromJson(Map<String, dynamic> json) => _Log(\n  logLevel:\n      $enumDecodeNullable(_$LogLevelEnumMap, json['LogLevel']) ?? LogLevel.info,\n  payload: json['Payload'] as String? ?? '',\n  dateTime: _logDateTime(json['dateTime']),\n);\n\nMap<String, dynamic> _$LogToJson(_Log instance) => <String, dynamic>{\n  'LogLevel': _$LogLevelEnumMap[instance.logLevel]!,\n  'Payload': instance.payload,\n  'dateTime': instance.dateTime,\n};\n\nconst _$LogLevelEnumMap = {\n  LogLevel.debug: 'debug',\n  LogLevel.info: 'info',\n  LogLevel.warning: 'warning',\n  LogLevel.error: 'error',\n  LogLevel.silent: 'silent',\n};\n\n_DAVProps _$DAVPropsFromJson(Map<String, dynamic> json) => _DAVProps(\n  uri: json['uri'] as String,\n  user: json['user'] as String,\n  password: json['password'] as String,\n  fileName: json['fileName'] as String? ?? defaultDavFileName,\n);\n\nMap<String, dynamic> _$DAVPropsToJson(_DAVProps instance) => <String, dynamic>{\n  'uri': instance.uri,\n  'user': instance.user,\n  'password': instance.password,\n  'fileName': instance.fileName,\n};\n\n_VersionInfo _$VersionInfoFromJson(Map<String, dynamic> json) => _VersionInfo(\n  clashName: json['clashName'] as String? ?? '',\n  version: json['version'] as String? ?? '',\n);\n\nMap<String, dynamic> _$VersionInfoToJson(_VersionInfo instance) =>\n    <String, dynamic>{\n      'clashName': instance.clashName,\n      'version': instance.version,\n    };\n\n_Traffic _$TrafficFromJson(Map<String, dynamic> json) =>\n    _Traffic(up: json['up'] as num? ?? 0, down: json['down'] as num? ?? 0);\n\nMap<String, dynamic> _$TrafficToJson(_Traffic instance) => <String, dynamic>{\n  'up': instance.up,\n  'down': instance.down,\n};\n\n_Proxy _$ProxyFromJson(Map<String, dynamic> json) => _Proxy(\n  name: json['name'] as String,\n  type: json['type'] as String,\n  now: json['now'] as String?,\n);\n\nMap<String, dynamic> _$ProxyToJson(_Proxy instance) => <String, dynamic>{\n  'name': instance.name,\n  'type': instance.type,\n  'now': instance.now,\n};\n\n_Group _$GroupFromJson(Map<String, dynamic> json) => _Group(\n  type: $enumDecode(_$GroupTypeEnumMap, json['type']),\n  all:\n      (json['all'] as List<dynamic>?)\n          ?.map((e) => Proxy.fromJson(e as Map<String, dynamic>))\n          .toList() ??\n      const [],\n  now: json['now'] as String?,\n  hidden: json['hidden'] as bool?,\n  testUrl: json['testUrl'] as String?,\n  icon: json['icon'] as String? ?? '',\n  name: json['name'] as String,\n);\n\nMap<String, dynamic> _$GroupToJson(_Group instance) => <String, dynamic>{\n  'type': _$GroupTypeEnumMap[instance.type]!,\n  'all': instance.all,\n  'now': instance.now,\n  'hidden': instance.hidden,\n  'testUrl': instance.testUrl,\n  'icon': instance.icon,\n  'name': instance.name,\n};\n\nconst _$GroupTypeEnumMap = {\n  GroupType.Selector: 'Selector',\n  GroupType.URLTest: 'URLTest',\n  GroupType.Fallback: 'Fallback',\n  GroupType.LoadBalance: 'LoadBalance',\n  GroupType.Relay: 'Relay',\n};\n\n_HotKeyAction _$HotKeyActionFromJson(Map<String, dynamic> json) =>\n    _HotKeyAction(\n      action: $enumDecode(_$HotActionEnumMap, json['action']),\n      key: (json['key'] as num?)?.toInt(),\n      modifiers:\n          (json['modifiers'] as List<dynamic>?)\n              ?.map((e) => $enumDecode(_$KeyboardModifierEnumMap, e))\n              .toSet() ??\n          const {},\n    );\n\nMap<String, dynamic> _$HotKeyActionToJson(_HotKeyAction instance) =>\n    <String, dynamic>{\n      'action': _$HotActionEnumMap[instance.action]!,\n      'key': instance.key,\n      'modifiers': instance.modifiers\n          .map((e) => _$KeyboardModifierEnumMap[e]!)\n          .toList(),\n    };\n\nconst _$HotActionEnumMap = {\n  HotAction.start: 'start',\n  HotAction.view: 'view',\n  HotAction.mode: 'mode',\n  HotAction.proxy: 'proxy',\n  HotAction.tun: 'tun',\n};\n\nconst _$KeyboardModifierEnumMap = {\n  KeyboardModifier.alt: 'alt',\n  KeyboardModifier.capsLock: 'capsLock',\n  KeyboardModifier.control: 'control',\n  KeyboardModifier.fn: 'fn',\n  KeyboardModifier.meta: 'meta',\n  KeyboardModifier.shift: 'shift',\n};\n\n_Script _$ScriptFromJson(Map<String, dynamic> json) => _Script(\n  id: (json['id'] as num).toInt(),\n  label: json['label'] as String,\n  lastUpdateTime: DateTime.parse(json['lastUpdateTime'] as String),\n);\n\nMap<String, dynamic> _$ScriptToJson(_Script instance) => <String, dynamic>{\n  'id': instance.id,\n  'label': instance.label,\n  'lastUpdateTime': instance.lastUpdateTime.toIso8601String(),\n};\n"
  },
  {
    "path": "lib/models/generated/config.freezed.dart",
    "content": "// GENERATED CODE - DO NOT MODIFY BY HAND\n// coverage:ignore-file\n// ignore_for_file: type=lint\n// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark\n\npart of '../config.dart';\n\n// **************************************************************************\n// FreezedGenerator\n// **************************************************************************\n\n// dart format off\nT _$identity<T>(T value) => value;\n\n/// @nodoc\nmixin _$AppSettingProps {\n\n String? get locale;@JsonKey(fromJson: dashboardWidgetsSafeFormJson) List<DashboardWidget> get dashboardWidgets; bool get onlyStatisticsProxy; bool get autoLaunch; bool get silentLaunch; bool get autoRun; bool get openLogs; bool get closeConnections; String get testUrl; bool get isAnimateToPage; bool get autoCheckUpdate; bool get showLabel; bool get disclaimerAccepted; bool get crashlyticsTip; bool get crashlytics; bool get minimizeOnExit; bool get hidden; bool get developerMode; RestoreStrategy get restoreStrategy; bool get showTrayTitle;\n/// Create a copy of AppSettingProps\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$AppSettingPropsCopyWith<AppSettingProps> get copyWith => _$AppSettingPropsCopyWithImpl<AppSettingProps>(this as AppSettingProps, _$identity);\n\n  /// Serializes this AppSettingProps to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is AppSettingProps&&(identical(other.locale, locale) || other.locale == locale)&&const DeepCollectionEquality().equals(other.dashboardWidgets, dashboardWidgets)&&(identical(other.onlyStatisticsProxy, onlyStatisticsProxy) || other.onlyStatisticsProxy == onlyStatisticsProxy)&&(identical(other.autoLaunch, autoLaunch) || other.autoLaunch == autoLaunch)&&(identical(other.silentLaunch, silentLaunch) || other.silentLaunch == silentLaunch)&&(identical(other.autoRun, autoRun) || other.autoRun == autoRun)&&(identical(other.openLogs, openLogs) || other.openLogs == openLogs)&&(identical(other.closeConnections, closeConnections) || other.closeConnections == closeConnections)&&(identical(other.testUrl, testUrl) || other.testUrl == testUrl)&&(identical(other.isAnimateToPage, isAnimateToPage) || other.isAnimateToPage == isAnimateToPage)&&(identical(other.autoCheckUpdate, autoCheckUpdate) || other.autoCheckUpdate == autoCheckUpdate)&&(identical(other.showLabel, showLabel) || other.showLabel == showLabel)&&(identical(other.disclaimerAccepted, disclaimerAccepted) || other.disclaimerAccepted == disclaimerAccepted)&&(identical(other.crashlyticsTip, crashlyticsTip) || other.crashlyticsTip == crashlyticsTip)&&(identical(other.crashlytics, crashlytics) || other.crashlytics == crashlytics)&&(identical(other.minimizeOnExit, minimizeOnExit) || other.minimizeOnExit == minimizeOnExit)&&(identical(other.hidden, hidden) || other.hidden == hidden)&&(identical(other.developerMode, developerMode) || other.developerMode == developerMode)&&(identical(other.restoreStrategy, restoreStrategy) || other.restoreStrategy == restoreStrategy)&&(identical(other.showTrayTitle, showTrayTitle) || other.showTrayTitle == showTrayTitle));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hashAll([runtimeType,locale,const DeepCollectionEquality().hash(dashboardWidgets),onlyStatisticsProxy,autoLaunch,silentLaunch,autoRun,openLogs,closeConnections,testUrl,isAnimateToPage,autoCheckUpdate,showLabel,disclaimerAccepted,crashlyticsTip,crashlytics,minimizeOnExit,hidden,developerMode,restoreStrategy,showTrayTitle]);\n\n@override\nString toString() {\n  return 'AppSettingProps(locale: $locale, dashboardWidgets: $dashboardWidgets, onlyStatisticsProxy: $onlyStatisticsProxy, autoLaunch: $autoLaunch, silentLaunch: $silentLaunch, autoRun: $autoRun, openLogs: $openLogs, closeConnections: $closeConnections, testUrl: $testUrl, isAnimateToPage: $isAnimateToPage, autoCheckUpdate: $autoCheckUpdate, showLabel: $showLabel, disclaimerAccepted: $disclaimerAccepted, crashlyticsTip: $crashlyticsTip, crashlytics: $crashlytics, minimizeOnExit: $minimizeOnExit, hidden: $hidden, developerMode: $developerMode, restoreStrategy: $restoreStrategy, showTrayTitle: $showTrayTitle)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $AppSettingPropsCopyWith<$Res>  {\n  factory $AppSettingPropsCopyWith(AppSettingProps value, $Res Function(AppSettingProps) _then) = _$AppSettingPropsCopyWithImpl;\n@useResult\n$Res call({\n String? locale,@JsonKey(fromJson: dashboardWidgetsSafeFormJson) List<DashboardWidget> dashboardWidgets, bool onlyStatisticsProxy, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl, bool isAnimateToPage, bool autoCheckUpdate, bool showLabel, bool disclaimerAccepted, bool crashlyticsTip, bool crashlytics, bool minimizeOnExit, bool hidden, bool developerMode, RestoreStrategy restoreStrategy, bool showTrayTitle\n});\n\n\n\n\n}\n/// @nodoc\nclass _$AppSettingPropsCopyWithImpl<$Res>\n    implements $AppSettingPropsCopyWith<$Res> {\n  _$AppSettingPropsCopyWithImpl(this._self, this._then);\n\n  final AppSettingProps _self;\n  final $Res Function(AppSettingProps) _then;\n\n/// Create a copy of AppSettingProps\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? locale = freezed,Object? dashboardWidgets = null,Object? onlyStatisticsProxy = null,Object? autoLaunch = null,Object? silentLaunch = null,Object? autoRun = null,Object? openLogs = null,Object? closeConnections = null,Object? testUrl = null,Object? isAnimateToPage = null,Object? autoCheckUpdate = null,Object? showLabel = null,Object? disclaimerAccepted = null,Object? crashlyticsTip = null,Object? crashlytics = null,Object? minimizeOnExit = null,Object? hidden = null,Object? developerMode = null,Object? restoreStrategy = null,Object? showTrayTitle = null,}) {\n  return _then(_self.copyWith(\nlocale: freezed == locale ? _self.locale : locale // ignore: cast_nullable_to_non_nullable\nas String?,dashboardWidgets: null == dashboardWidgets ? _self.dashboardWidgets : dashboardWidgets // ignore: cast_nullable_to_non_nullable\nas List<DashboardWidget>,onlyStatisticsProxy: null == onlyStatisticsProxy ? _self.onlyStatisticsProxy : onlyStatisticsProxy // ignore: cast_nullable_to_non_nullable\nas bool,autoLaunch: null == autoLaunch ? _self.autoLaunch : autoLaunch // ignore: cast_nullable_to_non_nullable\nas bool,silentLaunch: null == silentLaunch ? _self.silentLaunch : silentLaunch // ignore: cast_nullable_to_non_nullable\nas bool,autoRun: null == autoRun ? _self.autoRun : autoRun // ignore: cast_nullable_to_non_nullable\nas bool,openLogs: null == openLogs ? _self.openLogs : openLogs // ignore: cast_nullable_to_non_nullable\nas bool,closeConnections: null == closeConnections ? _self.closeConnections : closeConnections // ignore: cast_nullable_to_non_nullable\nas bool,testUrl: null == testUrl ? _self.testUrl : testUrl // ignore: cast_nullable_to_non_nullable\nas String,isAnimateToPage: null == isAnimateToPage ? _self.isAnimateToPage : isAnimateToPage // ignore: cast_nullable_to_non_nullable\nas bool,autoCheckUpdate: null == autoCheckUpdate ? _self.autoCheckUpdate : autoCheckUpdate // ignore: cast_nullable_to_non_nullable\nas bool,showLabel: null == showLabel ? _self.showLabel : showLabel // ignore: cast_nullable_to_non_nullable\nas bool,disclaimerAccepted: null == disclaimerAccepted ? _self.disclaimerAccepted : disclaimerAccepted // ignore: cast_nullable_to_non_nullable\nas bool,crashlyticsTip: null == crashlyticsTip ? _self.crashlyticsTip : crashlyticsTip // ignore: cast_nullable_to_non_nullable\nas bool,crashlytics: null == crashlytics ? _self.crashlytics : crashlytics // ignore: cast_nullable_to_non_nullable\nas bool,minimizeOnExit: null == minimizeOnExit ? _self.minimizeOnExit : minimizeOnExit // ignore: cast_nullable_to_non_nullable\nas bool,hidden: null == hidden ? _self.hidden : hidden // ignore: cast_nullable_to_non_nullable\nas bool,developerMode: null == developerMode ? _self.developerMode : developerMode // ignore: cast_nullable_to_non_nullable\nas bool,restoreStrategy: null == restoreStrategy ? _self.restoreStrategy : restoreStrategy // ignore: cast_nullable_to_non_nullable\nas RestoreStrategy,showTrayTitle: null == showTrayTitle ? _self.showTrayTitle : showTrayTitle // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [AppSettingProps].\nextension AppSettingPropsPatterns on AppSettingProps {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _AppSettingProps value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _AppSettingProps() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _AppSettingProps value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _AppSettingProps():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _AppSettingProps value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _AppSettingProps() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? locale, @JsonKey(fromJson: dashboardWidgetsSafeFormJson)  List<DashboardWidget> dashboardWidgets,  bool onlyStatisticsProxy,  bool autoLaunch,  bool silentLaunch,  bool autoRun,  bool openLogs,  bool closeConnections,  String testUrl,  bool isAnimateToPage,  bool autoCheckUpdate,  bool showLabel,  bool disclaimerAccepted,  bool crashlyticsTip,  bool crashlytics,  bool minimizeOnExit,  bool hidden,  bool developerMode,  RestoreStrategy restoreStrategy,  bool showTrayTitle)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _AppSettingProps() when $default != null:\nreturn $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_that.autoLaunch,_that.silentLaunch,_that.autoRun,_that.openLogs,_that.closeConnections,_that.testUrl,_that.isAnimateToPage,_that.autoCheckUpdate,_that.showLabel,_that.disclaimerAccepted,_that.crashlyticsTip,_that.crashlytics,_that.minimizeOnExit,_that.hidden,_that.developerMode,_that.restoreStrategy,_that.showTrayTitle);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? locale, @JsonKey(fromJson: dashboardWidgetsSafeFormJson)  List<DashboardWidget> dashboardWidgets,  bool onlyStatisticsProxy,  bool autoLaunch,  bool silentLaunch,  bool autoRun,  bool openLogs,  bool closeConnections,  String testUrl,  bool isAnimateToPage,  bool autoCheckUpdate,  bool showLabel,  bool disclaimerAccepted,  bool crashlyticsTip,  bool crashlytics,  bool minimizeOnExit,  bool hidden,  bool developerMode,  RestoreStrategy restoreStrategy,  bool showTrayTitle)  $default,) {final _that = this;\nswitch (_that) {\ncase _AppSettingProps():\nreturn $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_that.autoLaunch,_that.silentLaunch,_that.autoRun,_that.openLogs,_that.closeConnections,_that.testUrl,_that.isAnimateToPage,_that.autoCheckUpdate,_that.showLabel,_that.disclaimerAccepted,_that.crashlyticsTip,_that.crashlytics,_that.minimizeOnExit,_that.hidden,_that.developerMode,_that.restoreStrategy,_that.showTrayTitle);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? locale, @JsonKey(fromJson: dashboardWidgetsSafeFormJson)  List<DashboardWidget> dashboardWidgets,  bool onlyStatisticsProxy,  bool autoLaunch,  bool silentLaunch,  bool autoRun,  bool openLogs,  bool closeConnections,  String testUrl,  bool isAnimateToPage,  bool autoCheckUpdate,  bool showLabel,  bool disclaimerAccepted,  bool crashlyticsTip,  bool crashlytics,  bool minimizeOnExit,  bool hidden,  bool developerMode,  RestoreStrategy restoreStrategy,  bool showTrayTitle)?  $default,) {final _that = this;\nswitch (_that) {\ncase _AppSettingProps() when $default != null:\nreturn $default(_that.locale,_that.dashboardWidgets,_that.onlyStatisticsProxy,_that.autoLaunch,_that.silentLaunch,_that.autoRun,_that.openLogs,_that.closeConnections,_that.testUrl,_that.isAnimateToPage,_that.autoCheckUpdate,_that.showLabel,_that.disclaimerAccepted,_that.crashlyticsTip,_that.crashlytics,_that.minimizeOnExit,_that.hidden,_that.developerMode,_that.restoreStrategy,_that.showTrayTitle);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _AppSettingProps implements AppSettingProps {\n  const _AppSettingProps({this.locale, @JsonKey(fromJson: dashboardWidgetsSafeFormJson) final  List<DashboardWidget> dashboardWidgets = defaultDashboardWidgets, this.onlyStatisticsProxy = false, this.autoLaunch = false, this.silentLaunch = false, this.autoRun = false, this.openLogs = false, this.closeConnections = true, this.testUrl = defaultTestUrl, this.isAnimateToPage = true, this.autoCheckUpdate = true, this.showLabel = false, this.disclaimerAccepted = false, this.crashlyticsTip = false, this.crashlytics = false, this.minimizeOnExit = true, this.hidden = false, this.developerMode = false, this.restoreStrategy = RestoreStrategy.compatible, this.showTrayTitle = true}): _dashboardWidgets = dashboardWidgets;\n  factory _AppSettingProps.fromJson(Map<String, dynamic> json) => _$AppSettingPropsFromJson(json);\n\n@override final  String? locale;\n final  List<DashboardWidget> _dashboardWidgets;\n@override@JsonKey(fromJson: dashboardWidgetsSafeFormJson) List<DashboardWidget> get dashboardWidgets {\n  if (_dashboardWidgets is EqualUnmodifiableListView) return _dashboardWidgets;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_dashboardWidgets);\n}\n\n@override@JsonKey() final  bool onlyStatisticsProxy;\n@override@JsonKey() final  bool autoLaunch;\n@override@JsonKey() final  bool silentLaunch;\n@override@JsonKey() final  bool autoRun;\n@override@JsonKey() final  bool openLogs;\n@override@JsonKey() final  bool closeConnections;\n@override@JsonKey() final  String testUrl;\n@override@JsonKey() final  bool isAnimateToPage;\n@override@JsonKey() final  bool autoCheckUpdate;\n@override@JsonKey() final  bool showLabel;\n@override@JsonKey() final  bool disclaimerAccepted;\n@override@JsonKey() final  bool crashlyticsTip;\n@override@JsonKey() final  bool crashlytics;\n@override@JsonKey() final  bool minimizeOnExit;\n@override@JsonKey() final  bool hidden;\n@override@JsonKey() final  bool developerMode;\n@override@JsonKey() final  RestoreStrategy restoreStrategy;\n@override@JsonKey() final  bool showTrayTitle;\n\n/// Create a copy of AppSettingProps\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$AppSettingPropsCopyWith<_AppSettingProps> get copyWith => __$AppSettingPropsCopyWithImpl<_AppSettingProps>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$AppSettingPropsToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppSettingProps&&(identical(other.locale, locale) || other.locale == locale)&&const DeepCollectionEquality().equals(other._dashboardWidgets, _dashboardWidgets)&&(identical(other.onlyStatisticsProxy, onlyStatisticsProxy) || other.onlyStatisticsProxy == onlyStatisticsProxy)&&(identical(other.autoLaunch, autoLaunch) || other.autoLaunch == autoLaunch)&&(identical(other.silentLaunch, silentLaunch) || other.silentLaunch == silentLaunch)&&(identical(other.autoRun, autoRun) || other.autoRun == autoRun)&&(identical(other.openLogs, openLogs) || other.openLogs == openLogs)&&(identical(other.closeConnections, closeConnections) || other.closeConnections == closeConnections)&&(identical(other.testUrl, testUrl) || other.testUrl == testUrl)&&(identical(other.isAnimateToPage, isAnimateToPage) || other.isAnimateToPage == isAnimateToPage)&&(identical(other.autoCheckUpdate, autoCheckUpdate) || other.autoCheckUpdate == autoCheckUpdate)&&(identical(other.showLabel, showLabel) || other.showLabel == showLabel)&&(identical(other.disclaimerAccepted, disclaimerAccepted) || other.disclaimerAccepted == disclaimerAccepted)&&(identical(other.crashlyticsTip, crashlyticsTip) || other.crashlyticsTip == crashlyticsTip)&&(identical(other.crashlytics, crashlytics) || other.crashlytics == crashlytics)&&(identical(other.minimizeOnExit, minimizeOnExit) || other.minimizeOnExit == minimizeOnExit)&&(identical(other.hidden, hidden) || other.hidden == hidden)&&(identical(other.developerMode, developerMode) || other.developerMode == developerMode)&&(identical(other.restoreStrategy, restoreStrategy) || other.restoreStrategy == restoreStrategy)&&(identical(other.showTrayTitle, showTrayTitle) || other.showTrayTitle == showTrayTitle));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hashAll([runtimeType,locale,const DeepCollectionEquality().hash(_dashboardWidgets),onlyStatisticsProxy,autoLaunch,silentLaunch,autoRun,openLogs,closeConnections,testUrl,isAnimateToPage,autoCheckUpdate,showLabel,disclaimerAccepted,crashlyticsTip,crashlytics,minimizeOnExit,hidden,developerMode,restoreStrategy,showTrayTitle]);\n\n@override\nString toString() {\n  return 'AppSettingProps(locale: $locale, dashboardWidgets: $dashboardWidgets, onlyStatisticsProxy: $onlyStatisticsProxy, autoLaunch: $autoLaunch, silentLaunch: $silentLaunch, autoRun: $autoRun, openLogs: $openLogs, closeConnections: $closeConnections, testUrl: $testUrl, isAnimateToPage: $isAnimateToPage, autoCheckUpdate: $autoCheckUpdate, showLabel: $showLabel, disclaimerAccepted: $disclaimerAccepted, crashlyticsTip: $crashlyticsTip, crashlytics: $crashlytics, minimizeOnExit: $minimizeOnExit, hidden: $hidden, developerMode: $developerMode, restoreStrategy: $restoreStrategy, showTrayTitle: $showTrayTitle)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$AppSettingPropsCopyWith<$Res> implements $AppSettingPropsCopyWith<$Res> {\n  factory _$AppSettingPropsCopyWith(_AppSettingProps value, $Res Function(_AppSettingProps) _then) = __$AppSettingPropsCopyWithImpl;\n@override @useResult\n$Res call({\n String? locale,@JsonKey(fromJson: dashboardWidgetsSafeFormJson) List<DashboardWidget> dashboardWidgets, bool onlyStatisticsProxy, bool autoLaunch, bool silentLaunch, bool autoRun, bool openLogs, bool closeConnections, String testUrl, bool isAnimateToPage, bool autoCheckUpdate, bool showLabel, bool disclaimerAccepted, bool crashlyticsTip, bool crashlytics, bool minimizeOnExit, bool hidden, bool developerMode, RestoreStrategy restoreStrategy, bool showTrayTitle\n});\n\n\n\n\n}\n/// @nodoc\nclass __$AppSettingPropsCopyWithImpl<$Res>\n    implements _$AppSettingPropsCopyWith<$Res> {\n  __$AppSettingPropsCopyWithImpl(this._self, this._then);\n\n  final _AppSettingProps _self;\n  final $Res Function(_AppSettingProps) _then;\n\n/// Create a copy of AppSettingProps\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? locale = freezed,Object? dashboardWidgets = null,Object? onlyStatisticsProxy = null,Object? autoLaunch = null,Object? silentLaunch = null,Object? autoRun = null,Object? openLogs = null,Object? closeConnections = null,Object? testUrl = null,Object? isAnimateToPage = null,Object? autoCheckUpdate = null,Object? showLabel = null,Object? disclaimerAccepted = null,Object? crashlyticsTip = null,Object? crashlytics = null,Object? minimizeOnExit = null,Object? hidden = null,Object? developerMode = null,Object? restoreStrategy = null,Object? showTrayTitle = null,}) {\n  return _then(_AppSettingProps(\nlocale: freezed == locale ? _self.locale : locale // ignore: cast_nullable_to_non_nullable\nas String?,dashboardWidgets: null == dashboardWidgets ? _self._dashboardWidgets : dashboardWidgets // ignore: cast_nullable_to_non_nullable\nas List<DashboardWidget>,onlyStatisticsProxy: null == onlyStatisticsProxy ? _self.onlyStatisticsProxy : onlyStatisticsProxy // ignore: cast_nullable_to_non_nullable\nas bool,autoLaunch: null == autoLaunch ? _self.autoLaunch : autoLaunch // ignore: cast_nullable_to_non_nullable\nas bool,silentLaunch: null == silentLaunch ? _self.silentLaunch : silentLaunch // ignore: cast_nullable_to_non_nullable\nas bool,autoRun: null == autoRun ? _self.autoRun : autoRun // ignore: cast_nullable_to_non_nullable\nas bool,openLogs: null == openLogs ? _self.openLogs : openLogs // ignore: cast_nullable_to_non_nullable\nas bool,closeConnections: null == closeConnections ? _self.closeConnections : closeConnections // ignore: cast_nullable_to_non_nullable\nas bool,testUrl: null == testUrl ? _self.testUrl : testUrl // ignore: cast_nullable_to_non_nullable\nas String,isAnimateToPage: null == isAnimateToPage ? _self.isAnimateToPage : isAnimateToPage // ignore: cast_nullable_to_non_nullable\nas bool,autoCheckUpdate: null == autoCheckUpdate ? _self.autoCheckUpdate : autoCheckUpdate // ignore: cast_nullable_to_non_nullable\nas bool,showLabel: null == showLabel ? _self.showLabel : showLabel // ignore: cast_nullable_to_non_nullable\nas bool,disclaimerAccepted: null == disclaimerAccepted ? _self.disclaimerAccepted : disclaimerAccepted // ignore: cast_nullable_to_non_nullable\nas bool,crashlyticsTip: null == crashlyticsTip ? _self.crashlyticsTip : crashlyticsTip // ignore: cast_nullable_to_non_nullable\nas bool,crashlytics: null == crashlytics ? _self.crashlytics : crashlytics // ignore: cast_nullable_to_non_nullable\nas bool,minimizeOnExit: null == minimizeOnExit ? _self.minimizeOnExit : minimizeOnExit // ignore: cast_nullable_to_non_nullable\nas bool,hidden: null == hidden ? _self.hidden : hidden // ignore: cast_nullable_to_non_nullable\nas bool,developerMode: null == developerMode ? _self.developerMode : developerMode // ignore: cast_nullable_to_non_nullable\nas bool,restoreStrategy: null == restoreStrategy ? _self.restoreStrategy : restoreStrategy // ignore: cast_nullable_to_non_nullable\nas RestoreStrategy,showTrayTitle: null == showTrayTitle ? _self.showTrayTitle : showTrayTitle // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$AccessControlProps {\n\n bool get enable; AccessControlMode get mode; List<String> get acceptList; List<String> get rejectList; AccessSortType get sort; bool get isFilterSystemApp; bool get isFilterNonInternetApp;\n/// Create a copy of AccessControlProps\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$AccessControlPropsCopyWith<AccessControlProps> get copyWith => _$AccessControlPropsCopyWithImpl<AccessControlProps>(this as AccessControlProps, _$identity);\n\n  /// Serializes this AccessControlProps to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is AccessControlProps&&(identical(other.enable, enable) || other.enable == enable)&&(identical(other.mode, mode) || other.mode == mode)&&const DeepCollectionEquality().equals(other.acceptList, acceptList)&&const DeepCollectionEquality().equals(other.rejectList, rejectList)&&(identical(other.sort, sort) || other.sort == sort)&&(identical(other.isFilterSystemApp, isFilterSystemApp) || other.isFilterSystemApp == isFilterSystemApp)&&(identical(other.isFilterNonInternetApp, isFilterNonInternetApp) || other.isFilterNonInternetApp == isFilterNonInternetApp));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,enable,mode,const DeepCollectionEquality().hash(acceptList),const DeepCollectionEquality().hash(rejectList),sort,isFilterSystemApp,isFilterNonInternetApp);\n\n@override\nString toString() {\n  return 'AccessControlProps(enable: $enable, mode: $mode, acceptList: $acceptList, rejectList: $rejectList, sort: $sort, isFilterSystemApp: $isFilterSystemApp, isFilterNonInternetApp: $isFilterNonInternetApp)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $AccessControlPropsCopyWith<$Res>  {\n  factory $AccessControlPropsCopyWith(AccessControlProps value, $Res Function(AccessControlProps) _then) = _$AccessControlPropsCopyWithImpl;\n@useResult\n$Res call({\n bool enable, AccessControlMode mode, List<String> acceptList, List<String> rejectList, AccessSortType sort, bool isFilterSystemApp, bool isFilterNonInternetApp\n});\n\n\n\n\n}\n/// @nodoc\nclass _$AccessControlPropsCopyWithImpl<$Res>\n    implements $AccessControlPropsCopyWith<$Res> {\n  _$AccessControlPropsCopyWithImpl(this._self, this._then);\n\n  final AccessControlProps _self;\n  final $Res Function(AccessControlProps) _then;\n\n/// Create a copy of AccessControlProps\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? enable = null,Object? mode = null,Object? acceptList = null,Object? rejectList = null,Object? sort = null,Object? isFilterSystemApp = null,Object? isFilterNonInternetApp = null,}) {\n  return _then(_self.copyWith(\nenable: null == enable ? _self.enable : enable // ignore: cast_nullable_to_non_nullable\nas bool,mode: null == mode ? _self.mode : mode // ignore: cast_nullable_to_non_nullable\nas AccessControlMode,acceptList: null == acceptList ? _self.acceptList : acceptList // ignore: cast_nullable_to_non_nullable\nas List<String>,rejectList: null == rejectList ? _self.rejectList : rejectList // ignore: cast_nullable_to_non_nullable\nas List<String>,sort: null == sort ? _self.sort : sort // ignore: cast_nullable_to_non_nullable\nas AccessSortType,isFilterSystemApp: null == isFilterSystemApp ? _self.isFilterSystemApp : isFilterSystemApp // ignore: cast_nullable_to_non_nullable\nas bool,isFilterNonInternetApp: null == isFilterNonInternetApp ? _self.isFilterNonInternetApp : isFilterNonInternetApp // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [AccessControlProps].\nextension AccessControlPropsPatterns on AccessControlProps {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _AccessControlProps value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _AccessControlProps() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _AccessControlProps value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _AccessControlProps():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _AccessControlProps value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _AccessControlProps() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool enable,  AccessControlMode mode,  List<String> acceptList,  List<String> rejectList,  AccessSortType sort,  bool isFilterSystemApp,  bool isFilterNonInternetApp)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _AccessControlProps() when $default != null:\nreturn $default(_that.enable,_that.mode,_that.acceptList,_that.rejectList,_that.sort,_that.isFilterSystemApp,_that.isFilterNonInternetApp);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool enable,  AccessControlMode mode,  List<String> acceptList,  List<String> rejectList,  AccessSortType sort,  bool isFilterSystemApp,  bool isFilterNonInternetApp)  $default,) {final _that = this;\nswitch (_that) {\ncase _AccessControlProps():\nreturn $default(_that.enable,_that.mode,_that.acceptList,_that.rejectList,_that.sort,_that.isFilterSystemApp,_that.isFilterNonInternetApp);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool enable,  AccessControlMode mode,  List<String> acceptList,  List<String> rejectList,  AccessSortType sort,  bool isFilterSystemApp,  bool isFilterNonInternetApp)?  $default,) {final _that = this;\nswitch (_that) {\ncase _AccessControlProps() when $default != null:\nreturn $default(_that.enable,_that.mode,_that.acceptList,_that.rejectList,_that.sort,_that.isFilterSystemApp,_that.isFilterNonInternetApp);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _AccessControlProps implements AccessControlProps {\n  const _AccessControlProps({this.enable = false, this.mode = AccessControlMode.rejectSelected, final  List<String> acceptList = const [], final  List<String> rejectList = const [], this.sort = AccessSortType.none, this.isFilterSystemApp = true, this.isFilterNonInternetApp = true}): _acceptList = acceptList,_rejectList = rejectList;\n  factory _AccessControlProps.fromJson(Map<String, dynamic> json) => _$AccessControlPropsFromJson(json);\n\n@override@JsonKey() final  bool enable;\n@override@JsonKey() final  AccessControlMode mode;\n final  List<String> _acceptList;\n@override@JsonKey() List<String> get acceptList {\n  if (_acceptList is EqualUnmodifiableListView) return _acceptList;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_acceptList);\n}\n\n final  List<String> _rejectList;\n@override@JsonKey() List<String> get rejectList {\n  if (_rejectList is EqualUnmodifiableListView) return _rejectList;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_rejectList);\n}\n\n@override@JsonKey() final  AccessSortType sort;\n@override@JsonKey() final  bool isFilterSystemApp;\n@override@JsonKey() final  bool isFilterNonInternetApp;\n\n/// Create a copy of AccessControlProps\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$AccessControlPropsCopyWith<_AccessControlProps> get copyWith => __$AccessControlPropsCopyWithImpl<_AccessControlProps>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$AccessControlPropsToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _AccessControlProps&&(identical(other.enable, enable) || other.enable == enable)&&(identical(other.mode, mode) || other.mode == mode)&&const DeepCollectionEquality().equals(other._acceptList, _acceptList)&&const DeepCollectionEquality().equals(other._rejectList, _rejectList)&&(identical(other.sort, sort) || other.sort == sort)&&(identical(other.isFilterSystemApp, isFilterSystemApp) || other.isFilterSystemApp == isFilterSystemApp)&&(identical(other.isFilterNonInternetApp, isFilterNonInternetApp) || other.isFilterNonInternetApp == isFilterNonInternetApp));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,enable,mode,const DeepCollectionEquality().hash(_acceptList),const DeepCollectionEquality().hash(_rejectList),sort,isFilterSystemApp,isFilterNonInternetApp);\n\n@override\nString toString() {\n  return 'AccessControlProps(enable: $enable, mode: $mode, acceptList: $acceptList, rejectList: $rejectList, sort: $sort, isFilterSystemApp: $isFilterSystemApp, isFilterNonInternetApp: $isFilterNonInternetApp)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$AccessControlPropsCopyWith<$Res> implements $AccessControlPropsCopyWith<$Res> {\n  factory _$AccessControlPropsCopyWith(_AccessControlProps value, $Res Function(_AccessControlProps) _then) = __$AccessControlPropsCopyWithImpl;\n@override @useResult\n$Res call({\n bool enable, AccessControlMode mode, List<String> acceptList, List<String> rejectList, AccessSortType sort, bool isFilterSystemApp, bool isFilterNonInternetApp\n});\n\n\n\n\n}\n/// @nodoc\nclass __$AccessControlPropsCopyWithImpl<$Res>\n    implements _$AccessControlPropsCopyWith<$Res> {\n  __$AccessControlPropsCopyWithImpl(this._self, this._then);\n\n  final _AccessControlProps _self;\n  final $Res Function(_AccessControlProps) _then;\n\n/// Create a copy of AccessControlProps\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? enable = null,Object? mode = null,Object? acceptList = null,Object? rejectList = null,Object? sort = null,Object? isFilterSystemApp = null,Object? isFilterNonInternetApp = null,}) {\n  return _then(_AccessControlProps(\nenable: null == enable ? _self.enable : enable // ignore: cast_nullable_to_non_nullable\nas bool,mode: null == mode ? _self.mode : mode // ignore: cast_nullable_to_non_nullable\nas AccessControlMode,acceptList: null == acceptList ? _self._acceptList : acceptList // ignore: cast_nullable_to_non_nullable\nas List<String>,rejectList: null == rejectList ? _self._rejectList : rejectList // ignore: cast_nullable_to_non_nullable\nas List<String>,sort: null == sort ? _self.sort : sort // ignore: cast_nullable_to_non_nullable\nas AccessSortType,isFilterSystemApp: null == isFilterSystemApp ? _self.isFilterSystemApp : isFilterSystemApp // ignore: cast_nullable_to_non_nullable\nas bool,isFilterNonInternetApp: null == isFilterNonInternetApp ? _self.isFilterNonInternetApp : isFilterNonInternetApp // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$WindowProps {\n\n double get width; double get height; double? get top; double? get left;\n/// Create a copy of WindowProps\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$WindowPropsCopyWith<WindowProps> get copyWith => _$WindowPropsCopyWithImpl<WindowProps>(this as WindowProps, _$identity);\n\n  /// Serializes this WindowProps to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is WindowProps&&(identical(other.width, width) || other.width == width)&&(identical(other.height, height) || other.height == height)&&(identical(other.top, top) || other.top == top)&&(identical(other.left, left) || other.left == left));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,width,height,top,left);\n\n@override\nString toString() {\n  return 'WindowProps(width: $width, height: $height, top: $top, left: $left)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $WindowPropsCopyWith<$Res>  {\n  factory $WindowPropsCopyWith(WindowProps value, $Res Function(WindowProps) _then) = _$WindowPropsCopyWithImpl;\n@useResult\n$Res call({\n double width, double height, double? top, double? left\n});\n\n\n\n\n}\n/// @nodoc\nclass _$WindowPropsCopyWithImpl<$Res>\n    implements $WindowPropsCopyWith<$Res> {\n  _$WindowPropsCopyWithImpl(this._self, this._then);\n\n  final WindowProps _self;\n  final $Res Function(WindowProps) _then;\n\n/// Create a copy of WindowProps\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? width = null,Object? height = null,Object? top = freezed,Object? left = freezed,}) {\n  return _then(_self.copyWith(\nwidth: null == width ? _self.width : width // ignore: cast_nullable_to_non_nullable\nas double,height: null == height ? _self.height : height // ignore: cast_nullable_to_non_nullable\nas double,top: freezed == top ? _self.top : top // ignore: cast_nullable_to_non_nullable\nas double?,left: freezed == left ? _self.left : left // ignore: cast_nullable_to_non_nullable\nas double?,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [WindowProps].\nextension WindowPropsPatterns on WindowProps {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _WindowProps value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _WindowProps() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _WindowProps value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _WindowProps():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _WindowProps value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _WindowProps() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( double width,  double height,  double? top,  double? left)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _WindowProps() when $default != null:\nreturn $default(_that.width,_that.height,_that.top,_that.left);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( double width,  double height,  double? top,  double? left)  $default,) {final _that = this;\nswitch (_that) {\ncase _WindowProps():\nreturn $default(_that.width,_that.height,_that.top,_that.left);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( double width,  double height,  double? top,  double? left)?  $default,) {final _that = this;\nswitch (_that) {\ncase _WindowProps() when $default != null:\nreturn $default(_that.width,_that.height,_that.top,_that.left);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _WindowProps implements WindowProps {\n  const _WindowProps({this.width = 0, this.height = 0, this.top, this.left});\n  factory _WindowProps.fromJson(Map<String, dynamic> json) => _$WindowPropsFromJson(json);\n\n@override@JsonKey() final  double width;\n@override@JsonKey() final  double height;\n@override final  double? top;\n@override final  double? left;\n\n/// Create a copy of WindowProps\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$WindowPropsCopyWith<_WindowProps> get copyWith => __$WindowPropsCopyWithImpl<_WindowProps>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$WindowPropsToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _WindowProps&&(identical(other.width, width) || other.width == width)&&(identical(other.height, height) || other.height == height)&&(identical(other.top, top) || other.top == top)&&(identical(other.left, left) || other.left == left));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,width,height,top,left);\n\n@override\nString toString() {\n  return 'WindowProps(width: $width, height: $height, top: $top, left: $left)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$WindowPropsCopyWith<$Res> implements $WindowPropsCopyWith<$Res> {\n  factory _$WindowPropsCopyWith(_WindowProps value, $Res Function(_WindowProps) _then) = __$WindowPropsCopyWithImpl;\n@override @useResult\n$Res call({\n double width, double height, double? top, double? left\n});\n\n\n\n\n}\n/// @nodoc\nclass __$WindowPropsCopyWithImpl<$Res>\n    implements _$WindowPropsCopyWith<$Res> {\n  __$WindowPropsCopyWithImpl(this._self, this._then);\n\n  final _WindowProps _self;\n  final $Res Function(_WindowProps) _then;\n\n/// Create a copy of WindowProps\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? width = null,Object? height = null,Object? top = freezed,Object? left = freezed,}) {\n  return _then(_WindowProps(\nwidth: null == width ? _self.width : width // ignore: cast_nullable_to_non_nullable\nas double,height: null == height ? _self.height : height // ignore: cast_nullable_to_non_nullable\nas double,top: freezed == top ? _self.top : top // ignore: cast_nullable_to_non_nullable\nas double?,left: freezed == left ? _self.left : left // ignore: cast_nullable_to_non_nullable\nas double?,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$VpnProps {\n\n bool get enable; bool get systemProxy; bool get ipv6; bool get allowBypass; bool get dnsHijacking; AccessControlProps get accessControlProps;\n/// Create a copy of VpnProps\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$VpnPropsCopyWith<VpnProps> get copyWith => _$VpnPropsCopyWithImpl<VpnProps>(this as VpnProps, _$identity);\n\n  /// Serializes this VpnProps to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is VpnProps&&(identical(other.enable, enable) || other.enable == enable)&&(identical(other.systemProxy, systemProxy) || other.systemProxy == systemProxy)&&(identical(other.ipv6, ipv6) || other.ipv6 == ipv6)&&(identical(other.allowBypass, allowBypass) || other.allowBypass == allowBypass)&&(identical(other.dnsHijacking, dnsHijacking) || other.dnsHijacking == dnsHijacking)&&(identical(other.accessControlProps, accessControlProps) || other.accessControlProps == accessControlProps));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,enable,systemProxy,ipv6,allowBypass,dnsHijacking,accessControlProps);\n\n@override\nString toString() {\n  return 'VpnProps(enable: $enable, systemProxy: $systemProxy, ipv6: $ipv6, allowBypass: $allowBypass, dnsHijacking: $dnsHijacking, accessControlProps: $accessControlProps)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $VpnPropsCopyWith<$Res>  {\n  factory $VpnPropsCopyWith(VpnProps value, $Res Function(VpnProps) _then) = _$VpnPropsCopyWithImpl;\n@useResult\n$Res call({\n bool enable, bool systemProxy, bool ipv6, bool allowBypass, bool dnsHijacking, AccessControlProps accessControlProps\n});\n\n\n$AccessControlPropsCopyWith<$Res> get accessControlProps;\n\n}\n/// @nodoc\nclass _$VpnPropsCopyWithImpl<$Res>\n    implements $VpnPropsCopyWith<$Res> {\n  _$VpnPropsCopyWithImpl(this._self, this._then);\n\n  final VpnProps _self;\n  final $Res Function(VpnProps) _then;\n\n/// Create a copy of VpnProps\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? enable = null,Object? systemProxy = null,Object? ipv6 = null,Object? allowBypass = null,Object? dnsHijacking = null,Object? accessControlProps = null,}) {\n  return _then(_self.copyWith(\nenable: null == enable ? _self.enable : enable // ignore: cast_nullable_to_non_nullable\nas bool,systemProxy: null == systemProxy ? _self.systemProxy : systemProxy // ignore: cast_nullable_to_non_nullable\nas bool,ipv6: null == ipv6 ? _self.ipv6 : ipv6 // ignore: cast_nullable_to_non_nullable\nas bool,allowBypass: null == allowBypass ? _self.allowBypass : allowBypass // ignore: cast_nullable_to_non_nullable\nas bool,dnsHijacking: null == dnsHijacking ? _self.dnsHijacking : dnsHijacking // ignore: cast_nullable_to_non_nullable\nas bool,accessControlProps: null == accessControlProps ? _self.accessControlProps : accessControlProps // ignore: cast_nullable_to_non_nullable\nas AccessControlProps,\n  ));\n}\n/// Create a copy of VpnProps\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$AccessControlPropsCopyWith<$Res> get accessControlProps {\n  \n  return $AccessControlPropsCopyWith<$Res>(_self.accessControlProps, (value) {\n    return _then(_self.copyWith(accessControlProps: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [VpnProps].\nextension VpnPropsPatterns on VpnProps {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _VpnProps value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _VpnProps() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _VpnProps value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _VpnProps():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _VpnProps value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _VpnProps() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool enable,  bool systemProxy,  bool ipv6,  bool allowBypass,  bool dnsHijacking,  AccessControlProps accessControlProps)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _VpnProps() when $default != null:\nreturn $default(_that.enable,_that.systemProxy,_that.ipv6,_that.allowBypass,_that.dnsHijacking,_that.accessControlProps);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool enable,  bool systemProxy,  bool ipv6,  bool allowBypass,  bool dnsHijacking,  AccessControlProps accessControlProps)  $default,) {final _that = this;\nswitch (_that) {\ncase _VpnProps():\nreturn $default(_that.enable,_that.systemProxy,_that.ipv6,_that.allowBypass,_that.dnsHijacking,_that.accessControlProps);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool enable,  bool systemProxy,  bool ipv6,  bool allowBypass,  bool dnsHijacking,  AccessControlProps accessControlProps)?  $default,) {final _that = this;\nswitch (_that) {\ncase _VpnProps() when $default != null:\nreturn $default(_that.enable,_that.systemProxy,_that.ipv6,_that.allowBypass,_that.dnsHijacking,_that.accessControlProps);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _VpnProps implements VpnProps {\n  const _VpnProps({this.enable = true, this.systemProxy = true, this.ipv6 = false, this.allowBypass = true, this.dnsHijacking = false, this.accessControlProps = defaultAccessControlProps});\n  factory _VpnProps.fromJson(Map<String, dynamic> json) => _$VpnPropsFromJson(json);\n\n@override@JsonKey() final  bool enable;\n@override@JsonKey() final  bool systemProxy;\n@override@JsonKey() final  bool ipv6;\n@override@JsonKey() final  bool allowBypass;\n@override@JsonKey() final  bool dnsHijacking;\n@override@JsonKey() final  AccessControlProps accessControlProps;\n\n/// Create a copy of VpnProps\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$VpnPropsCopyWith<_VpnProps> get copyWith => __$VpnPropsCopyWithImpl<_VpnProps>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$VpnPropsToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _VpnProps&&(identical(other.enable, enable) || other.enable == enable)&&(identical(other.systemProxy, systemProxy) || other.systemProxy == systemProxy)&&(identical(other.ipv6, ipv6) || other.ipv6 == ipv6)&&(identical(other.allowBypass, allowBypass) || other.allowBypass == allowBypass)&&(identical(other.dnsHijacking, dnsHijacking) || other.dnsHijacking == dnsHijacking)&&(identical(other.accessControlProps, accessControlProps) || other.accessControlProps == accessControlProps));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,enable,systemProxy,ipv6,allowBypass,dnsHijacking,accessControlProps);\n\n@override\nString toString() {\n  return 'VpnProps(enable: $enable, systemProxy: $systemProxy, ipv6: $ipv6, allowBypass: $allowBypass, dnsHijacking: $dnsHijacking, accessControlProps: $accessControlProps)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$VpnPropsCopyWith<$Res> implements $VpnPropsCopyWith<$Res> {\n  factory _$VpnPropsCopyWith(_VpnProps value, $Res Function(_VpnProps) _then) = __$VpnPropsCopyWithImpl;\n@override @useResult\n$Res call({\n bool enable, bool systemProxy, bool ipv6, bool allowBypass, bool dnsHijacking, AccessControlProps accessControlProps\n});\n\n\n@override $AccessControlPropsCopyWith<$Res> get accessControlProps;\n\n}\n/// @nodoc\nclass __$VpnPropsCopyWithImpl<$Res>\n    implements _$VpnPropsCopyWith<$Res> {\n  __$VpnPropsCopyWithImpl(this._self, this._then);\n\n  final _VpnProps _self;\n  final $Res Function(_VpnProps) _then;\n\n/// Create a copy of VpnProps\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? enable = null,Object? systemProxy = null,Object? ipv6 = null,Object? allowBypass = null,Object? dnsHijacking = null,Object? accessControlProps = null,}) {\n  return _then(_VpnProps(\nenable: null == enable ? _self.enable : enable // ignore: cast_nullable_to_non_nullable\nas bool,systemProxy: null == systemProxy ? _self.systemProxy : systemProxy // ignore: cast_nullable_to_non_nullable\nas bool,ipv6: null == ipv6 ? _self.ipv6 : ipv6 // ignore: cast_nullable_to_non_nullable\nas bool,allowBypass: null == allowBypass ? _self.allowBypass : allowBypass // ignore: cast_nullable_to_non_nullable\nas bool,dnsHijacking: null == dnsHijacking ? _self.dnsHijacking : dnsHijacking // ignore: cast_nullable_to_non_nullable\nas bool,accessControlProps: null == accessControlProps ? _self.accessControlProps : accessControlProps // ignore: cast_nullable_to_non_nullable\nas AccessControlProps,\n  ));\n}\n\n/// Create a copy of VpnProps\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$AccessControlPropsCopyWith<$Res> get accessControlProps {\n  \n  return $AccessControlPropsCopyWith<$Res>(_self.accessControlProps, (value) {\n    return _then(_self.copyWith(accessControlProps: value));\n  });\n}\n}\n\n\n/// @nodoc\nmixin _$NetworkProps {\n\n bool get systemProxy; List<String> get bypassDomain; RouteMode get routeMode; bool get autoSetSystemDns; bool get appendSystemDns;\n/// Create a copy of NetworkProps\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$NetworkPropsCopyWith<NetworkProps> get copyWith => _$NetworkPropsCopyWithImpl<NetworkProps>(this as NetworkProps, _$identity);\n\n  /// Serializes this NetworkProps to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is NetworkProps&&(identical(other.systemProxy, systemProxy) || other.systemProxy == systemProxy)&&const DeepCollectionEquality().equals(other.bypassDomain, bypassDomain)&&(identical(other.routeMode, routeMode) || other.routeMode == routeMode)&&(identical(other.autoSetSystemDns, autoSetSystemDns) || other.autoSetSystemDns == autoSetSystemDns)&&(identical(other.appendSystemDns, appendSystemDns) || other.appendSystemDns == appendSystemDns));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,systemProxy,const DeepCollectionEquality().hash(bypassDomain),routeMode,autoSetSystemDns,appendSystemDns);\n\n@override\nString toString() {\n  return 'NetworkProps(systemProxy: $systemProxy, bypassDomain: $bypassDomain, routeMode: $routeMode, autoSetSystemDns: $autoSetSystemDns, appendSystemDns: $appendSystemDns)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $NetworkPropsCopyWith<$Res>  {\n  factory $NetworkPropsCopyWith(NetworkProps value, $Res Function(NetworkProps) _then) = _$NetworkPropsCopyWithImpl;\n@useResult\n$Res call({\n bool systemProxy, List<String> bypassDomain, RouteMode routeMode, bool autoSetSystemDns, bool appendSystemDns\n});\n\n\n\n\n}\n/// @nodoc\nclass _$NetworkPropsCopyWithImpl<$Res>\n    implements $NetworkPropsCopyWith<$Res> {\n  _$NetworkPropsCopyWithImpl(this._self, this._then);\n\n  final NetworkProps _self;\n  final $Res Function(NetworkProps) _then;\n\n/// Create a copy of NetworkProps\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? systemProxy = null,Object? bypassDomain = null,Object? routeMode = null,Object? autoSetSystemDns = null,Object? appendSystemDns = null,}) {\n  return _then(_self.copyWith(\nsystemProxy: null == systemProxy ? _self.systemProxy : systemProxy // ignore: cast_nullable_to_non_nullable\nas bool,bypassDomain: null == bypassDomain ? _self.bypassDomain : bypassDomain // ignore: cast_nullable_to_non_nullable\nas List<String>,routeMode: null == routeMode ? _self.routeMode : routeMode // ignore: cast_nullable_to_non_nullable\nas RouteMode,autoSetSystemDns: null == autoSetSystemDns ? _self.autoSetSystemDns : autoSetSystemDns // ignore: cast_nullable_to_non_nullable\nas bool,appendSystemDns: null == appendSystemDns ? _self.appendSystemDns : appendSystemDns // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [NetworkProps].\nextension NetworkPropsPatterns on NetworkProps {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _NetworkProps value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _NetworkProps() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _NetworkProps value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _NetworkProps():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _NetworkProps value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _NetworkProps() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool systemProxy,  List<String> bypassDomain,  RouteMode routeMode,  bool autoSetSystemDns,  bool appendSystemDns)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _NetworkProps() when $default != null:\nreturn $default(_that.systemProxy,_that.bypassDomain,_that.routeMode,_that.autoSetSystemDns,_that.appendSystemDns);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool systemProxy,  List<String> bypassDomain,  RouteMode routeMode,  bool autoSetSystemDns,  bool appendSystemDns)  $default,) {final _that = this;\nswitch (_that) {\ncase _NetworkProps():\nreturn $default(_that.systemProxy,_that.bypassDomain,_that.routeMode,_that.autoSetSystemDns,_that.appendSystemDns);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool systemProxy,  List<String> bypassDomain,  RouteMode routeMode,  bool autoSetSystemDns,  bool appendSystemDns)?  $default,) {final _that = this;\nswitch (_that) {\ncase _NetworkProps() when $default != null:\nreturn $default(_that.systemProxy,_that.bypassDomain,_that.routeMode,_that.autoSetSystemDns,_that.appendSystemDns);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _NetworkProps implements NetworkProps {\n  const _NetworkProps({this.systemProxy = true, final  List<String> bypassDomain = defaultBypassDomain, this.routeMode = RouteMode.config, this.autoSetSystemDns = true, this.appendSystemDns = false}): _bypassDomain = bypassDomain;\n  factory _NetworkProps.fromJson(Map<String, dynamic> json) => _$NetworkPropsFromJson(json);\n\n@override@JsonKey() final  bool systemProxy;\n final  List<String> _bypassDomain;\n@override@JsonKey() List<String> get bypassDomain {\n  if (_bypassDomain is EqualUnmodifiableListView) return _bypassDomain;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_bypassDomain);\n}\n\n@override@JsonKey() final  RouteMode routeMode;\n@override@JsonKey() final  bool autoSetSystemDns;\n@override@JsonKey() final  bool appendSystemDns;\n\n/// Create a copy of NetworkProps\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$NetworkPropsCopyWith<_NetworkProps> get copyWith => __$NetworkPropsCopyWithImpl<_NetworkProps>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$NetworkPropsToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _NetworkProps&&(identical(other.systemProxy, systemProxy) || other.systemProxy == systemProxy)&&const DeepCollectionEquality().equals(other._bypassDomain, _bypassDomain)&&(identical(other.routeMode, routeMode) || other.routeMode == routeMode)&&(identical(other.autoSetSystemDns, autoSetSystemDns) || other.autoSetSystemDns == autoSetSystemDns)&&(identical(other.appendSystemDns, appendSystemDns) || other.appendSystemDns == appendSystemDns));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,systemProxy,const DeepCollectionEquality().hash(_bypassDomain),routeMode,autoSetSystemDns,appendSystemDns);\n\n@override\nString toString() {\n  return 'NetworkProps(systemProxy: $systemProxy, bypassDomain: $bypassDomain, routeMode: $routeMode, autoSetSystemDns: $autoSetSystemDns, appendSystemDns: $appendSystemDns)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$NetworkPropsCopyWith<$Res> implements $NetworkPropsCopyWith<$Res> {\n  factory _$NetworkPropsCopyWith(_NetworkProps value, $Res Function(_NetworkProps) _then) = __$NetworkPropsCopyWithImpl;\n@override @useResult\n$Res call({\n bool systemProxy, List<String> bypassDomain, RouteMode routeMode, bool autoSetSystemDns, bool appendSystemDns\n});\n\n\n\n\n}\n/// @nodoc\nclass __$NetworkPropsCopyWithImpl<$Res>\n    implements _$NetworkPropsCopyWith<$Res> {\n  __$NetworkPropsCopyWithImpl(this._self, this._then);\n\n  final _NetworkProps _self;\n  final $Res Function(_NetworkProps) _then;\n\n/// Create a copy of NetworkProps\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? systemProxy = null,Object? bypassDomain = null,Object? routeMode = null,Object? autoSetSystemDns = null,Object? appendSystemDns = null,}) {\n  return _then(_NetworkProps(\nsystemProxy: null == systemProxy ? _self.systemProxy : systemProxy // ignore: cast_nullable_to_non_nullable\nas bool,bypassDomain: null == bypassDomain ? _self._bypassDomain : bypassDomain // ignore: cast_nullable_to_non_nullable\nas List<String>,routeMode: null == routeMode ? _self.routeMode : routeMode // ignore: cast_nullable_to_non_nullable\nas RouteMode,autoSetSystemDns: null == autoSetSystemDns ? _self.autoSetSystemDns : autoSetSystemDns // ignore: cast_nullable_to_non_nullable\nas bool,appendSystemDns: null == appendSystemDns ? _self.appendSystemDns : appendSystemDns // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$ProxiesStyleProps {\n\n ProxiesType get type; ProxiesSortType get sortType; ProxiesLayout get layout; ProxiesIconStyle get iconStyle; ProxyCardType get cardType;\n/// Create a copy of ProxiesStyleProps\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ProxiesStylePropsCopyWith<ProxiesStyleProps> get copyWith => _$ProxiesStylePropsCopyWithImpl<ProxiesStyleProps>(this as ProxiesStyleProps, _$identity);\n\n  /// Serializes this ProxiesStyleProps to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ProxiesStyleProps&&(identical(other.type, type) || other.type == type)&&(identical(other.sortType, sortType) || other.sortType == sortType)&&(identical(other.layout, layout) || other.layout == layout)&&(identical(other.iconStyle, iconStyle) || other.iconStyle == iconStyle)&&(identical(other.cardType, cardType) || other.cardType == cardType));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,type,sortType,layout,iconStyle,cardType);\n\n@override\nString toString() {\n  return 'ProxiesStyleProps(type: $type, sortType: $sortType, layout: $layout, iconStyle: $iconStyle, cardType: $cardType)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ProxiesStylePropsCopyWith<$Res>  {\n  factory $ProxiesStylePropsCopyWith(ProxiesStyleProps value, $Res Function(ProxiesStyleProps) _then) = _$ProxiesStylePropsCopyWithImpl;\n@useResult\n$Res call({\n ProxiesType type, ProxiesSortType sortType, ProxiesLayout layout, ProxiesIconStyle iconStyle, ProxyCardType cardType\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ProxiesStylePropsCopyWithImpl<$Res>\n    implements $ProxiesStylePropsCopyWith<$Res> {\n  _$ProxiesStylePropsCopyWithImpl(this._self, this._then);\n\n  final ProxiesStyleProps _self;\n  final $Res Function(ProxiesStyleProps) _then;\n\n/// Create a copy of ProxiesStyleProps\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? type = null,Object? sortType = null,Object? layout = null,Object? iconStyle = null,Object? cardType = null,}) {\n  return _then(_self.copyWith(\ntype: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable\nas ProxiesType,sortType: null == sortType ? _self.sortType : sortType // ignore: cast_nullable_to_non_nullable\nas ProxiesSortType,layout: null == layout ? _self.layout : layout // ignore: cast_nullable_to_non_nullable\nas ProxiesLayout,iconStyle: null == iconStyle ? _self.iconStyle : iconStyle // ignore: cast_nullable_to_non_nullable\nas ProxiesIconStyle,cardType: null == cardType ? _self.cardType : cardType // ignore: cast_nullable_to_non_nullable\nas ProxyCardType,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [ProxiesStyleProps].\nextension ProxiesStylePropsPatterns on ProxiesStyleProps {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ProxiesStyleProps value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ProxiesStyleProps() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ProxiesStyleProps value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProxiesStyleProps():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ProxiesStyleProps value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProxiesStyleProps() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( ProxiesType type,  ProxiesSortType sortType,  ProxiesLayout layout,  ProxiesIconStyle iconStyle,  ProxyCardType cardType)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ProxiesStyleProps() when $default != null:\nreturn $default(_that.type,_that.sortType,_that.layout,_that.iconStyle,_that.cardType);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( ProxiesType type,  ProxiesSortType sortType,  ProxiesLayout layout,  ProxiesIconStyle iconStyle,  ProxyCardType cardType)  $default,) {final _that = this;\nswitch (_that) {\ncase _ProxiesStyleProps():\nreturn $default(_that.type,_that.sortType,_that.layout,_that.iconStyle,_that.cardType);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( ProxiesType type,  ProxiesSortType sortType,  ProxiesLayout layout,  ProxiesIconStyle iconStyle,  ProxyCardType cardType)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ProxiesStyleProps() when $default != null:\nreturn $default(_that.type,_that.sortType,_that.layout,_that.iconStyle,_that.cardType);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _ProxiesStyleProps implements ProxiesStyleProps {\n  const _ProxiesStyleProps({this.type = ProxiesType.tab, this.sortType = ProxiesSortType.none, this.layout = ProxiesLayout.standard, this.iconStyle = ProxiesIconStyle.standard, this.cardType = ProxyCardType.expand});\n  factory _ProxiesStyleProps.fromJson(Map<String, dynamic> json) => _$ProxiesStylePropsFromJson(json);\n\n@override@JsonKey() final  ProxiesType type;\n@override@JsonKey() final  ProxiesSortType sortType;\n@override@JsonKey() final  ProxiesLayout layout;\n@override@JsonKey() final  ProxiesIconStyle iconStyle;\n@override@JsonKey() final  ProxyCardType cardType;\n\n/// Create a copy of ProxiesStyleProps\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ProxiesStylePropsCopyWith<_ProxiesStyleProps> get copyWith => __$ProxiesStylePropsCopyWithImpl<_ProxiesStyleProps>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$ProxiesStylePropsToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProxiesStyleProps&&(identical(other.type, type) || other.type == type)&&(identical(other.sortType, sortType) || other.sortType == sortType)&&(identical(other.layout, layout) || other.layout == layout)&&(identical(other.iconStyle, iconStyle) || other.iconStyle == iconStyle)&&(identical(other.cardType, cardType) || other.cardType == cardType));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,type,sortType,layout,iconStyle,cardType);\n\n@override\nString toString() {\n  return 'ProxiesStyleProps(type: $type, sortType: $sortType, layout: $layout, iconStyle: $iconStyle, cardType: $cardType)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ProxiesStylePropsCopyWith<$Res> implements $ProxiesStylePropsCopyWith<$Res> {\n  factory _$ProxiesStylePropsCopyWith(_ProxiesStyleProps value, $Res Function(_ProxiesStyleProps) _then) = __$ProxiesStylePropsCopyWithImpl;\n@override @useResult\n$Res call({\n ProxiesType type, ProxiesSortType sortType, ProxiesLayout layout, ProxiesIconStyle iconStyle, ProxyCardType cardType\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ProxiesStylePropsCopyWithImpl<$Res>\n    implements _$ProxiesStylePropsCopyWith<$Res> {\n  __$ProxiesStylePropsCopyWithImpl(this._self, this._then);\n\n  final _ProxiesStyleProps _self;\n  final $Res Function(_ProxiesStyleProps) _then;\n\n/// Create a copy of ProxiesStyleProps\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? type = null,Object? sortType = null,Object? layout = null,Object? iconStyle = null,Object? cardType = null,}) {\n  return _then(_ProxiesStyleProps(\ntype: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable\nas ProxiesType,sortType: null == sortType ? _self.sortType : sortType // ignore: cast_nullable_to_non_nullable\nas ProxiesSortType,layout: null == layout ? _self.layout : layout // ignore: cast_nullable_to_non_nullable\nas ProxiesLayout,iconStyle: null == iconStyle ? _self.iconStyle : iconStyle // ignore: cast_nullable_to_non_nullable\nas ProxiesIconStyle,cardType: null == cardType ? _self.cardType : cardType // ignore: cast_nullable_to_non_nullable\nas ProxyCardType,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$TextScale {\n\n bool get enable; double get scale;\n/// Create a copy of TextScale\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$TextScaleCopyWith<TextScale> get copyWith => _$TextScaleCopyWithImpl<TextScale>(this as TextScale, _$identity);\n\n  /// Serializes this TextScale to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is TextScale&&(identical(other.enable, enable) || other.enable == enable)&&(identical(other.scale, scale) || other.scale == scale));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,enable,scale);\n\n@override\nString toString() {\n  return 'TextScale(enable: $enable, scale: $scale)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $TextScaleCopyWith<$Res>  {\n  factory $TextScaleCopyWith(TextScale value, $Res Function(TextScale) _then) = _$TextScaleCopyWithImpl;\n@useResult\n$Res call({\n bool enable, double scale\n});\n\n\n\n\n}\n/// @nodoc\nclass _$TextScaleCopyWithImpl<$Res>\n    implements $TextScaleCopyWith<$Res> {\n  _$TextScaleCopyWithImpl(this._self, this._then);\n\n  final TextScale _self;\n  final $Res Function(TextScale) _then;\n\n/// Create a copy of TextScale\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? enable = null,Object? scale = null,}) {\n  return _then(_self.copyWith(\nenable: null == enable ? _self.enable : enable // ignore: cast_nullable_to_non_nullable\nas bool,scale: null == scale ? _self.scale : scale // ignore: cast_nullable_to_non_nullable\nas double,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [TextScale].\nextension TextScalePatterns on TextScale {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _TextScale value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _TextScale() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _TextScale value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _TextScale():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _TextScale value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _TextScale() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool enable,  double scale)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _TextScale() when $default != null:\nreturn $default(_that.enable,_that.scale);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool enable,  double scale)  $default,) {final _that = this;\nswitch (_that) {\ncase _TextScale():\nreturn $default(_that.enable,_that.scale);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool enable,  double scale)?  $default,) {final _that = this;\nswitch (_that) {\ncase _TextScale() when $default != null:\nreturn $default(_that.enable,_that.scale);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _TextScale implements TextScale {\n  const _TextScale({this.enable = false, this.scale = 1.0});\n  factory _TextScale.fromJson(Map<String, dynamic> json) => _$TextScaleFromJson(json);\n\n@override@JsonKey() final  bool enable;\n@override@JsonKey() final  double scale;\n\n/// Create a copy of TextScale\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$TextScaleCopyWith<_TextScale> get copyWith => __$TextScaleCopyWithImpl<_TextScale>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$TextScaleToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _TextScale&&(identical(other.enable, enable) || other.enable == enable)&&(identical(other.scale, scale) || other.scale == scale));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,enable,scale);\n\n@override\nString toString() {\n  return 'TextScale(enable: $enable, scale: $scale)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$TextScaleCopyWith<$Res> implements $TextScaleCopyWith<$Res> {\n  factory _$TextScaleCopyWith(_TextScale value, $Res Function(_TextScale) _then) = __$TextScaleCopyWithImpl;\n@override @useResult\n$Res call({\n bool enable, double scale\n});\n\n\n\n\n}\n/// @nodoc\nclass __$TextScaleCopyWithImpl<$Res>\n    implements _$TextScaleCopyWith<$Res> {\n  __$TextScaleCopyWithImpl(this._self, this._then);\n\n  final _TextScale _self;\n  final $Res Function(_TextScale) _then;\n\n/// Create a copy of TextScale\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? enable = null,Object? scale = null,}) {\n  return _then(_TextScale(\nenable: null == enable ? _self.enable : enable // ignore: cast_nullable_to_non_nullable\nas bool,scale: null == scale ? _self.scale : scale // ignore: cast_nullable_to_non_nullable\nas double,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$ThemeProps {\n\n int? get primaryColor; List<int> get primaryColors; ThemeMode get themeMode; DynamicSchemeVariant get schemeVariant; bool get pureBlack; TextScale get textScale;\n/// Create a copy of ThemeProps\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ThemePropsCopyWith<ThemeProps> get copyWith => _$ThemePropsCopyWithImpl<ThemeProps>(this as ThemeProps, _$identity);\n\n  /// Serializes this ThemeProps to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ThemeProps&&(identical(other.primaryColor, primaryColor) || other.primaryColor == primaryColor)&&const DeepCollectionEquality().equals(other.primaryColors, primaryColors)&&(identical(other.themeMode, themeMode) || other.themeMode == themeMode)&&(identical(other.schemeVariant, schemeVariant) || other.schemeVariant == schemeVariant)&&(identical(other.pureBlack, pureBlack) || other.pureBlack == pureBlack)&&(identical(other.textScale, textScale) || other.textScale == textScale));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,primaryColor,const DeepCollectionEquality().hash(primaryColors),themeMode,schemeVariant,pureBlack,textScale);\n\n@override\nString toString() {\n  return 'ThemeProps(primaryColor: $primaryColor, primaryColors: $primaryColors, themeMode: $themeMode, schemeVariant: $schemeVariant, pureBlack: $pureBlack, textScale: $textScale)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ThemePropsCopyWith<$Res>  {\n  factory $ThemePropsCopyWith(ThemeProps value, $Res Function(ThemeProps) _then) = _$ThemePropsCopyWithImpl;\n@useResult\n$Res call({\n int? primaryColor, List<int> primaryColors, ThemeMode themeMode, DynamicSchemeVariant schemeVariant, bool pureBlack, TextScale textScale\n});\n\n\n$TextScaleCopyWith<$Res> get textScale;\n\n}\n/// @nodoc\nclass _$ThemePropsCopyWithImpl<$Res>\n    implements $ThemePropsCopyWith<$Res> {\n  _$ThemePropsCopyWithImpl(this._self, this._then);\n\n  final ThemeProps _self;\n  final $Res Function(ThemeProps) _then;\n\n/// Create a copy of ThemeProps\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? primaryColor = freezed,Object? primaryColors = null,Object? themeMode = null,Object? schemeVariant = null,Object? pureBlack = null,Object? textScale = null,}) {\n  return _then(_self.copyWith(\nprimaryColor: freezed == primaryColor ? _self.primaryColor : primaryColor // ignore: cast_nullable_to_non_nullable\nas int?,primaryColors: null == primaryColors ? _self.primaryColors : primaryColors // ignore: cast_nullable_to_non_nullable\nas List<int>,themeMode: null == themeMode ? _self.themeMode : themeMode // ignore: cast_nullable_to_non_nullable\nas ThemeMode,schemeVariant: null == schemeVariant ? _self.schemeVariant : schemeVariant // ignore: cast_nullable_to_non_nullable\nas DynamicSchemeVariant,pureBlack: null == pureBlack ? _self.pureBlack : pureBlack // ignore: cast_nullable_to_non_nullable\nas bool,textScale: null == textScale ? _self.textScale : textScale // ignore: cast_nullable_to_non_nullable\nas TextScale,\n  ));\n}\n/// Create a copy of ThemeProps\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$TextScaleCopyWith<$Res> get textScale {\n  \n  return $TextScaleCopyWith<$Res>(_self.textScale, (value) {\n    return _then(_self.copyWith(textScale: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [ThemeProps].\nextension ThemePropsPatterns on ThemeProps {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ThemeProps value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ThemeProps() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ThemeProps value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ThemeProps():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ThemeProps value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ThemeProps() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int? primaryColor,  List<int> primaryColors,  ThemeMode themeMode,  DynamicSchemeVariant schemeVariant,  bool pureBlack,  TextScale textScale)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ThemeProps() when $default != null:\nreturn $default(_that.primaryColor,_that.primaryColors,_that.themeMode,_that.schemeVariant,_that.pureBlack,_that.textScale);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int? primaryColor,  List<int> primaryColors,  ThemeMode themeMode,  DynamicSchemeVariant schemeVariant,  bool pureBlack,  TextScale textScale)  $default,) {final _that = this;\nswitch (_that) {\ncase _ThemeProps():\nreturn $default(_that.primaryColor,_that.primaryColors,_that.themeMode,_that.schemeVariant,_that.pureBlack,_that.textScale);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int? primaryColor,  List<int> primaryColors,  ThemeMode themeMode,  DynamicSchemeVariant schemeVariant,  bool pureBlack,  TextScale textScale)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ThemeProps() when $default != null:\nreturn $default(_that.primaryColor,_that.primaryColors,_that.themeMode,_that.schemeVariant,_that.pureBlack,_that.textScale);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _ThemeProps implements ThemeProps {\n  const _ThemeProps({this.primaryColor, final  List<int> primaryColors = defaultPrimaryColors, this.themeMode = ThemeMode.dark, this.schemeVariant = DynamicSchemeVariant.content, this.pureBlack = false, this.textScale = const TextScale()}): _primaryColors = primaryColors;\n  factory _ThemeProps.fromJson(Map<String, dynamic> json) => _$ThemePropsFromJson(json);\n\n@override final  int? primaryColor;\n final  List<int> _primaryColors;\n@override@JsonKey() List<int> get primaryColors {\n  if (_primaryColors is EqualUnmodifiableListView) return _primaryColors;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_primaryColors);\n}\n\n@override@JsonKey() final  ThemeMode themeMode;\n@override@JsonKey() final  DynamicSchemeVariant schemeVariant;\n@override@JsonKey() final  bool pureBlack;\n@override@JsonKey() final  TextScale textScale;\n\n/// Create a copy of ThemeProps\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ThemePropsCopyWith<_ThemeProps> get copyWith => __$ThemePropsCopyWithImpl<_ThemeProps>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$ThemePropsToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ThemeProps&&(identical(other.primaryColor, primaryColor) || other.primaryColor == primaryColor)&&const DeepCollectionEquality().equals(other._primaryColors, _primaryColors)&&(identical(other.themeMode, themeMode) || other.themeMode == themeMode)&&(identical(other.schemeVariant, schemeVariant) || other.schemeVariant == schemeVariant)&&(identical(other.pureBlack, pureBlack) || other.pureBlack == pureBlack)&&(identical(other.textScale, textScale) || other.textScale == textScale));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,primaryColor,const DeepCollectionEquality().hash(_primaryColors),themeMode,schemeVariant,pureBlack,textScale);\n\n@override\nString toString() {\n  return 'ThemeProps(primaryColor: $primaryColor, primaryColors: $primaryColors, themeMode: $themeMode, schemeVariant: $schemeVariant, pureBlack: $pureBlack, textScale: $textScale)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ThemePropsCopyWith<$Res> implements $ThemePropsCopyWith<$Res> {\n  factory _$ThemePropsCopyWith(_ThemeProps value, $Res Function(_ThemeProps) _then) = __$ThemePropsCopyWithImpl;\n@override @useResult\n$Res call({\n int? primaryColor, List<int> primaryColors, ThemeMode themeMode, DynamicSchemeVariant schemeVariant, bool pureBlack, TextScale textScale\n});\n\n\n@override $TextScaleCopyWith<$Res> get textScale;\n\n}\n/// @nodoc\nclass __$ThemePropsCopyWithImpl<$Res>\n    implements _$ThemePropsCopyWith<$Res> {\n  __$ThemePropsCopyWithImpl(this._self, this._then);\n\n  final _ThemeProps _self;\n  final $Res Function(_ThemeProps) _then;\n\n/// Create a copy of ThemeProps\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? primaryColor = freezed,Object? primaryColors = null,Object? themeMode = null,Object? schemeVariant = null,Object? pureBlack = null,Object? textScale = null,}) {\n  return _then(_ThemeProps(\nprimaryColor: freezed == primaryColor ? _self.primaryColor : primaryColor // ignore: cast_nullable_to_non_nullable\nas int?,primaryColors: null == primaryColors ? _self._primaryColors : primaryColors // ignore: cast_nullable_to_non_nullable\nas List<int>,themeMode: null == themeMode ? _self.themeMode : themeMode // ignore: cast_nullable_to_non_nullable\nas ThemeMode,schemeVariant: null == schemeVariant ? _self.schemeVariant : schemeVariant // ignore: cast_nullable_to_non_nullable\nas DynamicSchemeVariant,pureBlack: null == pureBlack ? _self.pureBlack : pureBlack // ignore: cast_nullable_to_non_nullable\nas bool,textScale: null == textScale ? _self.textScale : textScale // ignore: cast_nullable_to_non_nullable\nas TextScale,\n  ));\n}\n\n/// Create a copy of ThemeProps\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$TextScaleCopyWith<$Res> get textScale {\n  \n  return $TextScaleCopyWith<$Res>(_self.textScale, (value) {\n    return _then(_self.copyWith(textScale: value));\n  });\n}\n}\n\n\n/// @nodoc\nmixin _$Config {\n\n int? get currentProfileId; bool get overrideDns; List<HotKeyAction> get hotKeyActions;@JsonKey(fromJson: AppSettingProps.safeFromJson) AppSettingProps get appSettingProps; DAVProps? get davProps; NetworkProps get networkProps; VpnProps get vpnProps;@JsonKey(fromJson: ThemeProps.safeFromJson) ThemeProps get themeProps; ProxiesStyleProps get proxiesStyleProps; WindowProps get windowProps; ClashConfig get patchClashConfig;\n/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ConfigCopyWith<Config> get copyWith => _$ConfigCopyWithImpl<Config>(this as Config, _$identity);\n\n  /// Serializes this Config to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is Config&&(identical(other.currentProfileId, currentProfileId) || other.currentProfileId == currentProfileId)&&(identical(other.overrideDns, overrideDns) || other.overrideDns == overrideDns)&&const DeepCollectionEquality().equals(other.hotKeyActions, hotKeyActions)&&(identical(other.appSettingProps, appSettingProps) || other.appSettingProps == appSettingProps)&&(identical(other.davProps, davProps) || other.davProps == davProps)&&(identical(other.networkProps, networkProps) || other.networkProps == networkProps)&&(identical(other.vpnProps, vpnProps) || other.vpnProps == vpnProps)&&(identical(other.themeProps, themeProps) || other.themeProps == themeProps)&&(identical(other.proxiesStyleProps, proxiesStyleProps) || other.proxiesStyleProps == proxiesStyleProps)&&(identical(other.windowProps, windowProps) || other.windowProps == windowProps)&&(identical(other.patchClashConfig, patchClashConfig) || other.patchClashConfig == patchClashConfig));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,currentProfileId,overrideDns,const DeepCollectionEquality().hash(hotKeyActions),appSettingProps,davProps,networkProps,vpnProps,themeProps,proxiesStyleProps,windowProps,patchClashConfig);\n\n@override\nString toString() {\n  return 'Config(currentProfileId: $currentProfileId, overrideDns: $overrideDns, hotKeyActions: $hotKeyActions, appSettingProps: $appSettingProps, davProps: $davProps, networkProps: $networkProps, vpnProps: $vpnProps, themeProps: $themeProps, proxiesStyleProps: $proxiesStyleProps, windowProps: $windowProps, patchClashConfig: $patchClashConfig)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ConfigCopyWith<$Res>  {\n  factory $ConfigCopyWith(Config value, $Res Function(Config) _then) = _$ConfigCopyWithImpl;\n@useResult\n$Res call({\n int? currentProfileId, bool overrideDns, List<HotKeyAction> hotKeyActions,@JsonKey(fromJson: AppSettingProps.safeFromJson) AppSettingProps appSettingProps, DAVProps? davProps, NetworkProps networkProps, VpnProps vpnProps,@JsonKey(fromJson: ThemeProps.safeFromJson) ThemeProps themeProps, ProxiesStyleProps proxiesStyleProps, WindowProps windowProps, ClashConfig patchClashConfig\n});\n\n\n$AppSettingPropsCopyWith<$Res> get appSettingProps;$DAVPropsCopyWith<$Res>? get davProps;$NetworkPropsCopyWith<$Res> get networkProps;$VpnPropsCopyWith<$Res> get vpnProps;$ThemePropsCopyWith<$Res> get themeProps;$ProxiesStylePropsCopyWith<$Res> get proxiesStyleProps;$WindowPropsCopyWith<$Res> get windowProps;$ClashConfigCopyWith<$Res> get patchClashConfig;\n\n}\n/// @nodoc\nclass _$ConfigCopyWithImpl<$Res>\n    implements $ConfigCopyWith<$Res> {\n  _$ConfigCopyWithImpl(this._self, this._then);\n\n  final Config _self;\n  final $Res Function(Config) _then;\n\n/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? currentProfileId = freezed,Object? overrideDns = null,Object? hotKeyActions = null,Object? appSettingProps = null,Object? davProps = freezed,Object? networkProps = null,Object? vpnProps = null,Object? themeProps = null,Object? proxiesStyleProps = null,Object? windowProps = null,Object? patchClashConfig = null,}) {\n  return _then(_self.copyWith(\ncurrentProfileId: freezed == currentProfileId ? _self.currentProfileId : currentProfileId // ignore: cast_nullable_to_non_nullable\nas int?,overrideDns: null == overrideDns ? _self.overrideDns : overrideDns // ignore: cast_nullable_to_non_nullable\nas bool,hotKeyActions: null == hotKeyActions ? _self.hotKeyActions : hotKeyActions // ignore: cast_nullable_to_non_nullable\nas List<HotKeyAction>,appSettingProps: null == appSettingProps ? _self.appSettingProps : appSettingProps // ignore: cast_nullable_to_non_nullable\nas AppSettingProps,davProps: freezed == davProps ? _self.davProps : davProps // ignore: cast_nullable_to_non_nullable\nas DAVProps?,networkProps: null == networkProps ? _self.networkProps : networkProps // ignore: cast_nullable_to_non_nullable\nas NetworkProps,vpnProps: null == vpnProps ? _self.vpnProps : vpnProps // ignore: cast_nullable_to_non_nullable\nas VpnProps,themeProps: null == themeProps ? _self.themeProps : themeProps // ignore: cast_nullable_to_non_nullable\nas ThemeProps,proxiesStyleProps: null == proxiesStyleProps ? _self.proxiesStyleProps : proxiesStyleProps // ignore: cast_nullable_to_non_nullable\nas ProxiesStyleProps,windowProps: null == windowProps ? _self.windowProps : windowProps // ignore: cast_nullable_to_non_nullable\nas WindowProps,patchClashConfig: null == patchClashConfig ? _self.patchClashConfig : patchClashConfig // ignore: cast_nullable_to_non_nullable\nas ClashConfig,\n  ));\n}\n/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$AppSettingPropsCopyWith<$Res> get appSettingProps {\n  \n  return $AppSettingPropsCopyWith<$Res>(_self.appSettingProps, (value) {\n    return _then(_self.copyWith(appSettingProps: value));\n  });\n}/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$DAVPropsCopyWith<$Res>? get davProps {\n    if (_self.davProps == null) {\n    return null;\n  }\n\n  return $DAVPropsCopyWith<$Res>(_self.davProps!, (value) {\n    return _then(_self.copyWith(davProps: value));\n  });\n}/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$NetworkPropsCopyWith<$Res> get networkProps {\n  \n  return $NetworkPropsCopyWith<$Res>(_self.networkProps, (value) {\n    return _then(_self.copyWith(networkProps: value));\n  });\n}/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$VpnPropsCopyWith<$Res> get vpnProps {\n  \n  return $VpnPropsCopyWith<$Res>(_self.vpnProps, (value) {\n    return _then(_self.copyWith(vpnProps: value));\n  });\n}/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$ThemePropsCopyWith<$Res> get themeProps {\n  \n  return $ThemePropsCopyWith<$Res>(_self.themeProps, (value) {\n    return _then(_self.copyWith(themeProps: value));\n  });\n}/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$ProxiesStylePropsCopyWith<$Res> get proxiesStyleProps {\n  \n  return $ProxiesStylePropsCopyWith<$Res>(_self.proxiesStyleProps, (value) {\n    return _then(_self.copyWith(proxiesStyleProps: value));\n  });\n}/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$WindowPropsCopyWith<$Res> get windowProps {\n  \n  return $WindowPropsCopyWith<$Res>(_self.windowProps, (value) {\n    return _then(_self.copyWith(windowProps: value));\n  });\n}/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$ClashConfigCopyWith<$Res> get patchClashConfig {\n  \n  return $ClashConfigCopyWith<$Res>(_self.patchClashConfig, (value) {\n    return _then(_self.copyWith(patchClashConfig: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [Config].\nextension ConfigPatterns on Config {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Config value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _Config() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Config value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Config():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Config value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Config() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int? currentProfileId,  bool overrideDns,  List<HotKeyAction> hotKeyActions, @JsonKey(fromJson: AppSettingProps.safeFromJson)  AppSettingProps appSettingProps,  DAVProps? davProps,  NetworkProps networkProps,  VpnProps vpnProps, @JsonKey(fromJson: ThemeProps.safeFromJson)  ThemeProps themeProps,  ProxiesStyleProps proxiesStyleProps,  WindowProps windowProps,  ClashConfig patchClashConfig)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _Config() when $default != null:\nreturn $default(_that.currentProfileId,_that.overrideDns,_that.hotKeyActions,_that.appSettingProps,_that.davProps,_that.networkProps,_that.vpnProps,_that.themeProps,_that.proxiesStyleProps,_that.windowProps,_that.patchClashConfig);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int? currentProfileId,  bool overrideDns,  List<HotKeyAction> hotKeyActions, @JsonKey(fromJson: AppSettingProps.safeFromJson)  AppSettingProps appSettingProps,  DAVProps? davProps,  NetworkProps networkProps,  VpnProps vpnProps, @JsonKey(fromJson: ThemeProps.safeFromJson)  ThemeProps themeProps,  ProxiesStyleProps proxiesStyleProps,  WindowProps windowProps,  ClashConfig patchClashConfig)  $default,) {final _that = this;\nswitch (_that) {\ncase _Config():\nreturn $default(_that.currentProfileId,_that.overrideDns,_that.hotKeyActions,_that.appSettingProps,_that.davProps,_that.networkProps,_that.vpnProps,_that.themeProps,_that.proxiesStyleProps,_that.windowProps,_that.patchClashConfig);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int? currentProfileId,  bool overrideDns,  List<HotKeyAction> hotKeyActions, @JsonKey(fromJson: AppSettingProps.safeFromJson)  AppSettingProps appSettingProps,  DAVProps? davProps,  NetworkProps networkProps,  VpnProps vpnProps, @JsonKey(fromJson: ThemeProps.safeFromJson)  ThemeProps themeProps,  ProxiesStyleProps proxiesStyleProps,  WindowProps windowProps,  ClashConfig patchClashConfig)?  $default,) {final _that = this;\nswitch (_that) {\ncase _Config() when $default != null:\nreturn $default(_that.currentProfileId,_that.overrideDns,_that.hotKeyActions,_that.appSettingProps,_that.davProps,_that.networkProps,_that.vpnProps,_that.themeProps,_that.proxiesStyleProps,_that.windowProps,_that.patchClashConfig);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _Config implements Config {\n  const _Config({this.currentProfileId, this.overrideDns = false, final  List<HotKeyAction> hotKeyActions = const [], @JsonKey(fromJson: AppSettingProps.safeFromJson) this.appSettingProps = defaultAppSettingProps, this.davProps, this.networkProps = defaultNetworkProps, this.vpnProps = defaultVpnProps, @JsonKey(fromJson: ThemeProps.safeFromJson) required this.themeProps, this.proxiesStyleProps = defaultProxiesStyleProps, this.windowProps = defaultWindowProps, this.patchClashConfig = defaultClashConfig}): _hotKeyActions = hotKeyActions;\n  factory _Config.fromJson(Map<String, dynamic> json) => _$ConfigFromJson(json);\n\n@override final  int? currentProfileId;\n@override@JsonKey() final  bool overrideDns;\n final  List<HotKeyAction> _hotKeyActions;\n@override@JsonKey() List<HotKeyAction> get hotKeyActions {\n  if (_hotKeyActions is EqualUnmodifiableListView) return _hotKeyActions;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_hotKeyActions);\n}\n\n@override@JsonKey(fromJson: AppSettingProps.safeFromJson) final  AppSettingProps appSettingProps;\n@override final  DAVProps? davProps;\n@override@JsonKey() final  NetworkProps networkProps;\n@override@JsonKey() final  VpnProps vpnProps;\n@override@JsonKey(fromJson: ThemeProps.safeFromJson) final  ThemeProps themeProps;\n@override@JsonKey() final  ProxiesStyleProps proxiesStyleProps;\n@override@JsonKey() final  WindowProps windowProps;\n@override@JsonKey() final  ClashConfig patchClashConfig;\n\n/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ConfigCopyWith<_Config> get copyWith => __$ConfigCopyWithImpl<_Config>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$ConfigToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Config&&(identical(other.currentProfileId, currentProfileId) || other.currentProfileId == currentProfileId)&&(identical(other.overrideDns, overrideDns) || other.overrideDns == overrideDns)&&const DeepCollectionEquality().equals(other._hotKeyActions, _hotKeyActions)&&(identical(other.appSettingProps, appSettingProps) || other.appSettingProps == appSettingProps)&&(identical(other.davProps, davProps) || other.davProps == davProps)&&(identical(other.networkProps, networkProps) || other.networkProps == networkProps)&&(identical(other.vpnProps, vpnProps) || other.vpnProps == vpnProps)&&(identical(other.themeProps, themeProps) || other.themeProps == themeProps)&&(identical(other.proxiesStyleProps, proxiesStyleProps) || other.proxiesStyleProps == proxiesStyleProps)&&(identical(other.windowProps, windowProps) || other.windowProps == windowProps)&&(identical(other.patchClashConfig, patchClashConfig) || other.patchClashConfig == patchClashConfig));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,currentProfileId,overrideDns,const DeepCollectionEquality().hash(_hotKeyActions),appSettingProps,davProps,networkProps,vpnProps,themeProps,proxiesStyleProps,windowProps,patchClashConfig);\n\n@override\nString toString() {\n  return 'Config(currentProfileId: $currentProfileId, overrideDns: $overrideDns, hotKeyActions: $hotKeyActions, appSettingProps: $appSettingProps, davProps: $davProps, networkProps: $networkProps, vpnProps: $vpnProps, themeProps: $themeProps, proxiesStyleProps: $proxiesStyleProps, windowProps: $windowProps, patchClashConfig: $patchClashConfig)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ConfigCopyWith<$Res> implements $ConfigCopyWith<$Res> {\n  factory _$ConfigCopyWith(_Config value, $Res Function(_Config) _then) = __$ConfigCopyWithImpl;\n@override @useResult\n$Res call({\n int? currentProfileId, bool overrideDns, List<HotKeyAction> hotKeyActions,@JsonKey(fromJson: AppSettingProps.safeFromJson) AppSettingProps appSettingProps, DAVProps? davProps, NetworkProps networkProps, VpnProps vpnProps,@JsonKey(fromJson: ThemeProps.safeFromJson) ThemeProps themeProps, ProxiesStyleProps proxiesStyleProps, WindowProps windowProps, ClashConfig patchClashConfig\n});\n\n\n@override $AppSettingPropsCopyWith<$Res> get appSettingProps;@override $DAVPropsCopyWith<$Res>? get davProps;@override $NetworkPropsCopyWith<$Res> get networkProps;@override $VpnPropsCopyWith<$Res> get vpnProps;@override $ThemePropsCopyWith<$Res> get themeProps;@override $ProxiesStylePropsCopyWith<$Res> get proxiesStyleProps;@override $WindowPropsCopyWith<$Res> get windowProps;@override $ClashConfigCopyWith<$Res> get patchClashConfig;\n\n}\n/// @nodoc\nclass __$ConfigCopyWithImpl<$Res>\n    implements _$ConfigCopyWith<$Res> {\n  __$ConfigCopyWithImpl(this._self, this._then);\n\n  final _Config _self;\n  final $Res Function(_Config) _then;\n\n/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? currentProfileId = freezed,Object? overrideDns = null,Object? hotKeyActions = null,Object? appSettingProps = null,Object? davProps = freezed,Object? networkProps = null,Object? vpnProps = null,Object? themeProps = null,Object? proxiesStyleProps = null,Object? windowProps = null,Object? patchClashConfig = null,}) {\n  return _then(_Config(\ncurrentProfileId: freezed == currentProfileId ? _self.currentProfileId : currentProfileId // ignore: cast_nullable_to_non_nullable\nas int?,overrideDns: null == overrideDns ? _self.overrideDns : overrideDns // ignore: cast_nullable_to_non_nullable\nas bool,hotKeyActions: null == hotKeyActions ? _self._hotKeyActions : hotKeyActions // ignore: cast_nullable_to_non_nullable\nas List<HotKeyAction>,appSettingProps: null == appSettingProps ? _self.appSettingProps : appSettingProps // ignore: cast_nullable_to_non_nullable\nas AppSettingProps,davProps: freezed == davProps ? _self.davProps : davProps // ignore: cast_nullable_to_non_nullable\nas DAVProps?,networkProps: null == networkProps ? _self.networkProps : networkProps // ignore: cast_nullable_to_non_nullable\nas NetworkProps,vpnProps: null == vpnProps ? _self.vpnProps : vpnProps // ignore: cast_nullable_to_non_nullable\nas VpnProps,themeProps: null == themeProps ? _self.themeProps : themeProps // ignore: cast_nullable_to_non_nullable\nas ThemeProps,proxiesStyleProps: null == proxiesStyleProps ? _self.proxiesStyleProps : proxiesStyleProps // ignore: cast_nullable_to_non_nullable\nas ProxiesStyleProps,windowProps: null == windowProps ? _self.windowProps : windowProps // ignore: cast_nullable_to_non_nullable\nas WindowProps,patchClashConfig: null == patchClashConfig ? _self.patchClashConfig : patchClashConfig // ignore: cast_nullable_to_non_nullable\nas ClashConfig,\n  ));\n}\n\n/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$AppSettingPropsCopyWith<$Res> get appSettingProps {\n  \n  return $AppSettingPropsCopyWith<$Res>(_self.appSettingProps, (value) {\n    return _then(_self.copyWith(appSettingProps: value));\n  });\n}/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$DAVPropsCopyWith<$Res>? get davProps {\n    if (_self.davProps == null) {\n    return null;\n  }\n\n  return $DAVPropsCopyWith<$Res>(_self.davProps!, (value) {\n    return _then(_self.copyWith(davProps: value));\n  });\n}/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$NetworkPropsCopyWith<$Res> get networkProps {\n  \n  return $NetworkPropsCopyWith<$Res>(_self.networkProps, (value) {\n    return _then(_self.copyWith(networkProps: value));\n  });\n}/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$VpnPropsCopyWith<$Res> get vpnProps {\n  \n  return $VpnPropsCopyWith<$Res>(_self.vpnProps, (value) {\n    return _then(_self.copyWith(vpnProps: value));\n  });\n}/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$ThemePropsCopyWith<$Res> get themeProps {\n  \n  return $ThemePropsCopyWith<$Res>(_self.themeProps, (value) {\n    return _then(_self.copyWith(themeProps: value));\n  });\n}/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$ProxiesStylePropsCopyWith<$Res> get proxiesStyleProps {\n  \n  return $ProxiesStylePropsCopyWith<$Res>(_self.proxiesStyleProps, (value) {\n    return _then(_self.copyWith(proxiesStyleProps: value));\n  });\n}/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$WindowPropsCopyWith<$Res> get windowProps {\n  \n  return $WindowPropsCopyWith<$Res>(_self.windowProps, (value) {\n    return _then(_self.copyWith(windowProps: value));\n  });\n}/// Create a copy of Config\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$ClashConfigCopyWith<$Res> get patchClashConfig {\n  \n  return $ClashConfigCopyWith<$Res>(_self.patchClashConfig, (value) {\n    return _then(_self.copyWith(patchClashConfig: value));\n  });\n}\n}\n\n// dart format on\n"
  },
  {
    "path": "lib/models/generated/config.g.dart",
    "content": "// GENERATED CODE - DO NOT MODIFY BY HAND\n\npart of '../config.dart';\n\n// **************************************************************************\n// JsonSerializableGenerator\n// **************************************************************************\n\n_AppSettingProps _$AppSettingPropsFromJson(Map<String, dynamic> json) =>\n    _AppSettingProps(\n      locale: json['locale'] as String?,\n      dashboardWidgets: json['dashboardWidgets'] == null\n          ? defaultDashboardWidgets\n          : dashboardWidgetsSafeFormJson(json['dashboardWidgets'] as List?),\n      onlyStatisticsProxy: json['onlyStatisticsProxy'] as bool? ?? false,\n      autoLaunch: json['autoLaunch'] as bool? ?? false,\n      silentLaunch: json['silentLaunch'] as bool? ?? false,\n      autoRun: json['autoRun'] as bool? ?? false,\n      openLogs: json['openLogs'] as bool? ?? false,\n      closeConnections: json['closeConnections'] as bool? ?? true,\n      testUrl: json['testUrl'] as String? ?? defaultTestUrl,\n      isAnimateToPage: json['isAnimateToPage'] as bool? ?? true,\n      autoCheckUpdate: json['autoCheckUpdate'] as bool? ?? true,\n      showLabel: json['showLabel'] as bool? ?? false,\n      disclaimerAccepted: json['disclaimerAccepted'] as bool? ?? false,\n      crashlyticsTip: json['crashlyticsTip'] as bool? ?? false,\n      crashlytics: json['crashlytics'] as bool? ?? false,\n      minimizeOnExit: json['minimizeOnExit'] as bool? ?? true,\n      hidden: json['hidden'] as bool? ?? false,\n      developerMode: json['developerMode'] as bool? ?? false,\n      restoreStrategy:\n          $enumDecodeNullable(\n            _$RestoreStrategyEnumMap,\n            json['restoreStrategy'],\n          ) ??\n          RestoreStrategy.compatible,\n      showTrayTitle: json['showTrayTitle'] as bool? ?? true,\n    );\n\nMap<String, dynamic> _$AppSettingPropsToJson(_AppSettingProps instance) =>\n    <String, dynamic>{\n      'locale': instance.locale,\n      'dashboardWidgets': instance.dashboardWidgets\n          .map((e) => _$DashboardWidgetEnumMap[e]!)\n          .toList(),\n      'onlyStatisticsProxy': instance.onlyStatisticsProxy,\n      'autoLaunch': instance.autoLaunch,\n      'silentLaunch': instance.silentLaunch,\n      'autoRun': instance.autoRun,\n      'openLogs': instance.openLogs,\n      'closeConnections': instance.closeConnections,\n      'testUrl': instance.testUrl,\n      'isAnimateToPage': instance.isAnimateToPage,\n      'autoCheckUpdate': instance.autoCheckUpdate,\n      'showLabel': instance.showLabel,\n      'disclaimerAccepted': instance.disclaimerAccepted,\n      'crashlyticsTip': instance.crashlyticsTip,\n      'crashlytics': instance.crashlytics,\n      'minimizeOnExit': instance.minimizeOnExit,\n      'hidden': instance.hidden,\n      'developerMode': instance.developerMode,\n      'restoreStrategy': _$RestoreStrategyEnumMap[instance.restoreStrategy]!,\n      'showTrayTitle': instance.showTrayTitle,\n    };\n\nconst _$RestoreStrategyEnumMap = {\n  RestoreStrategy.compatible: 'compatible',\n  RestoreStrategy.override: 'override',\n};\n\nconst _$DashboardWidgetEnumMap = {\n  DashboardWidget.networkSpeed: 'networkSpeed',\n  DashboardWidget.outboundModeV2: 'outboundModeV2',\n  DashboardWidget.outboundMode: 'outboundMode',\n  DashboardWidget.trafficUsage: 'trafficUsage',\n  DashboardWidget.networkDetection: 'networkDetection',\n  DashboardWidget.tunButton: 'tunButton',\n  DashboardWidget.vpnButton: 'vpnButton',\n  DashboardWidget.systemProxyButton: 'systemProxyButton',\n  DashboardWidget.intranetIp: 'intranetIp',\n  DashboardWidget.memoryInfo: 'memoryInfo',\n};\n\n_AccessControlProps _$AccessControlPropsFromJson(Map<String, dynamic> json) =>\n    _AccessControlProps(\n      enable: json['enable'] as bool? ?? false,\n      mode:\n          $enumDecodeNullable(_$AccessControlModeEnumMap, json['mode']) ??\n          AccessControlMode.rejectSelected,\n      acceptList:\n          (json['acceptList'] as List<dynamic>?)\n              ?.map((e) => e as String)\n              .toList() ??\n          const [],\n      rejectList:\n          (json['rejectList'] as List<dynamic>?)\n              ?.map((e) => e as String)\n              .toList() ??\n          const [],\n      sort:\n          $enumDecodeNullable(_$AccessSortTypeEnumMap, json['sort']) ??\n          AccessSortType.none,\n      isFilterSystemApp: json['isFilterSystemApp'] as bool? ?? true,\n      isFilterNonInternetApp: json['isFilterNonInternetApp'] as bool? ?? true,\n    );\n\nMap<String, dynamic> _$AccessControlPropsToJson(_AccessControlProps instance) =>\n    <String, dynamic>{\n      'enable': instance.enable,\n      'mode': _$AccessControlModeEnumMap[instance.mode]!,\n      'acceptList': instance.acceptList,\n      'rejectList': instance.rejectList,\n      'sort': _$AccessSortTypeEnumMap[instance.sort]!,\n      'isFilterSystemApp': instance.isFilterSystemApp,\n      'isFilterNonInternetApp': instance.isFilterNonInternetApp,\n    };\n\nconst _$AccessControlModeEnumMap = {\n  AccessControlMode.acceptSelected: 'acceptSelected',\n  AccessControlMode.rejectSelected: 'rejectSelected',\n};\n\nconst _$AccessSortTypeEnumMap = {\n  AccessSortType.none: 'none',\n  AccessSortType.name: 'name',\n  AccessSortType.time: 'time',\n};\n\n_WindowProps _$WindowPropsFromJson(Map<String, dynamic> json) => _WindowProps(\n  width: (json['width'] as num?)?.toDouble() ?? 0,\n  height: (json['height'] as num?)?.toDouble() ?? 0,\n  top: (json['top'] as num?)?.toDouble(),\n  left: (json['left'] as num?)?.toDouble(),\n);\n\nMap<String, dynamic> _$WindowPropsToJson(_WindowProps instance) =>\n    <String, dynamic>{\n      'width': instance.width,\n      'height': instance.height,\n      'top': instance.top,\n      'left': instance.left,\n    };\n\n_VpnProps _$VpnPropsFromJson(Map<String, dynamic> json) => _VpnProps(\n  enable: json['enable'] as bool? ?? true,\n  systemProxy: json['systemProxy'] as bool? ?? true,\n  ipv6: json['ipv6'] as bool? ?? false,\n  allowBypass: json['allowBypass'] as bool? ?? true,\n  dnsHijacking: json['dnsHijacking'] as bool? ?? false,\n  accessControlProps: json['accessControlProps'] == null\n      ? defaultAccessControlProps\n      : AccessControlProps.fromJson(\n          json['accessControlProps'] as Map<String, dynamic>,\n        ),\n);\n\nMap<String, dynamic> _$VpnPropsToJson(_VpnProps instance) => <String, dynamic>{\n  'enable': instance.enable,\n  'systemProxy': instance.systemProxy,\n  'ipv6': instance.ipv6,\n  'allowBypass': instance.allowBypass,\n  'dnsHijacking': instance.dnsHijacking,\n  'accessControlProps': instance.accessControlProps,\n};\n\n_NetworkProps _$NetworkPropsFromJson(Map<String, dynamic> json) =>\n    _NetworkProps(\n      systemProxy: json['systemProxy'] as bool? ?? true,\n      bypassDomain:\n          (json['bypassDomain'] as List<dynamic>?)\n              ?.map((e) => e as String)\n              .toList() ??\n          defaultBypassDomain,\n      routeMode:\n          $enumDecodeNullable(_$RouteModeEnumMap, json['routeMode']) ??\n          RouteMode.config,\n      autoSetSystemDns: json['autoSetSystemDns'] as bool? ?? true,\n      appendSystemDns: json['appendSystemDns'] as bool? ?? false,\n    );\n\nMap<String, dynamic> _$NetworkPropsToJson(_NetworkProps instance) =>\n    <String, dynamic>{\n      'systemProxy': instance.systemProxy,\n      'bypassDomain': instance.bypassDomain,\n      'routeMode': _$RouteModeEnumMap[instance.routeMode]!,\n      'autoSetSystemDns': instance.autoSetSystemDns,\n      'appendSystemDns': instance.appendSystemDns,\n    };\n\nconst _$RouteModeEnumMap = {\n  RouteMode.bypassPrivate: 'bypassPrivate',\n  RouteMode.config: 'config',\n};\n\n_ProxiesStyleProps _$ProxiesStylePropsFromJson(Map<String, dynamic> json) =>\n    _ProxiesStyleProps(\n      type:\n          $enumDecodeNullable(_$ProxiesTypeEnumMap, json['type']) ??\n          ProxiesType.tab,\n      sortType:\n          $enumDecodeNullable(_$ProxiesSortTypeEnumMap, json['sortType']) ??\n          ProxiesSortType.none,\n      layout:\n          $enumDecodeNullable(_$ProxiesLayoutEnumMap, json['layout']) ??\n          ProxiesLayout.standard,\n      iconStyle:\n          $enumDecodeNullable(_$ProxiesIconStyleEnumMap, json['iconStyle']) ??\n          ProxiesIconStyle.standard,\n      cardType:\n          $enumDecodeNullable(_$ProxyCardTypeEnumMap, json['cardType']) ??\n          ProxyCardType.expand,\n    );\n\nMap<String, dynamic> _$ProxiesStylePropsToJson(_ProxiesStyleProps instance) =>\n    <String, dynamic>{\n      'type': _$ProxiesTypeEnumMap[instance.type]!,\n      'sortType': _$ProxiesSortTypeEnumMap[instance.sortType]!,\n      'layout': _$ProxiesLayoutEnumMap[instance.layout]!,\n      'iconStyle': _$ProxiesIconStyleEnumMap[instance.iconStyle]!,\n      'cardType': _$ProxyCardTypeEnumMap[instance.cardType]!,\n    };\n\nconst _$ProxiesTypeEnumMap = {ProxiesType.tab: 'tab', ProxiesType.list: 'list'};\n\nconst _$ProxiesSortTypeEnumMap = {\n  ProxiesSortType.none: 'none',\n  ProxiesSortType.delay: 'delay',\n  ProxiesSortType.name: 'name',\n};\n\nconst _$ProxiesLayoutEnumMap = {\n  ProxiesLayout.loose: 'loose',\n  ProxiesLayout.standard: 'standard',\n  ProxiesLayout.tight: 'tight',\n};\n\nconst _$ProxiesIconStyleEnumMap = {\n  ProxiesIconStyle.none: 'none',\n  ProxiesIconStyle.standard: 'standard',\n  ProxiesIconStyle.icon: 'icon',\n};\n\nconst _$ProxyCardTypeEnumMap = {\n  ProxyCardType.expand: 'expand',\n  ProxyCardType.shrink: 'shrink',\n  ProxyCardType.min: 'min',\n};\n\n_TextScale _$TextScaleFromJson(Map<String, dynamic> json) => _TextScale(\n  enable: json['enable'] as bool? ?? false,\n  scale: (json['scale'] as num?)?.toDouble() ?? 1.0,\n);\n\nMap<String, dynamic> _$TextScaleToJson(_TextScale instance) =>\n    <String, dynamic>{'enable': instance.enable, 'scale': instance.scale};\n\n_ThemeProps _$ThemePropsFromJson(Map<String, dynamic> json) => _ThemeProps(\n  primaryColor: (json['primaryColor'] as num?)?.toInt(),\n  primaryColors:\n      (json['primaryColors'] as List<dynamic>?)\n          ?.map((e) => (e as num).toInt())\n          .toList() ??\n      defaultPrimaryColors,\n  themeMode:\n      $enumDecodeNullable(_$ThemeModeEnumMap, json['themeMode']) ??\n      ThemeMode.dark,\n  schemeVariant:\n      $enumDecodeNullable(\n        _$DynamicSchemeVariantEnumMap,\n        json['schemeVariant'],\n      ) ??\n      DynamicSchemeVariant.content,\n  pureBlack: json['pureBlack'] as bool? ?? false,\n  textScale: json['textScale'] == null\n      ? const TextScale()\n      : TextScale.fromJson(json['textScale'] as Map<String, dynamic>),\n);\n\nMap<String, dynamic> _$ThemePropsToJson(_ThemeProps instance) =>\n    <String, dynamic>{\n      'primaryColor': instance.primaryColor,\n      'primaryColors': instance.primaryColors,\n      'themeMode': _$ThemeModeEnumMap[instance.themeMode]!,\n      'schemeVariant': _$DynamicSchemeVariantEnumMap[instance.schemeVariant]!,\n      'pureBlack': instance.pureBlack,\n      'textScale': instance.textScale,\n    };\n\nconst _$ThemeModeEnumMap = {\n  ThemeMode.system: 'system',\n  ThemeMode.light: 'light',\n  ThemeMode.dark: 'dark',\n};\n\nconst _$DynamicSchemeVariantEnumMap = {\n  DynamicSchemeVariant.tonalSpot: 'tonalSpot',\n  DynamicSchemeVariant.fidelity: 'fidelity',\n  DynamicSchemeVariant.monochrome: 'monochrome',\n  DynamicSchemeVariant.neutral: 'neutral',\n  DynamicSchemeVariant.vibrant: 'vibrant',\n  DynamicSchemeVariant.expressive: 'expressive',\n  DynamicSchemeVariant.content: 'content',\n  DynamicSchemeVariant.rainbow: 'rainbow',\n  DynamicSchemeVariant.fruitSalad: 'fruitSalad',\n};\n\n_Config _$ConfigFromJson(Map<String, dynamic> json) => _Config(\n  currentProfileId: (json['currentProfileId'] as num?)?.toInt(),\n  overrideDns: json['overrideDns'] as bool? ?? false,\n  hotKeyActions:\n      (json['hotKeyActions'] as List<dynamic>?)\n          ?.map((e) => HotKeyAction.fromJson(e as Map<String, dynamic>))\n          .toList() ??\n      const [],\n  appSettingProps: json['appSettingProps'] == null\n      ? defaultAppSettingProps\n      : AppSettingProps.safeFromJson(\n          json['appSettingProps'] as Map<String, Object?>?,\n        ),\n  davProps: json['davProps'] == null\n      ? null\n      : DAVProps.fromJson(json['davProps'] as Map<String, dynamic>),\n  networkProps: json['networkProps'] == null\n      ? defaultNetworkProps\n      : NetworkProps.fromJson(json['networkProps'] as Map<String, dynamic>?),\n  vpnProps: json['vpnProps'] == null\n      ? defaultVpnProps\n      : VpnProps.fromJson(json['vpnProps'] as Map<String, dynamic>?),\n  themeProps: ThemeProps.safeFromJson(\n    json['themeProps'] as Map<String, Object?>?,\n  ),\n  proxiesStyleProps: json['proxiesStyleProps'] == null\n      ? defaultProxiesStyleProps\n      : ProxiesStyleProps.fromJson(\n          json['proxiesStyleProps'] as Map<String, dynamic>?,\n        ),\n  windowProps: json['windowProps'] == null\n      ? defaultWindowProps\n      : WindowProps.fromJson(json['windowProps'] as Map<String, dynamic>?),\n  patchClashConfig: json['patchClashConfig'] == null\n      ? defaultClashConfig\n      : ClashConfig.fromJson(json['patchClashConfig'] as Map<String, dynamic>),\n);\n\nMap<String, dynamic> _$ConfigToJson(_Config instance) => <String, dynamic>{\n  'currentProfileId': instance.currentProfileId,\n  'overrideDns': instance.overrideDns,\n  'hotKeyActions': instance.hotKeyActions,\n  'appSettingProps': instance.appSettingProps,\n  'davProps': instance.davProps,\n  'networkProps': instance.networkProps,\n  'vpnProps': instance.vpnProps,\n  'themeProps': instance.themeProps,\n  'proxiesStyleProps': instance.proxiesStyleProps,\n  'windowProps': instance.windowProps,\n  'patchClashConfig': instance.patchClashConfig,\n};\n"
  },
  {
    "path": "lib/models/generated/core.freezed.dart",
    "content": "// GENERATED CODE - DO NOT MODIFY BY HAND\n// coverage:ignore-file\n// ignore_for_file: type=lint\n// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark\n\npart of '../core.dart';\n\n// **************************************************************************\n// FreezedGenerator\n// **************************************************************************\n\n// dart format off\nT _$identity<T>(T value) => value;\n\n/// @nodoc\nmixin _$SetupParams {\n\n@JsonKey(name: 'selected-map') Map<String, String> get selectedMap;@JsonKey(name: 'test-url') String get testUrl;\n/// Create a copy of SetupParams\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$SetupParamsCopyWith<SetupParams> get copyWith => _$SetupParamsCopyWithImpl<SetupParams>(this as SetupParams, _$identity);\n\n  /// Serializes this SetupParams to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is SetupParams&&const DeepCollectionEquality().equals(other.selectedMap, selectedMap)&&(identical(other.testUrl, testUrl) || other.testUrl == testUrl));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(selectedMap),testUrl);\n\n@override\nString toString() {\n  return 'SetupParams(selectedMap: $selectedMap, testUrl: $testUrl)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $SetupParamsCopyWith<$Res>  {\n  factory $SetupParamsCopyWith(SetupParams value, $Res Function(SetupParams) _then) = _$SetupParamsCopyWithImpl;\n@useResult\n$Res call({\n@JsonKey(name: 'selected-map') Map<String, String> selectedMap,@JsonKey(name: 'test-url') String testUrl\n});\n\n\n\n\n}\n/// @nodoc\nclass _$SetupParamsCopyWithImpl<$Res>\n    implements $SetupParamsCopyWith<$Res> {\n  _$SetupParamsCopyWithImpl(this._self, this._then);\n\n  final SetupParams _self;\n  final $Res Function(SetupParams) _then;\n\n/// Create a copy of SetupParams\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? selectedMap = null,Object? testUrl = null,}) {\n  return _then(_self.copyWith(\nselectedMap: null == selectedMap ? _self.selectedMap : selectedMap // ignore: cast_nullable_to_non_nullable\nas Map<String, String>,testUrl: null == testUrl ? _self.testUrl : testUrl // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [SetupParams].\nextension SetupParamsPatterns on SetupParams {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SetupParams value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _SetupParams() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SetupParams value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _SetupParams():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SetupParams value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _SetupParams() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 'selected-map')  Map<String, String> selectedMap, @JsonKey(name: 'test-url')  String testUrl)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _SetupParams() when $default != null:\nreturn $default(_that.selectedMap,_that.testUrl);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 'selected-map')  Map<String, String> selectedMap, @JsonKey(name: 'test-url')  String testUrl)  $default,) {final _that = this;\nswitch (_that) {\ncase _SetupParams():\nreturn $default(_that.selectedMap,_that.testUrl);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 'selected-map')  Map<String, String> selectedMap, @JsonKey(name: 'test-url')  String testUrl)?  $default,) {final _that = this;\nswitch (_that) {\ncase _SetupParams() when $default != null:\nreturn $default(_that.selectedMap,_that.testUrl);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _SetupParams implements SetupParams {\n  const _SetupParams({@JsonKey(name: 'selected-map') required final  Map<String, String> selectedMap, @JsonKey(name: 'test-url') required this.testUrl}): _selectedMap = selectedMap;\n  factory _SetupParams.fromJson(Map<String, dynamic> json) => _$SetupParamsFromJson(json);\n\n final  Map<String, String> _selectedMap;\n@override@JsonKey(name: 'selected-map') Map<String, String> get selectedMap {\n  if (_selectedMap is EqualUnmodifiableMapView) return _selectedMap;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableMapView(_selectedMap);\n}\n\n@override@JsonKey(name: 'test-url') final  String testUrl;\n\n/// Create a copy of SetupParams\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$SetupParamsCopyWith<_SetupParams> get copyWith => __$SetupParamsCopyWithImpl<_SetupParams>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$SetupParamsToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _SetupParams&&const DeepCollectionEquality().equals(other._selectedMap, _selectedMap)&&(identical(other.testUrl, testUrl) || other.testUrl == testUrl));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_selectedMap),testUrl);\n\n@override\nString toString() {\n  return 'SetupParams(selectedMap: $selectedMap, testUrl: $testUrl)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$SetupParamsCopyWith<$Res> implements $SetupParamsCopyWith<$Res> {\n  factory _$SetupParamsCopyWith(_SetupParams value, $Res Function(_SetupParams) _then) = __$SetupParamsCopyWithImpl;\n@override @useResult\n$Res call({\n@JsonKey(name: 'selected-map') Map<String, String> selectedMap,@JsonKey(name: 'test-url') String testUrl\n});\n\n\n\n\n}\n/// @nodoc\nclass __$SetupParamsCopyWithImpl<$Res>\n    implements _$SetupParamsCopyWith<$Res> {\n  __$SetupParamsCopyWithImpl(this._self, this._then);\n\n  final _SetupParams _self;\n  final $Res Function(_SetupParams) _then;\n\n/// Create a copy of SetupParams\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? selectedMap = null,Object? testUrl = null,}) {\n  return _then(_SetupParams(\nselectedMap: null == selectedMap ? _self._selectedMap : selectedMap // ignore: cast_nullable_to_non_nullable\nas Map<String, String>,testUrl: null == testUrl ? _self.testUrl : testUrl // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$UpdateParams {\n\n Tun get tun;@JsonKey(name: 'mixed-port') int get mixedPort;@JsonKey(name: 'allow-lan') bool get allowLan;@JsonKey(name: 'find-process-mode') FindProcessMode get findProcessMode; Mode get mode;@JsonKey(name: 'log-level') LogLevel get logLevel; bool get ipv6;@JsonKey(name: 'tcp-concurrent') bool get tcpConcurrent;@JsonKey(name: 'external-controller') ExternalControllerStatus get externalController;@JsonKey(name: 'unified-delay') bool get unifiedDelay;\n/// Create a copy of UpdateParams\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$UpdateParamsCopyWith<UpdateParams> get copyWith => _$UpdateParamsCopyWithImpl<UpdateParams>(this as UpdateParams, _$identity);\n\n  /// Serializes this UpdateParams to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is UpdateParams&&(identical(other.tun, tun) || other.tun == tun)&&(identical(other.mixedPort, mixedPort) || other.mixedPort == mixedPort)&&(identical(other.allowLan, allowLan) || other.allowLan == allowLan)&&(identical(other.findProcessMode, findProcessMode) || other.findProcessMode == findProcessMode)&&(identical(other.mode, mode) || other.mode == mode)&&(identical(other.logLevel, logLevel) || other.logLevel == logLevel)&&(identical(other.ipv6, ipv6) || other.ipv6 == ipv6)&&(identical(other.tcpConcurrent, tcpConcurrent) || other.tcpConcurrent == tcpConcurrent)&&(identical(other.externalController, externalController) || other.externalController == externalController)&&(identical(other.unifiedDelay, unifiedDelay) || other.unifiedDelay == unifiedDelay));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,tun,mixedPort,allowLan,findProcessMode,mode,logLevel,ipv6,tcpConcurrent,externalController,unifiedDelay);\n\n@override\nString toString() {\n  return 'UpdateParams(tun: $tun, mixedPort: $mixedPort, allowLan: $allowLan, findProcessMode: $findProcessMode, mode: $mode, logLevel: $logLevel, ipv6: $ipv6, tcpConcurrent: $tcpConcurrent, externalController: $externalController, unifiedDelay: $unifiedDelay)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $UpdateParamsCopyWith<$Res>  {\n  factory $UpdateParamsCopyWith(UpdateParams value, $Res Function(UpdateParams) _then) = _$UpdateParamsCopyWithImpl;\n@useResult\n$Res call({\n Tun tun,@JsonKey(name: 'mixed-port') int mixedPort,@JsonKey(name: 'allow-lan') bool allowLan,@JsonKey(name: 'find-process-mode') FindProcessMode findProcessMode, Mode mode,@JsonKey(name: 'log-level') LogLevel logLevel, bool ipv6,@JsonKey(name: 'tcp-concurrent') bool tcpConcurrent,@JsonKey(name: 'external-controller') ExternalControllerStatus externalController,@JsonKey(name: 'unified-delay') bool unifiedDelay\n});\n\n\n$TunCopyWith<$Res> get tun;\n\n}\n/// @nodoc\nclass _$UpdateParamsCopyWithImpl<$Res>\n    implements $UpdateParamsCopyWith<$Res> {\n  _$UpdateParamsCopyWithImpl(this._self, this._then);\n\n  final UpdateParams _self;\n  final $Res Function(UpdateParams) _then;\n\n/// Create a copy of UpdateParams\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? tun = null,Object? mixedPort = null,Object? allowLan = null,Object? findProcessMode = null,Object? mode = null,Object? logLevel = null,Object? ipv6 = null,Object? tcpConcurrent = null,Object? externalController = null,Object? unifiedDelay = null,}) {\n  return _then(_self.copyWith(\ntun: null == tun ? _self.tun : tun // ignore: cast_nullable_to_non_nullable\nas Tun,mixedPort: null == mixedPort ? _self.mixedPort : mixedPort // ignore: cast_nullable_to_non_nullable\nas int,allowLan: null == allowLan ? _self.allowLan : allowLan // ignore: cast_nullable_to_non_nullable\nas bool,findProcessMode: null == findProcessMode ? _self.findProcessMode : findProcessMode // ignore: cast_nullable_to_non_nullable\nas FindProcessMode,mode: null == mode ? _self.mode : mode // ignore: cast_nullable_to_non_nullable\nas Mode,logLevel: null == logLevel ? _self.logLevel : logLevel // ignore: cast_nullable_to_non_nullable\nas LogLevel,ipv6: null == ipv6 ? _self.ipv6 : ipv6 // ignore: cast_nullable_to_non_nullable\nas bool,tcpConcurrent: null == tcpConcurrent ? _self.tcpConcurrent : tcpConcurrent // ignore: cast_nullable_to_non_nullable\nas bool,externalController: null == externalController ? _self.externalController : externalController // ignore: cast_nullable_to_non_nullable\nas ExternalControllerStatus,unifiedDelay: null == unifiedDelay ? _self.unifiedDelay : unifiedDelay // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n/// Create a copy of UpdateParams\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$TunCopyWith<$Res> get tun {\n  \n  return $TunCopyWith<$Res>(_self.tun, (value) {\n    return _then(_self.copyWith(tun: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [UpdateParams].\nextension UpdateParamsPatterns on UpdateParams {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _UpdateParams value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _UpdateParams() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _UpdateParams value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _UpdateParams():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _UpdateParams value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _UpdateParams() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( Tun tun, @JsonKey(name: 'mixed-port')  int mixedPort, @JsonKey(name: 'allow-lan')  bool allowLan, @JsonKey(name: 'find-process-mode')  FindProcessMode findProcessMode,  Mode mode, @JsonKey(name: 'log-level')  LogLevel logLevel,  bool ipv6, @JsonKey(name: 'tcp-concurrent')  bool tcpConcurrent, @JsonKey(name: 'external-controller')  ExternalControllerStatus externalController, @JsonKey(name: 'unified-delay')  bool unifiedDelay)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _UpdateParams() when $default != null:\nreturn $default(_that.tun,_that.mixedPort,_that.allowLan,_that.findProcessMode,_that.mode,_that.logLevel,_that.ipv6,_that.tcpConcurrent,_that.externalController,_that.unifiedDelay);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( Tun tun, @JsonKey(name: 'mixed-port')  int mixedPort, @JsonKey(name: 'allow-lan')  bool allowLan, @JsonKey(name: 'find-process-mode')  FindProcessMode findProcessMode,  Mode mode, @JsonKey(name: 'log-level')  LogLevel logLevel,  bool ipv6, @JsonKey(name: 'tcp-concurrent')  bool tcpConcurrent, @JsonKey(name: 'external-controller')  ExternalControllerStatus externalController, @JsonKey(name: 'unified-delay')  bool unifiedDelay)  $default,) {final _that = this;\nswitch (_that) {\ncase _UpdateParams():\nreturn $default(_that.tun,_that.mixedPort,_that.allowLan,_that.findProcessMode,_that.mode,_that.logLevel,_that.ipv6,_that.tcpConcurrent,_that.externalController,_that.unifiedDelay);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( Tun tun, @JsonKey(name: 'mixed-port')  int mixedPort, @JsonKey(name: 'allow-lan')  bool allowLan, @JsonKey(name: 'find-process-mode')  FindProcessMode findProcessMode,  Mode mode, @JsonKey(name: 'log-level')  LogLevel logLevel,  bool ipv6, @JsonKey(name: 'tcp-concurrent')  bool tcpConcurrent, @JsonKey(name: 'external-controller')  ExternalControllerStatus externalController, @JsonKey(name: 'unified-delay')  bool unifiedDelay)?  $default,) {final _that = this;\nswitch (_that) {\ncase _UpdateParams() when $default != null:\nreturn $default(_that.tun,_that.mixedPort,_that.allowLan,_that.findProcessMode,_that.mode,_that.logLevel,_that.ipv6,_that.tcpConcurrent,_that.externalController,_that.unifiedDelay);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _UpdateParams implements UpdateParams {\n  const _UpdateParams({required this.tun, @JsonKey(name: 'mixed-port') required this.mixedPort, @JsonKey(name: 'allow-lan') required this.allowLan, @JsonKey(name: 'find-process-mode') required this.findProcessMode, required this.mode, @JsonKey(name: 'log-level') required this.logLevel, required this.ipv6, @JsonKey(name: 'tcp-concurrent') required this.tcpConcurrent, @JsonKey(name: 'external-controller') required this.externalController, @JsonKey(name: 'unified-delay') required this.unifiedDelay});\n  factory _UpdateParams.fromJson(Map<String, dynamic> json) => _$UpdateParamsFromJson(json);\n\n@override final  Tun tun;\n@override@JsonKey(name: 'mixed-port') final  int mixedPort;\n@override@JsonKey(name: 'allow-lan') final  bool allowLan;\n@override@JsonKey(name: 'find-process-mode') final  FindProcessMode findProcessMode;\n@override final  Mode mode;\n@override@JsonKey(name: 'log-level') final  LogLevel logLevel;\n@override final  bool ipv6;\n@override@JsonKey(name: 'tcp-concurrent') final  bool tcpConcurrent;\n@override@JsonKey(name: 'external-controller') final  ExternalControllerStatus externalController;\n@override@JsonKey(name: 'unified-delay') final  bool unifiedDelay;\n\n/// Create a copy of UpdateParams\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$UpdateParamsCopyWith<_UpdateParams> get copyWith => __$UpdateParamsCopyWithImpl<_UpdateParams>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$UpdateParamsToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _UpdateParams&&(identical(other.tun, tun) || other.tun == tun)&&(identical(other.mixedPort, mixedPort) || other.mixedPort == mixedPort)&&(identical(other.allowLan, allowLan) || other.allowLan == allowLan)&&(identical(other.findProcessMode, findProcessMode) || other.findProcessMode == findProcessMode)&&(identical(other.mode, mode) || other.mode == mode)&&(identical(other.logLevel, logLevel) || other.logLevel == logLevel)&&(identical(other.ipv6, ipv6) || other.ipv6 == ipv6)&&(identical(other.tcpConcurrent, tcpConcurrent) || other.tcpConcurrent == tcpConcurrent)&&(identical(other.externalController, externalController) || other.externalController == externalController)&&(identical(other.unifiedDelay, unifiedDelay) || other.unifiedDelay == unifiedDelay));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,tun,mixedPort,allowLan,findProcessMode,mode,logLevel,ipv6,tcpConcurrent,externalController,unifiedDelay);\n\n@override\nString toString() {\n  return 'UpdateParams(tun: $tun, mixedPort: $mixedPort, allowLan: $allowLan, findProcessMode: $findProcessMode, mode: $mode, logLevel: $logLevel, ipv6: $ipv6, tcpConcurrent: $tcpConcurrent, externalController: $externalController, unifiedDelay: $unifiedDelay)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$UpdateParamsCopyWith<$Res> implements $UpdateParamsCopyWith<$Res> {\n  factory _$UpdateParamsCopyWith(_UpdateParams value, $Res Function(_UpdateParams) _then) = __$UpdateParamsCopyWithImpl;\n@override @useResult\n$Res call({\n Tun tun,@JsonKey(name: 'mixed-port') int mixedPort,@JsonKey(name: 'allow-lan') bool allowLan,@JsonKey(name: 'find-process-mode') FindProcessMode findProcessMode, Mode mode,@JsonKey(name: 'log-level') LogLevel logLevel, bool ipv6,@JsonKey(name: 'tcp-concurrent') bool tcpConcurrent,@JsonKey(name: 'external-controller') ExternalControllerStatus externalController,@JsonKey(name: 'unified-delay') bool unifiedDelay\n});\n\n\n@override $TunCopyWith<$Res> get tun;\n\n}\n/// @nodoc\nclass __$UpdateParamsCopyWithImpl<$Res>\n    implements _$UpdateParamsCopyWith<$Res> {\n  __$UpdateParamsCopyWithImpl(this._self, this._then);\n\n  final _UpdateParams _self;\n  final $Res Function(_UpdateParams) _then;\n\n/// Create a copy of UpdateParams\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? tun = null,Object? mixedPort = null,Object? allowLan = null,Object? findProcessMode = null,Object? mode = null,Object? logLevel = null,Object? ipv6 = null,Object? tcpConcurrent = null,Object? externalController = null,Object? unifiedDelay = null,}) {\n  return _then(_UpdateParams(\ntun: null == tun ? _self.tun : tun // ignore: cast_nullable_to_non_nullable\nas Tun,mixedPort: null == mixedPort ? _self.mixedPort : mixedPort // ignore: cast_nullable_to_non_nullable\nas int,allowLan: null == allowLan ? _self.allowLan : allowLan // ignore: cast_nullable_to_non_nullable\nas bool,findProcessMode: null == findProcessMode ? _self.findProcessMode : findProcessMode // ignore: cast_nullable_to_non_nullable\nas FindProcessMode,mode: null == mode ? _self.mode : mode // ignore: cast_nullable_to_non_nullable\nas Mode,logLevel: null == logLevel ? _self.logLevel : logLevel // ignore: cast_nullable_to_non_nullable\nas LogLevel,ipv6: null == ipv6 ? _self.ipv6 : ipv6 // ignore: cast_nullable_to_non_nullable\nas bool,tcpConcurrent: null == tcpConcurrent ? _self.tcpConcurrent : tcpConcurrent // ignore: cast_nullable_to_non_nullable\nas bool,externalController: null == externalController ? _self.externalController : externalController // ignore: cast_nullable_to_non_nullable\nas ExternalControllerStatus,unifiedDelay: null == unifiedDelay ? _self.unifiedDelay : unifiedDelay // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n/// Create a copy of UpdateParams\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$TunCopyWith<$Res> get tun {\n  \n  return $TunCopyWith<$Res>(_self.tun, (value) {\n    return _then(_self.copyWith(tun: value));\n  });\n}\n}\n\n\n/// @nodoc\nmixin _$VpnOptions {\n\n bool get enable; int get port; bool get ipv6; bool get dnsHijacking; AccessControlProps get accessControlProps; bool get allowBypass; bool get systemProxy; List<String> get bypassDomain; String get stack; List<String> get routeAddress;\n/// Create a copy of VpnOptions\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$VpnOptionsCopyWith<VpnOptions> get copyWith => _$VpnOptionsCopyWithImpl<VpnOptions>(this as VpnOptions, _$identity);\n\n  /// Serializes this VpnOptions to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is VpnOptions&&(identical(other.enable, enable) || other.enable == enable)&&(identical(other.port, port) || other.port == port)&&(identical(other.ipv6, ipv6) || other.ipv6 == ipv6)&&(identical(other.dnsHijacking, dnsHijacking) || other.dnsHijacking == dnsHijacking)&&(identical(other.accessControlProps, accessControlProps) || other.accessControlProps == accessControlProps)&&(identical(other.allowBypass, allowBypass) || other.allowBypass == allowBypass)&&(identical(other.systemProxy, systemProxy) || other.systemProxy == systemProxy)&&const DeepCollectionEquality().equals(other.bypassDomain, bypassDomain)&&(identical(other.stack, stack) || other.stack == stack)&&const DeepCollectionEquality().equals(other.routeAddress, routeAddress));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,enable,port,ipv6,dnsHijacking,accessControlProps,allowBypass,systemProxy,const DeepCollectionEquality().hash(bypassDomain),stack,const DeepCollectionEquality().hash(routeAddress));\n\n@override\nString toString() {\n  return 'VpnOptions(enable: $enable, port: $port, ipv6: $ipv6, dnsHijacking: $dnsHijacking, accessControlProps: $accessControlProps, allowBypass: $allowBypass, systemProxy: $systemProxy, bypassDomain: $bypassDomain, stack: $stack, routeAddress: $routeAddress)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $VpnOptionsCopyWith<$Res>  {\n  factory $VpnOptionsCopyWith(VpnOptions value, $Res Function(VpnOptions) _then) = _$VpnOptionsCopyWithImpl;\n@useResult\n$Res call({\n bool enable, int port, bool ipv6, bool dnsHijacking, AccessControlProps accessControlProps, bool allowBypass, bool systemProxy, List<String> bypassDomain, String stack, List<String> routeAddress\n});\n\n\n$AccessControlPropsCopyWith<$Res> get accessControlProps;\n\n}\n/// @nodoc\nclass _$VpnOptionsCopyWithImpl<$Res>\n    implements $VpnOptionsCopyWith<$Res> {\n  _$VpnOptionsCopyWithImpl(this._self, this._then);\n\n  final VpnOptions _self;\n  final $Res Function(VpnOptions) _then;\n\n/// Create a copy of VpnOptions\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? enable = null,Object? port = null,Object? ipv6 = null,Object? dnsHijacking = null,Object? accessControlProps = null,Object? allowBypass = null,Object? systemProxy = null,Object? bypassDomain = null,Object? stack = null,Object? routeAddress = null,}) {\n  return _then(_self.copyWith(\nenable: null == enable ? _self.enable : enable // ignore: cast_nullable_to_non_nullable\nas bool,port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable\nas int,ipv6: null == ipv6 ? _self.ipv6 : ipv6 // ignore: cast_nullable_to_non_nullable\nas bool,dnsHijacking: null == dnsHijacking ? _self.dnsHijacking : dnsHijacking // ignore: cast_nullable_to_non_nullable\nas bool,accessControlProps: null == accessControlProps ? _self.accessControlProps : accessControlProps // ignore: cast_nullable_to_non_nullable\nas AccessControlProps,allowBypass: null == allowBypass ? _self.allowBypass : allowBypass // ignore: cast_nullable_to_non_nullable\nas bool,systemProxy: null == systemProxy ? _self.systemProxy : systemProxy // ignore: cast_nullable_to_non_nullable\nas bool,bypassDomain: null == bypassDomain ? _self.bypassDomain : bypassDomain // ignore: cast_nullable_to_non_nullable\nas List<String>,stack: null == stack ? _self.stack : stack // ignore: cast_nullable_to_non_nullable\nas String,routeAddress: null == routeAddress ? _self.routeAddress : routeAddress // ignore: cast_nullable_to_non_nullable\nas List<String>,\n  ));\n}\n/// Create a copy of VpnOptions\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$AccessControlPropsCopyWith<$Res> get accessControlProps {\n  \n  return $AccessControlPropsCopyWith<$Res>(_self.accessControlProps, (value) {\n    return _then(_self.copyWith(accessControlProps: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [VpnOptions].\nextension VpnOptionsPatterns on VpnOptions {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _VpnOptions value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _VpnOptions() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _VpnOptions value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _VpnOptions():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _VpnOptions value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _VpnOptions() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool enable,  int port,  bool ipv6,  bool dnsHijacking,  AccessControlProps accessControlProps,  bool allowBypass,  bool systemProxy,  List<String> bypassDomain,  String stack,  List<String> routeAddress)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _VpnOptions() when $default != null:\nreturn $default(_that.enable,_that.port,_that.ipv6,_that.dnsHijacking,_that.accessControlProps,_that.allowBypass,_that.systemProxy,_that.bypassDomain,_that.stack,_that.routeAddress);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool enable,  int port,  bool ipv6,  bool dnsHijacking,  AccessControlProps accessControlProps,  bool allowBypass,  bool systemProxy,  List<String> bypassDomain,  String stack,  List<String> routeAddress)  $default,) {final _that = this;\nswitch (_that) {\ncase _VpnOptions():\nreturn $default(_that.enable,_that.port,_that.ipv6,_that.dnsHijacking,_that.accessControlProps,_that.allowBypass,_that.systemProxy,_that.bypassDomain,_that.stack,_that.routeAddress);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool enable,  int port,  bool ipv6,  bool dnsHijacking,  AccessControlProps accessControlProps,  bool allowBypass,  bool systemProxy,  List<String> bypassDomain,  String stack,  List<String> routeAddress)?  $default,) {final _that = this;\nswitch (_that) {\ncase _VpnOptions() when $default != null:\nreturn $default(_that.enable,_that.port,_that.ipv6,_that.dnsHijacking,_that.accessControlProps,_that.allowBypass,_that.systemProxy,_that.bypassDomain,_that.stack,_that.routeAddress);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _VpnOptions implements VpnOptions {\n  const _VpnOptions({required this.enable, required this.port, required this.ipv6, required this.dnsHijacking, required this.accessControlProps, required this.allowBypass, required this.systemProxy, required final  List<String> bypassDomain, required this.stack, final  List<String> routeAddress = const []}): _bypassDomain = bypassDomain,_routeAddress = routeAddress;\n  factory _VpnOptions.fromJson(Map<String, dynamic> json) => _$VpnOptionsFromJson(json);\n\n@override final  bool enable;\n@override final  int port;\n@override final  bool ipv6;\n@override final  bool dnsHijacking;\n@override final  AccessControlProps accessControlProps;\n@override final  bool allowBypass;\n@override final  bool systemProxy;\n final  List<String> _bypassDomain;\n@override List<String> get bypassDomain {\n  if (_bypassDomain is EqualUnmodifiableListView) return _bypassDomain;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_bypassDomain);\n}\n\n@override final  String stack;\n final  List<String> _routeAddress;\n@override@JsonKey() List<String> get routeAddress {\n  if (_routeAddress is EqualUnmodifiableListView) return _routeAddress;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_routeAddress);\n}\n\n\n/// Create a copy of VpnOptions\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$VpnOptionsCopyWith<_VpnOptions> get copyWith => __$VpnOptionsCopyWithImpl<_VpnOptions>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$VpnOptionsToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _VpnOptions&&(identical(other.enable, enable) || other.enable == enable)&&(identical(other.port, port) || other.port == port)&&(identical(other.ipv6, ipv6) || other.ipv6 == ipv6)&&(identical(other.dnsHijacking, dnsHijacking) || other.dnsHijacking == dnsHijacking)&&(identical(other.accessControlProps, accessControlProps) || other.accessControlProps == accessControlProps)&&(identical(other.allowBypass, allowBypass) || other.allowBypass == allowBypass)&&(identical(other.systemProxy, systemProxy) || other.systemProxy == systemProxy)&&const DeepCollectionEquality().equals(other._bypassDomain, _bypassDomain)&&(identical(other.stack, stack) || other.stack == stack)&&const DeepCollectionEquality().equals(other._routeAddress, _routeAddress));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,enable,port,ipv6,dnsHijacking,accessControlProps,allowBypass,systemProxy,const DeepCollectionEquality().hash(_bypassDomain),stack,const DeepCollectionEquality().hash(_routeAddress));\n\n@override\nString toString() {\n  return 'VpnOptions(enable: $enable, port: $port, ipv6: $ipv6, dnsHijacking: $dnsHijacking, accessControlProps: $accessControlProps, allowBypass: $allowBypass, systemProxy: $systemProxy, bypassDomain: $bypassDomain, stack: $stack, routeAddress: $routeAddress)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$VpnOptionsCopyWith<$Res> implements $VpnOptionsCopyWith<$Res> {\n  factory _$VpnOptionsCopyWith(_VpnOptions value, $Res Function(_VpnOptions) _then) = __$VpnOptionsCopyWithImpl;\n@override @useResult\n$Res call({\n bool enable, int port, bool ipv6, bool dnsHijacking, AccessControlProps accessControlProps, bool allowBypass, bool systemProxy, List<String> bypassDomain, String stack, List<String> routeAddress\n});\n\n\n@override $AccessControlPropsCopyWith<$Res> get accessControlProps;\n\n}\n/// @nodoc\nclass __$VpnOptionsCopyWithImpl<$Res>\n    implements _$VpnOptionsCopyWith<$Res> {\n  __$VpnOptionsCopyWithImpl(this._self, this._then);\n\n  final _VpnOptions _self;\n  final $Res Function(_VpnOptions) _then;\n\n/// Create a copy of VpnOptions\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? enable = null,Object? port = null,Object? ipv6 = null,Object? dnsHijacking = null,Object? accessControlProps = null,Object? allowBypass = null,Object? systemProxy = null,Object? bypassDomain = null,Object? stack = null,Object? routeAddress = null,}) {\n  return _then(_VpnOptions(\nenable: null == enable ? _self.enable : enable // ignore: cast_nullable_to_non_nullable\nas bool,port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable\nas int,ipv6: null == ipv6 ? _self.ipv6 : ipv6 // ignore: cast_nullable_to_non_nullable\nas bool,dnsHijacking: null == dnsHijacking ? _self.dnsHijacking : dnsHijacking // ignore: cast_nullable_to_non_nullable\nas bool,accessControlProps: null == accessControlProps ? _self.accessControlProps : accessControlProps // ignore: cast_nullable_to_non_nullable\nas AccessControlProps,allowBypass: null == allowBypass ? _self.allowBypass : allowBypass // ignore: cast_nullable_to_non_nullable\nas bool,systemProxy: null == systemProxy ? _self.systemProxy : systemProxy // ignore: cast_nullable_to_non_nullable\nas bool,bypassDomain: null == bypassDomain ? _self._bypassDomain : bypassDomain // ignore: cast_nullable_to_non_nullable\nas List<String>,stack: null == stack ? _self.stack : stack // ignore: cast_nullable_to_non_nullable\nas String,routeAddress: null == routeAddress ? _self._routeAddress : routeAddress // ignore: cast_nullable_to_non_nullable\nas List<String>,\n  ));\n}\n\n/// Create a copy of VpnOptions\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$AccessControlPropsCopyWith<$Res> get accessControlProps {\n  \n  return $AccessControlPropsCopyWith<$Res>(_self.accessControlProps, (value) {\n    return _then(_self.copyWith(accessControlProps: value));\n  });\n}\n}\n\n\n/// @nodoc\nmixin _$InitParams {\n\n@JsonKey(name: 'home-dir') String get homeDir; int get version;\n/// Create a copy of InitParams\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$InitParamsCopyWith<InitParams> get copyWith => _$InitParamsCopyWithImpl<InitParams>(this as InitParams, _$identity);\n\n  /// Serializes this InitParams to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is InitParams&&(identical(other.homeDir, homeDir) || other.homeDir == homeDir)&&(identical(other.version, version) || other.version == version));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,homeDir,version);\n\n@override\nString toString() {\n  return 'InitParams(homeDir: $homeDir, version: $version)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $InitParamsCopyWith<$Res>  {\n  factory $InitParamsCopyWith(InitParams value, $Res Function(InitParams) _then) = _$InitParamsCopyWithImpl;\n@useResult\n$Res call({\n@JsonKey(name: 'home-dir') String homeDir, int version\n});\n\n\n\n\n}\n/// @nodoc\nclass _$InitParamsCopyWithImpl<$Res>\n    implements $InitParamsCopyWith<$Res> {\n  _$InitParamsCopyWithImpl(this._self, this._then);\n\n  final InitParams _self;\n  final $Res Function(InitParams) _then;\n\n/// Create a copy of InitParams\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? homeDir = null,Object? version = null,}) {\n  return _then(_self.copyWith(\nhomeDir: null == homeDir ? _self.homeDir : homeDir // ignore: cast_nullable_to_non_nullable\nas String,version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [InitParams].\nextension InitParamsPatterns on InitParams {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _InitParams value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _InitParams() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _InitParams value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _InitParams():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _InitParams value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _InitParams() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 'home-dir')  String homeDir,  int version)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _InitParams() when $default != null:\nreturn $default(_that.homeDir,_that.version);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 'home-dir')  String homeDir,  int version)  $default,) {final _that = this;\nswitch (_that) {\ncase _InitParams():\nreturn $default(_that.homeDir,_that.version);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 'home-dir')  String homeDir,  int version)?  $default,) {final _that = this;\nswitch (_that) {\ncase _InitParams() when $default != null:\nreturn $default(_that.homeDir,_that.version);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _InitParams implements InitParams {\n  const _InitParams({@JsonKey(name: 'home-dir') required this.homeDir, required this.version});\n  factory _InitParams.fromJson(Map<String, dynamic> json) => _$InitParamsFromJson(json);\n\n@override@JsonKey(name: 'home-dir') final  String homeDir;\n@override final  int version;\n\n/// Create a copy of InitParams\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$InitParamsCopyWith<_InitParams> get copyWith => __$InitParamsCopyWithImpl<_InitParams>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$InitParamsToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _InitParams&&(identical(other.homeDir, homeDir) || other.homeDir == homeDir)&&(identical(other.version, version) || other.version == version));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,homeDir,version);\n\n@override\nString toString() {\n  return 'InitParams(homeDir: $homeDir, version: $version)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$InitParamsCopyWith<$Res> implements $InitParamsCopyWith<$Res> {\n  factory _$InitParamsCopyWith(_InitParams value, $Res Function(_InitParams) _then) = __$InitParamsCopyWithImpl;\n@override @useResult\n$Res call({\n@JsonKey(name: 'home-dir') String homeDir, int version\n});\n\n\n\n\n}\n/// @nodoc\nclass __$InitParamsCopyWithImpl<$Res>\n    implements _$InitParamsCopyWith<$Res> {\n  __$InitParamsCopyWithImpl(this._self, this._then);\n\n  final _InitParams _self;\n  final $Res Function(_InitParams) _then;\n\n/// Create a copy of InitParams\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? homeDir = null,Object? version = null,}) {\n  return _then(_InitParams(\nhomeDir: null == homeDir ? _self.homeDir : homeDir // ignore: cast_nullable_to_non_nullable\nas String,version: null == version ? _self.version : version // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$ChangeProxyParams {\n\n@JsonKey(name: 'group-name') String get groupName;@JsonKey(name: 'proxy-name') String get proxyName;\n/// Create a copy of ChangeProxyParams\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ChangeProxyParamsCopyWith<ChangeProxyParams> get copyWith => _$ChangeProxyParamsCopyWithImpl<ChangeProxyParams>(this as ChangeProxyParams, _$identity);\n\n  /// Serializes this ChangeProxyParams to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ChangeProxyParams&&(identical(other.groupName, groupName) || other.groupName == groupName)&&(identical(other.proxyName, proxyName) || other.proxyName == proxyName));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,groupName,proxyName);\n\n@override\nString toString() {\n  return 'ChangeProxyParams(groupName: $groupName, proxyName: $proxyName)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ChangeProxyParamsCopyWith<$Res>  {\n  factory $ChangeProxyParamsCopyWith(ChangeProxyParams value, $Res Function(ChangeProxyParams) _then) = _$ChangeProxyParamsCopyWithImpl;\n@useResult\n$Res call({\n@JsonKey(name: 'group-name') String groupName,@JsonKey(name: 'proxy-name') String proxyName\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ChangeProxyParamsCopyWithImpl<$Res>\n    implements $ChangeProxyParamsCopyWith<$Res> {\n  _$ChangeProxyParamsCopyWithImpl(this._self, this._then);\n\n  final ChangeProxyParams _self;\n  final $Res Function(ChangeProxyParams) _then;\n\n/// Create a copy of ChangeProxyParams\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? groupName = null,Object? proxyName = null,}) {\n  return _then(_self.copyWith(\ngroupName: null == groupName ? _self.groupName : groupName // ignore: cast_nullable_to_non_nullable\nas String,proxyName: null == proxyName ? _self.proxyName : proxyName // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [ChangeProxyParams].\nextension ChangeProxyParamsPatterns on ChangeProxyParams {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ChangeProxyParams value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ChangeProxyParams() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ChangeProxyParams value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ChangeProxyParams():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ChangeProxyParams value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ChangeProxyParams() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 'group-name')  String groupName, @JsonKey(name: 'proxy-name')  String proxyName)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ChangeProxyParams() when $default != null:\nreturn $default(_that.groupName,_that.proxyName);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 'group-name')  String groupName, @JsonKey(name: 'proxy-name')  String proxyName)  $default,) {final _that = this;\nswitch (_that) {\ncase _ChangeProxyParams():\nreturn $default(_that.groupName,_that.proxyName);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 'group-name')  String groupName, @JsonKey(name: 'proxy-name')  String proxyName)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ChangeProxyParams() when $default != null:\nreturn $default(_that.groupName,_that.proxyName);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _ChangeProxyParams implements ChangeProxyParams {\n  const _ChangeProxyParams({@JsonKey(name: 'group-name') required this.groupName, @JsonKey(name: 'proxy-name') required this.proxyName});\n  factory _ChangeProxyParams.fromJson(Map<String, dynamic> json) => _$ChangeProxyParamsFromJson(json);\n\n@override@JsonKey(name: 'group-name') final  String groupName;\n@override@JsonKey(name: 'proxy-name') final  String proxyName;\n\n/// Create a copy of ChangeProxyParams\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ChangeProxyParamsCopyWith<_ChangeProxyParams> get copyWith => __$ChangeProxyParamsCopyWithImpl<_ChangeProxyParams>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$ChangeProxyParamsToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ChangeProxyParams&&(identical(other.groupName, groupName) || other.groupName == groupName)&&(identical(other.proxyName, proxyName) || other.proxyName == proxyName));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,groupName,proxyName);\n\n@override\nString toString() {\n  return 'ChangeProxyParams(groupName: $groupName, proxyName: $proxyName)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ChangeProxyParamsCopyWith<$Res> implements $ChangeProxyParamsCopyWith<$Res> {\n  factory _$ChangeProxyParamsCopyWith(_ChangeProxyParams value, $Res Function(_ChangeProxyParams) _then) = __$ChangeProxyParamsCopyWithImpl;\n@override @useResult\n$Res call({\n@JsonKey(name: 'group-name') String groupName,@JsonKey(name: 'proxy-name') String proxyName\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ChangeProxyParamsCopyWithImpl<$Res>\n    implements _$ChangeProxyParamsCopyWith<$Res> {\n  __$ChangeProxyParamsCopyWithImpl(this._self, this._then);\n\n  final _ChangeProxyParams _self;\n  final $Res Function(_ChangeProxyParams) _then;\n\n/// Create a copy of ChangeProxyParams\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? groupName = null,Object? proxyName = null,}) {\n  return _then(_ChangeProxyParams(\ngroupName: null == groupName ? _self.groupName : groupName // ignore: cast_nullable_to_non_nullable\nas String,proxyName: null == proxyName ? _self.proxyName : proxyName // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$UpdateGeoDataParams {\n\n@JsonKey(name: 'geo-type') String get geoType;@JsonKey(name: 'geo-name') String get geoName;\n/// Create a copy of UpdateGeoDataParams\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$UpdateGeoDataParamsCopyWith<UpdateGeoDataParams> get copyWith => _$UpdateGeoDataParamsCopyWithImpl<UpdateGeoDataParams>(this as UpdateGeoDataParams, _$identity);\n\n  /// Serializes this UpdateGeoDataParams to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is UpdateGeoDataParams&&(identical(other.geoType, geoType) || other.geoType == geoType)&&(identical(other.geoName, geoName) || other.geoName == geoName));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,geoType,geoName);\n\n@override\nString toString() {\n  return 'UpdateGeoDataParams(geoType: $geoType, geoName: $geoName)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $UpdateGeoDataParamsCopyWith<$Res>  {\n  factory $UpdateGeoDataParamsCopyWith(UpdateGeoDataParams value, $Res Function(UpdateGeoDataParams) _then) = _$UpdateGeoDataParamsCopyWithImpl;\n@useResult\n$Res call({\n@JsonKey(name: 'geo-type') String geoType,@JsonKey(name: 'geo-name') String geoName\n});\n\n\n\n\n}\n/// @nodoc\nclass _$UpdateGeoDataParamsCopyWithImpl<$Res>\n    implements $UpdateGeoDataParamsCopyWith<$Res> {\n  _$UpdateGeoDataParamsCopyWithImpl(this._self, this._then);\n\n  final UpdateGeoDataParams _self;\n  final $Res Function(UpdateGeoDataParams) _then;\n\n/// Create a copy of UpdateGeoDataParams\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? geoType = null,Object? geoName = null,}) {\n  return _then(_self.copyWith(\ngeoType: null == geoType ? _self.geoType : geoType // ignore: cast_nullable_to_non_nullable\nas String,geoName: null == geoName ? _self.geoName : geoName // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [UpdateGeoDataParams].\nextension UpdateGeoDataParamsPatterns on UpdateGeoDataParams {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _UpdateGeoDataParams value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _UpdateGeoDataParams() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _UpdateGeoDataParams value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _UpdateGeoDataParams():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _UpdateGeoDataParams value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _UpdateGeoDataParams() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 'geo-type')  String geoType, @JsonKey(name: 'geo-name')  String geoName)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _UpdateGeoDataParams() when $default != null:\nreturn $default(_that.geoType,_that.geoName);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 'geo-type')  String geoType, @JsonKey(name: 'geo-name')  String geoName)  $default,) {final _that = this;\nswitch (_that) {\ncase _UpdateGeoDataParams():\nreturn $default(_that.geoType,_that.geoName);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 'geo-type')  String geoType, @JsonKey(name: 'geo-name')  String geoName)?  $default,) {final _that = this;\nswitch (_that) {\ncase _UpdateGeoDataParams() when $default != null:\nreturn $default(_that.geoType,_that.geoName);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _UpdateGeoDataParams implements UpdateGeoDataParams {\n  const _UpdateGeoDataParams({@JsonKey(name: 'geo-type') required this.geoType, @JsonKey(name: 'geo-name') required this.geoName});\n  factory _UpdateGeoDataParams.fromJson(Map<String, dynamic> json) => _$UpdateGeoDataParamsFromJson(json);\n\n@override@JsonKey(name: 'geo-type') final  String geoType;\n@override@JsonKey(name: 'geo-name') final  String geoName;\n\n/// Create a copy of UpdateGeoDataParams\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$UpdateGeoDataParamsCopyWith<_UpdateGeoDataParams> get copyWith => __$UpdateGeoDataParamsCopyWithImpl<_UpdateGeoDataParams>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$UpdateGeoDataParamsToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _UpdateGeoDataParams&&(identical(other.geoType, geoType) || other.geoType == geoType)&&(identical(other.geoName, geoName) || other.geoName == geoName));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,geoType,geoName);\n\n@override\nString toString() {\n  return 'UpdateGeoDataParams(geoType: $geoType, geoName: $geoName)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$UpdateGeoDataParamsCopyWith<$Res> implements $UpdateGeoDataParamsCopyWith<$Res> {\n  factory _$UpdateGeoDataParamsCopyWith(_UpdateGeoDataParams value, $Res Function(_UpdateGeoDataParams) _then) = __$UpdateGeoDataParamsCopyWithImpl;\n@override @useResult\n$Res call({\n@JsonKey(name: 'geo-type') String geoType,@JsonKey(name: 'geo-name') String geoName\n});\n\n\n\n\n}\n/// @nodoc\nclass __$UpdateGeoDataParamsCopyWithImpl<$Res>\n    implements _$UpdateGeoDataParamsCopyWith<$Res> {\n  __$UpdateGeoDataParamsCopyWithImpl(this._self, this._then);\n\n  final _UpdateGeoDataParams _self;\n  final $Res Function(_UpdateGeoDataParams) _then;\n\n/// Create a copy of UpdateGeoDataParams\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? geoType = null,Object? geoName = null,}) {\n  return _then(_UpdateGeoDataParams(\ngeoType: null == geoType ? _self.geoType : geoType // ignore: cast_nullable_to_non_nullable\nas String,geoName: null == geoName ? _self.geoName : geoName // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$CoreEvent {\n\n CoreEventType get type; dynamic get data;\n/// Create a copy of CoreEvent\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$CoreEventCopyWith<CoreEvent> get copyWith => _$CoreEventCopyWithImpl<CoreEvent>(this as CoreEvent, _$identity);\n\n  /// Serializes this CoreEvent to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is CoreEvent&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other.data, data));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,type,const DeepCollectionEquality().hash(data));\n\n@override\nString toString() {\n  return 'CoreEvent(type: $type, data: $data)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $CoreEventCopyWith<$Res>  {\n  factory $CoreEventCopyWith(CoreEvent value, $Res Function(CoreEvent) _then) = _$CoreEventCopyWithImpl;\n@useResult\n$Res call({\n CoreEventType type, dynamic data\n});\n\n\n\n\n}\n/// @nodoc\nclass _$CoreEventCopyWithImpl<$Res>\n    implements $CoreEventCopyWith<$Res> {\n  _$CoreEventCopyWithImpl(this._self, this._then);\n\n  final CoreEvent _self;\n  final $Res Function(CoreEvent) _then;\n\n/// Create a copy of CoreEvent\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? type = null,Object? data = freezed,}) {\n  return _then(_self.copyWith(\ntype: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable\nas CoreEventType,data: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable\nas dynamic,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [CoreEvent].\nextension CoreEventPatterns on CoreEvent {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _CoreEvent value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _CoreEvent() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _CoreEvent value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _CoreEvent():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _CoreEvent value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _CoreEvent() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( CoreEventType type,  dynamic data)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _CoreEvent() when $default != null:\nreturn $default(_that.type,_that.data);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( CoreEventType type,  dynamic data)  $default,) {final _that = this;\nswitch (_that) {\ncase _CoreEvent():\nreturn $default(_that.type,_that.data);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( CoreEventType type,  dynamic data)?  $default,) {final _that = this;\nswitch (_that) {\ncase _CoreEvent() when $default != null:\nreturn $default(_that.type,_that.data);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _CoreEvent implements CoreEvent {\n  const _CoreEvent({required this.type, this.data});\n  factory _CoreEvent.fromJson(Map<String, dynamic> json) => _$CoreEventFromJson(json);\n\n@override final  CoreEventType type;\n@override final  dynamic data;\n\n/// Create a copy of CoreEvent\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$CoreEventCopyWith<_CoreEvent> get copyWith => __$CoreEventCopyWithImpl<_CoreEvent>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$CoreEventToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _CoreEvent&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other.data, data));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,type,const DeepCollectionEquality().hash(data));\n\n@override\nString toString() {\n  return 'CoreEvent(type: $type, data: $data)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$CoreEventCopyWith<$Res> implements $CoreEventCopyWith<$Res> {\n  factory _$CoreEventCopyWith(_CoreEvent value, $Res Function(_CoreEvent) _then) = __$CoreEventCopyWithImpl;\n@override @useResult\n$Res call({\n CoreEventType type, dynamic data\n});\n\n\n\n\n}\n/// @nodoc\nclass __$CoreEventCopyWithImpl<$Res>\n    implements _$CoreEventCopyWith<$Res> {\n  __$CoreEventCopyWithImpl(this._self, this._then);\n\n  final _CoreEvent _self;\n  final $Res Function(_CoreEvent) _then;\n\n/// Create a copy of CoreEvent\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? type = null,Object? data = freezed,}) {\n  return _then(_CoreEvent(\ntype: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable\nas CoreEventType,data: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable\nas dynamic,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$InvokeMessage {\n\n InvokeMessageType get type; dynamic get data;\n/// Create a copy of InvokeMessage\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$InvokeMessageCopyWith<InvokeMessage> get copyWith => _$InvokeMessageCopyWithImpl<InvokeMessage>(this as InvokeMessage, _$identity);\n\n  /// Serializes this InvokeMessage to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is InvokeMessage&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other.data, data));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,type,const DeepCollectionEquality().hash(data));\n\n@override\nString toString() {\n  return 'InvokeMessage(type: $type, data: $data)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $InvokeMessageCopyWith<$Res>  {\n  factory $InvokeMessageCopyWith(InvokeMessage value, $Res Function(InvokeMessage) _then) = _$InvokeMessageCopyWithImpl;\n@useResult\n$Res call({\n InvokeMessageType type, dynamic data\n});\n\n\n\n\n}\n/// @nodoc\nclass _$InvokeMessageCopyWithImpl<$Res>\n    implements $InvokeMessageCopyWith<$Res> {\n  _$InvokeMessageCopyWithImpl(this._self, this._then);\n\n  final InvokeMessage _self;\n  final $Res Function(InvokeMessage) _then;\n\n/// Create a copy of InvokeMessage\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? type = null,Object? data = freezed,}) {\n  return _then(_self.copyWith(\ntype: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable\nas InvokeMessageType,data: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable\nas dynamic,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [InvokeMessage].\nextension InvokeMessagePatterns on InvokeMessage {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _InvokeMessage value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _InvokeMessage() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _InvokeMessage value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _InvokeMessage():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _InvokeMessage value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _InvokeMessage() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( InvokeMessageType type,  dynamic data)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _InvokeMessage() when $default != null:\nreturn $default(_that.type,_that.data);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( InvokeMessageType type,  dynamic data)  $default,) {final _that = this;\nswitch (_that) {\ncase _InvokeMessage():\nreturn $default(_that.type,_that.data);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( InvokeMessageType type,  dynamic data)?  $default,) {final _that = this;\nswitch (_that) {\ncase _InvokeMessage() when $default != null:\nreturn $default(_that.type,_that.data);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _InvokeMessage implements InvokeMessage {\n  const _InvokeMessage({required this.type, this.data});\n  factory _InvokeMessage.fromJson(Map<String, dynamic> json) => _$InvokeMessageFromJson(json);\n\n@override final  InvokeMessageType type;\n@override final  dynamic data;\n\n/// Create a copy of InvokeMessage\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$InvokeMessageCopyWith<_InvokeMessage> get copyWith => __$InvokeMessageCopyWithImpl<_InvokeMessage>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$InvokeMessageToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _InvokeMessage&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other.data, data));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,type,const DeepCollectionEquality().hash(data));\n\n@override\nString toString() {\n  return 'InvokeMessage(type: $type, data: $data)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$InvokeMessageCopyWith<$Res> implements $InvokeMessageCopyWith<$Res> {\n  factory _$InvokeMessageCopyWith(_InvokeMessage value, $Res Function(_InvokeMessage) _then) = __$InvokeMessageCopyWithImpl;\n@override @useResult\n$Res call({\n InvokeMessageType type, dynamic data\n});\n\n\n\n\n}\n/// @nodoc\nclass __$InvokeMessageCopyWithImpl<$Res>\n    implements _$InvokeMessageCopyWith<$Res> {\n  __$InvokeMessageCopyWithImpl(this._self, this._then);\n\n  final _InvokeMessage _self;\n  final $Res Function(_InvokeMessage) _then;\n\n/// Create a copy of InvokeMessage\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? type = null,Object? data = freezed,}) {\n  return _then(_InvokeMessage(\ntype: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable\nas InvokeMessageType,data: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable\nas dynamic,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$Delay {\n\n String get name; String get url; int? get value;\n/// Create a copy of Delay\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$DelayCopyWith<Delay> get copyWith => _$DelayCopyWithImpl<Delay>(this as Delay, _$identity);\n\n  /// Serializes this Delay to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is Delay&&(identical(other.name, name) || other.name == name)&&(identical(other.url, url) || other.url == url)&&(identical(other.value, value) || other.value == value));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,name,url,value);\n\n@override\nString toString() {\n  return 'Delay(name: $name, url: $url, value: $value)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $DelayCopyWith<$Res>  {\n  factory $DelayCopyWith(Delay value, $Res Function(Delay) _then) = _$DelayCopyWithImpl;\n@useResult\n$Res call({\n String name, String url, int? value\n});\n\n\n\n\n}\n/// @nodoc\nclass _$DelayCopyWithImpl<$Res>\n    implements $DelayCopyWith<$Res> {\n  _$DelayCopyWithImpl(this._self, this._then);\n\n  final Delay _self;\n  final $Res Function(Delay) _then;\n\n/// Create a copy of Delay\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? url = null,Object? value = freezed,}) {\n  return _then(_self.copyWith(\nname: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable\nas String,url: null == url ? _self.url : url // ignore: cast_nullable_to_non_nullable\nas String,value: freezed == value ? _self.value : value // ignore: cast_nullable_to_non_nullable\nas int?,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [Delay].\nextension DelayPatterns on Delay {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Delay value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _Delay() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Delay value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Delay():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Delay value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Delay() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String name,  String url,  int? value)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _Delay() when $default != null:\nreturn $default(_that.name,_that.url,_that.value);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String name,  String url,  int? value)  $default,) {final _that = this;\nswitch (_that) {\ncase _Delay():\nreturn $default(_that.name,_that.url,_that.value);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String name,  String url,  int? value)?  $default,) {final _that = this;\nswitch (_that) {\ncase _Delay() when $default != null:\nreturn $default(_that.name,_that.url,_that.value);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _Delay implements Delay {\n  const _Delay({required this.name, required this.url, this.value});\n  factory _Delay.fromJson(Map<String, dynamic> json) => _$DelayFromJson(json);\n\n@override final  String name;\n@override final  String url;\n@override final  int? value;\n\n/// Create a copy of Delay\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$DelayCopyWith<_Delay> get copyWith => __$DelayCopyWithImpl<_Delay>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$DelayToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Delay&&(identical(other.name, name) || other.name == name)&&(identical(other.url, url) || other.url == url)&&(identical(other.value, value) || other.value == value));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,name,url,value);\n\n@override\nString toString() {\n  return 'Delay(name: $name, url: $url, value: $value)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$DelayCopyWith<$Res> implements $DelayCopyWith<$Res> {\n  factory _$DelayCopyWith(_Delay value, $Res Function(_Delay) _then) = __$DelayCopyWithImpl;\n@override @useResult\n$Res call({\n String name, String url, int? value\n});\n\n\n\n\n}\n/// @nodoc\nclass __$DelayCopyWithImpl<$Res>\n    implements _$DelayCopyWith<$Res> {\n  __$DelayCopyWithImpl(this._self, this._then);\n\n  final _Delay _self;\n  final $Res Function(_Delay) _then;\n\n/// Create a copy of Delay\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? url = null,Object? value = freezed,}) {\n  return _then(_Delay(\nname: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable\nas String,url: null == url ? _self.url : url // ignore: cast_nullable_to_non_nullable\nas String,value: freezed == value ? _self.value : value // ignore: cast_nullable_to_non_nullable\nas int?,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$Now {\n\n String get name; String get value;\n/// Create a copy of Now\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$NowCopyWith<Now> get copyWith => _$NowCopyWithImpl<Now>(this as Now, _$identity);\n\n  /// Serializes this Now to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is Now&&(identical(other.name, name) || other.name == name)&&(identical(other.value, value) || other.value == value));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,name,value);\n\n@override\nString toString() {\n  return 'Now(name: $name, value: $value)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $NowCopyWith<$Res>  {\n  factory $NowCopyWith(Now value, $Res Function(Now) _then) = _$NowCopyWithImpl;\n@useResult\n$Res call({\n String name, String value\n});\n\n\n\n\n}\n/// @nodoc\nclass _$NowCopyWithImpl<$Res>\n    implements $NowCopyWith<$Res> {\n  _$NowCopyWithImpl(this._self, this._then);\n\n  final Now _self;\n  final $Res Function(Now) _then;\n\n/// Create a copy of Now\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? value = null,}) {\n  return _then(_self.copyWith(\nname: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable\nas String,value: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [Now].\nextension NowPatterns on Now {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Now value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _Now() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Now value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Now():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Now value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Now() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String name,  String value)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _Now() when $default != null:\nreturn $default(_that.name,_that.value);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String name,  String value)  $default,) {final _that = this;\nswitch (_that) {\ncase _Now():\nreturn $default(_that.name,_that.value);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String name,  String value)?  $default,) {final _that = this;\nswitch (_that) {\ncase _Now() when $default != null:\nreturn $default(_that.name,_that.value);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _Now implements Now {\n  const _Now({required this.name, required this.value});\n  factory _Now.fromJson(Map<String, dynamic> json) => _$NowFromJson(json);\n\n@override final  String name;\n@override final  String value;\n\n/// Create a copy of Now\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$NowCopyWith<_Now> get copyWith => __$NowCopyWithImpl<_Now>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$NowToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Now&&(identical(other.name, name) || other.name == name)&&(identical(other.value, value) || other.value == value));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,name,value);\n\n@override\nString toString() {\n  return 'Now(name: $name, value: $value)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$NowCopyWith<$Res> implements $NowCopyWith<$Res> {\n  factory _$NowCopyWith(_Now value, $Res Function(_Now) _then) = __$NowCopyWithImpl;\n@override @useResult\n$Res call({\n String name, String value\n});\n\n\n\n\n}\n/// @nodoc\nclass __$NowCopyWithImpl<$Res>\n    implements _$NowCopyWith<$Res> {\n  __$NowCopyWithImpl(this._self, this._then);\n\n  final _Now _self;\n  final $Res Function(_Now) _then;\n\n/// Create a copy of Now\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? value = null,}) {\n  return _then(_Now(\nname: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable\nas String,value: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$ProviderSubscriptionInfo {\n\n@JsonKey(name: 'UPLOAD') int get upload;@JsonKey(name: 'DOWNLOAD') int get download;@JsonKey(name: 'TOTAL') int get total;@JsonKey(name: 'EXPIRE') int get expire;\n/// Create a copy of ProviderSubscriptionInfo\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ProviderSubscriptionInfoCopyWith<ProviderSubscriptionInfo> get copyWith => _$ProviderSubscriptionInfoCopyWithImpl<ProviderSubscriptionInfo>(this as ProviderSubscriptionInfo, _$identity);\n\n  /// Serializes this ProviderSubscriptionInfo to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ProviderSubscriptionInfo&&(identical(other.upload, upload) || other.upload == upload)&&(identical(other.download, download) || other.download == download)&&(identical(other.total, total) || other.total == total)&&(identical(other.expire, expire) || other.expire == expire));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,upload,download,total,expire);\n\n@override\nString toString() {\n  return 'ProviderSubscriptionInfo(upload: $upload, download: $download, total: $total, expire: $expire)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ProviderSubscriptionInfoCopyWith<$Res>  {\n  factory $ProviderSubscriptionInfoCopyWith(ProviderSubscriptionInfo value, $Res Function(ProviderSubscriptionInfo) _then) = _$ProviderSubscriptionInfoCopyWithImpl;\n@useResult\n$Res call({\n@JsonKey(name: 'UPLOAD') int upload,@JsonKey(name: 'DOWNLOAD') int download,@JsonKey(name: 'TOTAL') int total,@JsonKey(name: 'EXPIRE') int expire\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ProviderSubscriptionInfoCopyWithImpl<$Res>\n    implements $ProviderSubscriptionInfoCopyWith<$Res> {\n  _$ProviderSubscriptionInfoCopyWithImpl(this._self, this._then);\n\n  final ProviderSubscriptionInfo _self;\n  final $Res Function(ProviderSubscriptionInfo) _then;\n\n/// Create a copy of ProviderSubscriptionInfo\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? upload = null,Object? download = null,Object? total = null,Object? expire = null,}) {\n  return _then(_self.copyWith(\nupload: null == upload ? _self.upload : upload // ignore: cast_nullable_to_non_nullable\nas int,download: null == download ? _self.download : download // ignore: cast_nullable_to_non_nullable\nas int,total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable\nas int,expire: null == expire ? _self.expire : expire // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [ProviderSubscriptionInfo].\nextension ProviderSubscriptionInfoPatterns on ProviderSubscriptionInfo {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ProviderSubscriptionInfo value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ProviderSubscriptionInfo() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ProviderSubscriptionInfo value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProviderSubscriptionInfo():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ProviderSubscriptionInfo value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProviderSubscriptionInfo() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 'UPLOAD')  int upload, @JsonKey(name: 'DOWNLOAD')  int download, @JsonKey(name: 'TOTAL')  int total, @JsonKey(name: 'EXPIRE')  int expire)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ProviderSubscriptionInfo() when $default != null:\nreturn $default(_that.upload,_that.download,_that.total,_that.expire);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 'UPLOAD')  int upload, @JsonKey(name: 'DOWNLOAD')  int download, @JsonKey(name: 'TOTAL')  int total, @JsonKey(name: 'EXPIRE')  int expire)  $default,) {final _that = this;\nswitch (_that) {\ncase _ProviderSubscriptionInfo():\nreturn $default(_that.upload,_that.download,_that.total,_that.expire);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 'UPLOAD')  int upload, @JsonKey(name: 'DOWNLOAD')  int download, @JsonKey(name: 'TOTAL')  int total, @JsonKey(name: 'EXPIRE')  int expire)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ProviderSubscriptionInfo() when $default != null:\nreturn $default(_that.upload,_that.download,_that.total,_that.expire);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _ProviderSubscriptionInfo implements ProviderSubscriptionInfo {\n  const _ProviderSubscriptionInfo({@JsonKey(name: 'UPLOAD') this.upload = 0, @JsonKey(name: 'DOWNLOAD') this.download = 0, @JsonKey(name: 'TOTAL') this.total = 0, @JsonKey(name: 'EXPIRE') this.expire = 0});\n  factory _ProviderSubscriptionInfo.fromJson(Map<String, dynamic> json) => _$ProviderSubscriptionInfoFromJson(json);\n\n@override@JsonKey(name: 'UPLOAD') final  int upload;\n@override@JsonKey(name: 'DOWNLOAD') final  int download;\n@override@JsonKey(name: 'TOTAL') final  int total;\n@override@JsonKey(name: 'EXPIRE') final  int expire;\n\n/// Create a copy of ProviderSubscriptionInfo\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ProviderSubscriptionInfoCopyWith<_ProviderSubscriptionInfo> get copyWith => __$ProviderSubscriptionInfoCopyWithImpl<_ProviderSubscriptionInfo>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$ProviderSubscriptionInfoToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProviderSubscriptionInfo&&(identical(other.upload, upload) || other.upload == upload)&&(identical(other.download, download) || other.download == download)&&(identical(other.total, total) || other.total == total)&&(identical(other.expire, expire) || other.expire == expire));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,upload,download,total,expire);\n\n@override\nString toString() {\n  return 'ProviderSubscriptionInfo(upload: $upload, download: $download, total: $total, expire: $expire)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ProviderSubscriptionInfoCopyWith<$Res> implements $ProviderSubscriptionInfoCopyWith<$Res> {\n  factory _$ProviderSubscriptionInfoCopyWith(_ProviderSubscriptionInfo value, $Res Function(_ProviderSubscriptionInfo) _then) = __$ProviderSubscriptionInfoCopyWithImpl;\n@override @useResult\n$Res call({\n@JsonKey(name: 'UPLOAD') int upload,@JsonKey(name: 'DOWNLOAD') int download,@JsonKey(name: 'TOTAL') int total,@JsonKey(name: 'EXPIRE') int expire\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ProviderSubscriptionInfoCopyWithImpl<$Res>\n    implements _$ProviderSubscriptionInfoCopyWith<$Res> {\n  __$ProviderSubscriptionInfoCopyWithImpl(this._self, this._then);\n\n  final _ProviderSubscriptionInfo _self;\n  final $Res Function(_ProviderSubscriptionInfo) _then;\n\n/// Create a copy of ProviderSubscriptionInfo\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? upload = null,Object? download = null,Object? total = null,Object? expire = null,}) {\n  return _then(_ProviderSubscriptionInfo(\nupload: null == upload ? _self.upload : upload // ignore: cast_nullable_to_non_nullable\nas int,download: null == download ? _self.download : download // ignore: cast_nullable_to_non_nullable\nas int,total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable\nas int,expire: null == expire ? _self.expire : expire // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$ExternalProvider {\n\n String get name; String get type; String? get path; int get count;@JsonKey(name: 'subscription-info', fromJson: subscriptionInfoFormCore) SubscriptionInfo? get subscriptionInfo;@JsonKey(name: 'vehicle-type') String get vehicleType;@JsonKey(name: 'update-at') DateTime get updateAt;\n/// Create a copy of ExternalProvider\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ExternalProviderCopyWith<ExternalProvider> get copyWith => _$ExternalProviderCopyWithImpl<ExternalProvider>(this as ExternalProvider, _$identity);\n\n  /// Serializes this ExternalProvider to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ExternalProvider&&(identical(other.name, name) || other.name == name)&&(identical(other.type, type) || other.type == type)&&(identical(other.path, path) || other.path == path)&&(identical(other.count, count) || other.count == count)&&(identical(other.subscriptionInfo, subscriptionInfo) || other.subscriptionInfo == subscriptionInfo)&&(identical(other.vehicleType, vehicleType) || other.vehicleType == vehicleType)&&(identical(other.updateAt, updateAt) || other.updateAt == updateAt));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,name,type,path,count,subscriptionInfo,vehicleType,updateAt);\n\n@override\nString toString() {\n  return 'ExternalProvider(name: $name, type: $type, path: $path, count: $count, subscriptionInfo: $subscriptionInfo, vehicleType: $vehicleType, updateAt: $updateAt)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ExternalProviderCopyWith<$Res>  {\n  factory $ExternalProviderCopyWith(ExternalProvider value, $Res Function(ExternalProvider) _then) = _$ExternalProviderCopyWithImpl;\n@useResult\n$Res call({\n String name, String type, String? path, int count,@JsonKey(name: 'subscription-info', fromJson: subscriptionInfoFormCore) SubscriptionInfo? subscriptionInfo,@JsonKey(name: 'vehicle-type') String vehicleType,@JsonKey(name: 'update-at') DateTime updateAt\n});\n\n\n$SubscriptionInfoCopyWith<$Res>? get subscriptionInfo;\n\n}\n/// @nodoc\nclass _$ExternalProviderCopyWithImpl<$Res>\n    implements $ExternalProviderCopyWith<$Res> {\n  _$ExternalProviderCopyWithImpl(this._self, this._then);\n\n  final ExternalProvider _self;\n  final $Res Function(ExternalProvider) _then;\n\n/// Create a copy of ExternalProvider\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? type = null,Object? path = freezed,Object? count = null,Object? subscriptionInfo = freezed,Object? vehicleType = null,Object? updateAt = null,}) {\n  return _then(_self.copyWith(\nname: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable\nas String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable\nas String,path: freezed == path ? _self.path : path // ignore: cast_nullable_to_non_nullable\nas String?,count: null == count ? _self.count : count // ignore: cast_nullable_to_non_nullable\nas int,subscriptionInfo: freezed == subscriptionInfo ? _self.subscriptionInfo : subscriptionInfo // ignore: cast_nullable_to_non_nullable\nas SubscriptionInfo?,vehicleType: null == vehicleType ? _self.vehicleType : vehicleType // ignore: cast_nullable_to_non_nullable\nas String,updateAt: null == updateAt ? _self.updateAt : updateAt // ignore: cast_nullable_to_non_nullable\nas DateTime,\n  ));\n}\n/// Create a copy of ExternalProvider\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$SubscriptionInfoCopyWith<$Res>? get subscriptionInfo {\n    if (_self.subscriptionInfo == null) {\n    return null;\n  }\n\n  return $SubscriptionInfoCopyWith<$Res>(_self.subscriptionInfo!, (value) {\n    return _then(_self.copyWith(subscriptionInfo: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [ExternalProvider].\nextension ExternalProviderPatterns on ExternalProvider {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ExternalProvider value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ExternalProvider() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ExternalProvider value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ExternalProvider():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ExternalProvider value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ExternalProvider() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String name,  String type,  String? path,  int count, @JsonKey(name: 'subscription-info', fromJson: subscriptionInfoFormCore)  SubscriptionInfo? subscriptionInfo, @JsonKey(name: 'vehicle-type')  String vehicleType, @JsonKey(name: 'update-at')  DateTime updateAt)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ExternalProvider() when $default != null:\nreturn $default(_that.name,_that.type,_that.path,_that.count,_that.subscriptionInfo,_that.vehicleType,_that.updateAt);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String name,  String type,  String? path,  int count, @JsonKey(name: 'subscription-info', fromJson: subscriptionInfoFormCore)  SubscriptionInfo? subscriptionInfo, @JsonKey(name: 'vehicle-type')  String vehicleType, @JsonKey(name: 'update-at')  DateTime updateAt)  $default,) {final _that = this;\nswitch (_that) {\ncase _ExternalProvider():\nreturn $default(_that.name,_that.type,_that.path,_that.count,_that.subscriptionInfo,_that.vehicleType,_that.updateAt);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String name,  String type,  String? path,  int count, @JsonKey(name: 'subscription-info', fromJson: subscriptionInfoFormCore)  SubscriptionInfo? subscriptionInfo, @JsonKey(name: 'vehicle-type')  String vehicleType, @JsonKey(name: 'update-at')  DateTime updateAt)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ExternalProvider() when $default != null:\nreturn $default(_that.name,_that.type,_that.path,_that.count,_that.subscriptionInfo,_that.vehicleType,_that.updateAt);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _ExternalProvider implements ExternalProvider {\n  const _ExternalProvider({required this.name, required this.type, this.path, required this.count, @JsonKey(name: 'subscription-info', fromJson: subscriptionInfoFormCore) this.subscriptionInfo, @JsonKey(name: 'vehicle-type') required this.vehicleType, @JsonKey(name: 'update-at') required this.updateAt});\n  factory _ExternalProvider.fromJson(Map<String, dynamic> json) => _$ExternalProviderFromJson(json);\n\n@override final  String name;\n@override final  String type;\n@override final  String? path;\n@override final  int count;\n@override@JsonKey(name: 'subscription-info', fromJson: subscriptionInfoFormCore) final  SubscriptionInfo? subscriptionInfo;\n@override@JsonKey(name: 'vehicle-type') final  String vehicleType;\n@override@JsonKey(name: 'update-at') final  DateTime updateAt;\n\n/// Create a copy of ExternalProvider\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ExternalProviderCopyWith<_ExternalProvider> get copyWith => __$ExternalProviderCopyWithImpl<_ExternalProvider>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$ExternalProviderToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ExternalProvider&&(identical(other.name, name) || other.name == name)&&(identical(other.type, type) || other.type == type)&&(identical(other.path, path) || other.path == path)&&(identical(other.count, count) || other.count == count)&&(identical(other.subscriptionInfo, subscriptionInfo) || other.subscriptionInfo == subscriptionInfo)&&(identical(other.vehicleType, vehicleType) || other.vehicleType == vehicleType)&&(identical(other.updateAt, updateAt) || other.updateAt == updateAt));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,name,type,path,count,subscriptionInfo,vehicleType,updateAt);\n\n@override\nString toString() {\n  return 'ExternalProvider(name: $name, type: $type, path: $path, count: $count, subscriptionInfo: $subscriptionInfo, vehicleType: $vehicleType, updateAt: $updateAt)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ExternalProviderCopyWith<$Res> implements $ExternalProviderCopyWith<$Res> {\n  factory _$ExternalProviderCopyWith(_ExternalProvider value, $Res Function(_ExternalProvider) _then) = __$ExternalProviderCopyWithImpl;\n@override @useResult\n$Res call({\n String name, String type, String? path, int count,@JsonKey(name: 'subscription-info', fromJson: subscriptionInfoFormCore) SubscriptionInfo? subscriptionInfo,@JsonKey(name: 'vehicle-type') String vehicleType,@JsonKey(name: 'update-at') DateTime updateAt\n});\n\n\n@override $SubscriptionInfoCopyWith<$Res>? get subscriptionInfo;\n\n}\n/// @nodoc\nclass __$ExternalProviderCopyWithImpl<$Res>\n    implements _$ExternalProviderCopyWith<$Res> {\n  __$ExternalProviderCopyWithImpl(this._self, this._then);\n\n  final _ExternalProvider _self;\n  final $Res Function(_ExternalProvider) _then;\n\n/// Create a copy of ExternalProvider\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? type = null,Object? path = freezed,Object? count = null,Object? subscriptionInfo = freezed,Object? vehicleType = null,Object? updateAt = null,}) {\n  return _then(_ExternalProvider(\nname: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable\nas String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable\nas String,path: freezed == path ? _self.path : path // ignore: cast_nullable_to_non_nullable\nas String?,count: null == count ? _self.count : count // ignore: cast_nullable_to_non_nullable\nas int,subscriptionInfo: freezed == subscriptionInfo ? _self.subscriptionInfo : subscriptionInfo // ignore: cast_nullable_to_non_nullable\nas SubscriptionInfo?,vehicleType: null == vehicleType ? _self.vehicleType : vehicleType // ignore: cast_nullable_to_non_nullable\nas String,updateAt: null == updateAt ? _self.updateAt : updateAt // ignore: cast_nullable_to_non_nullable\nas DateTime,\n  ));\n}\n\n/// Create a copy of ExternalProvider\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$SubscriptionInfoCopyWith<$Res>? get subscriptionInfo {\n    if (_self.subscriptionInfo == null) {\n    return null;\n  }\n\n  return $SubscriptionInfoCopyWith<$Res>(_self.subscriptionInfo!, (value) {\n    return _then(_self.copyWith(subscriptionInfo: value));\n  });\n}\n}\n\n\n/// @nodoc\nmixin _$Action {\n\n ActionMethod get method; dynamic get data; String get id;\n/// Create a copy of Action\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ActionCopyWith<Action> get copyWith => _$ActionCopyWithImpl<Action>(this as Action, _$identity);\n\n  /// Serializes this Action to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is Action&&(identical(other.method, method) || other.method == method)&&const DeepCollectionEquality().equals(other.data, data)&&(identical(other.id, id) || other.id == id));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,method,const DeepCollectionEquality().hash(data),id);\n\n@override\nString toString() {\n  return 'Action(method: $method, data: $data, id: $id)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ActionCopyWith<$Res>  {\n  factory $ActionCopyWith(Action value, $Res Function(Action) _then) = _$ActionCopyWithImpl;\n@useResult\n$Res call({\n ActionMethod method, dynamic data, String id\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ActionCopyWithImpl<$Res>\n    implements $ActionCopyWith<$Res> {\n  _$ActionCopyWithImpl(this._self, this._then);\n\n  final Action _self;\n  final $Res Function(Action) _then;\n\n/// Create a copy of Action\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? method = null,Object? data = freezed,Object? id = null,}) {\n  return _then(_self.copyWith(\nmethod: null == method ? _self.method : method // ignore: cast_nullable_to_non_nullable\nas ActionMethod,data: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable\nas dynamic,id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [Action].\nextension ActionPatterns on Action {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Action value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _Action() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Action value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Action():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Action value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Action() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( ActionMethod method,  dynamic data,  String id)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _Action() when $default != null:\nreturn $default(_that.method,_that.data,_that.id);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( ActionMethod method,  dynamic data,  String id)  $default,) {final _that = this;\nswitch (_that) {\ncase _Action():\nreturn $default(_that.method,_that.data,_that.id);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( ActionMethod method,  dynamic data,  String id)?  $default,) {final _that = this;\nswitch (_that) {\ncase _Action() when $default != null:\nreturn $default(_that.method,_that.data,_that.id);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _Action implements Action {\n  const _Action({required this.method, required this.data, required this.id});\n  factory _Action.fromJson(Map<String, dynamic> json) => _$ActionFromJson(json);\n\n@override final  ActionMethod method;\n@override final  dynamic data;\n@override final  String id;\n\n/// Create a copy of Action\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ActionCopyWith<_Action> get copyWith => __$ActionCopyWithImpl<_Action>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$ActionToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Action&&(identical(other.method, method) || other.method == method)&&const DeepCollectionEquality().equals(other.data, data)&&(identical(other.id, id) || other.id == id));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,method,const DeepCollectionEquality().hash(data),id);\n\n@override\nString toString() {\n  return 'Action(method: $method, data: $data, id: $id)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ActionCopyWith<$Res> implements $ActionCopyWith<$Res> {\n  factory _$ActionCopyWith(_Action value, $Res Function(_Action) _then) = __$ActionCopyWithImpl;\n@override @useResult\n$Res call({\n ActionMethod method, dynamic data, String id\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ActionCopyWithImpl<$Res>\n    implements _$ActionCopyWith<$Res> {\n  __$ActionCopyWithImpl(this._self, this._then);\n\n  final _Action _self;\n  final $Res Function(_Action) _then;\n\n/// Create a copy of Action\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? method = null,Object? data = freezed,Object? id = null,}) {\n  return _then(_Action(\nmethod: null == method ? _self.method : method // ignore: cast_nullable_to_non_nullable\nas ActionMethod,data: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable\nas dynamic,id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$ProxiesData {\n\n Map<String, dynamic> get proxies; List<String> get all;\n/// Create a copy of ProxiesData\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ProxiesDataCopyWith<ProxiesData> get copyWith => _$ProxiesDataCopyWithImpl<ProxiesData>(this as ProxiesData, _$identity);\n\n  /// Serializes this ProxiesData to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ProxiesData&&const DeepCollectionEquality().equals(other.proxies, proxies)&&const DeepCollectionEquality().equals(other.all, all));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(proxies),const DeepCollectionEquality().hash(all));\n\n@override\nString toString() {\n  return 'ProxiesData(proxies: $proxies, all: $all)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ProxiesDataCopyWith<$Res>  {\n  factory $ProxiesDataCopyWith(ProxiesData value, $Res Function(ProxiesData) _then) = _$ProxiesDataCopyWithImpl;\n@useResult\n$Res call({\n Map<String, dynamic> proxies, List<String> all\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ProxiesDataCopyWithImpl<$Res>\n    implements $ProxiesDataCopyWith<$Res> {\n  _$ProxiesDataCopyWithImpl(this._self, this._then);\n\n  final ProxiesData _self;\n  final $Res Function(ProxiesData) _then;\n\n/// Create a copy of ProxiesData\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? proxies = null,Object? all = null,}) {\n  return _then(_self.copyWith(\nproxies: null == proxies ? _self.proxies : proxies // ignore: cast_nullable_to_non_nullable\nas Map<String, dynamic>,all: null == all ? _self.all : all // ignore: cast_nullable_to_non_nullable\nas List<String>,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [ProxiesData].\nextension ProxiesDataPatterns on ProxiesData {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ProxiesData value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ProxiesData() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ProxiesData value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProxiesData():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ProxiesData value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProxiesData() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( Map<String, dynamic> proxies,  List<String> all)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ProxiesData() when $default != null:\nreturn $default(_that.proxies,_that.all);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( Map<String, dynamic> proxies,  List<String> all)  $default,) {final _that = this;\nswitch (_that) {\ncase _ProxiesData():\nreturn $default(_that.proxies,_that.all);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( Map<String, dynamic> proxies,  List<String> all)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ProxiesData() when $default != null:\nreturn $default(_that.proxies,_that.all);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _ProxiesData implements ProxiesData {\n  const _ProxiesData({required final  Map<String, dynamic> proxies, required final  List<String> all}): _proxies = proxies,_all = all;\n  factory _ProxiesData.fromJson(Map<String, dynamic> json) => _$ProxiesDataFromJson(json);\n\n final  Map<String, dynamic> _proxies;\n@override Map<String, dynamic> get proxies {\n  if (_proxies is EqualUnmodifiableMapView) return _proxies;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableMapView(_proxies);\n}\n\n final  List<String> _all;\n@override List<String> get all {\n  if (_all is EqualUnmodifiableListView) return _all;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_all);\n}\n\n\n/// Create a copy of ProxiesData\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ProxiesDataCopyWith<_ProxiesData> get copyWith => __$ProxiesDataCopyWithImpl<_ProxiesData>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$ProxiesDataToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProxiesData&&const DeepCollectionEquality().equals(other._proxies, _proxies)&&const DeepCollectionEquality().equals(other._all, _all));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_proxies),const DeepCollectionEquality().hash(_all));\n\n@override\nString toString() {\n  return 'ProxiesData(proxies: $proxies, all: $all)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ProxiesDataCopyWith<$Res> implements $ProxiesDataCopyWith<$Res> {\n  factory _$ProxiesDataCopyWith(_ProxiesData value, $Res Function(_ProxiesData) _then) = __$ProxiesDataCopyWithImpl;\n@override @useResult\n$Res call({\n Map<String, dynamic> proxies, List<String> all\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ProxiesDataCopyWithImpl<$Res>\n    implements _$ProxiesDataCopyWith<$Res> {\n  __$ProxiesDataCopyWithImpl(this._self, this._then);\n\n  final _ProxiesData _self;\n  final $Res Function(_ProxiesData) _then;\n\n/// Create a copy of ProxiesData\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? proxies = null,Object? all = null,}) {\n  return _then(_ProxiesData(\nproxies: null == proxies ? _self._proxies : proxies // ignore: cast_nullable_to_non_nullable\nas Map<String, dynamic>,all: null == all ? _self._all : all // ignore: cast_nullable_to_non_nullable\nas List<String>,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$ActionResult {\n\n ActionMethod get method; dynamic get data; String? get id; ResultType get code;\n/// Create a copy of ActionResult\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ActionResultCopyWith<ActionResult> get copyWith => _$ActionResultCopyWithImpl<ActionResult>(this as ActionResult, _$identity);\n\n  /// Serializes this ActionResult to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ActionResult&&(identical(other.method, method) || other.method == method)&&const DeepCollectionEquality().equals(other.data, data)&&(identical(other.id, id) || other.id == id)&&(identical(other.code, code) || other.code == code));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,method,const DeepCollectionEquality().hash(data),id,code);\n\n@override\nString toString() {\n  return 'ActionResult(method: $method, data: $data, id: $id, code: $code)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ActionResultCopyWith<$Res>  {\n  factory $ActionResultCopyWith(ActionResult value, $Res Function(ActionResult) _then) = _$ActionResultCopyWithImpl;\n@useResult\n$Res call({\n ActionMethod method, dynamic data, String? id, ResultType code\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ActionResultCopyWithImpl<$Res>\n    implements $ActionResultCopyWith<$Res> {\n  _$ActionResultCopyWithImpl(this._self, this._then);\n\n  final ActionResult _self;\n  final $Res Function(ActionResult) _then;\n\n/// Create a copy of ActionResult\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? method = null,Object? data = freezed,Object? id = freezed,Object? code = null,}) {\n  return _then(_self.copyWith(\nmethod: null == method ? _self.method : method // ignore: cast_nullable_to_non_nullable\nas ActionMethod,data: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable\nas dynamic,id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable\nas String?,code: null == code ? _self.code : code // ignore: cast_nullable_to_non_nullable\nas ResultType,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [ActionResult].\nextension ActionResultPatterns on ActionResult {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ActionResult value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ActionResult() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ActionResult value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ActionResult():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ActionResult value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ActionResult() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( ActionMethod method,  dynamic data,  String? id,  ResultType code)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ActionResult() when $default != null:\nreturn $default(_that.method,_that.data,_that.id,_that.code);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( ActionMethod method,  dynamic data,  String? id,  ResultType code)  $default,) {final _that = this;\nswitch (_that) {\ncase _ActionResult():\nreturn $default(_that.method,_that.data,_that.id,_that.code);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( ActionMethod method,  dynamic data,  String? id,  ResultType code)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ActionResult() when $default != null:\nreturn $default(_that.method,_that.data,_that.id,_that.code);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _ActionResult implements ActionResult {\n  const _ActionResult({required this.method, required this.data, this.id, this.code = ResultType.success});\n  factory _ActionResult.fromJson(Map<String, dynamic> json) => _$ActionResultFromJson(json);\n\n@override final  ActionMethod method;\n@override final  dynamic data;\n@override final  String? id;\n@override@JsonKey() final  ResultType code;\n\n/// Create a copy of ActionResult\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ActionResultCopyWith<_ActionResult> get copyWith => __$ActionResultCopyWithImpl<_ActionResult>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$ActionResultToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ActionResult&&(identical(other.method, method) || other.method == method)&&const DeepCollectionEquality().equals(other.data, data)&&(identical(other.id, id) || other.id == id)&&(identical(other.code, code) || other.code == code));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,method,const DeepCollectionEquality().hash(data),id,code);\n\n@override\nString toString() {\n  return 'ActionResult(method: $method, data: $data, id: $id, code: $code)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ActionResultCopyWith<$Res> implements $ActionResultCopyWith<$Res> {\n  factory _$ActionResultCopyWith(_ActionResult value, $Res Function(_ActionResult) _then) = __$ActionResultCopyWithImpl;\n@override @useResult\n$Res call({\n ActionMethod method, dynamic data, String? id, ResultType code\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ActionResultCopyWithImpl<$Res>\n    implements _$ActionResultCopyWith<$Res> {\n  __$ActionResultCopyWithImpl(this._self, this._then);\n\n  final _ActionResult _self;\n  final $Res Function(_ActionResult) _then;\n\n/// Create a copy of ActionResult\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? method = null,Object? data = freezed,Object? id = freezed,Object? code = null,}) {\n  return _then(_ActionResult(\nmethod: null == method ? _self.method : method // ignore: cast_nullable_to_non_nullable\nas ActionMethod,data: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable\nas dynamic,id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable\nas String?,code: null == code ? _self.code : code // ignore: cast_nullable_to_non_nullable\nas ResultType,\n  ));\n}\n\n\n}\n\n// dart format on\n"
  },
  {
    "path": "lib/models/generated/core.g.dart",
    "content": "// GENERATED CODE - DO NOT MODIFY BY HAND\n\npart of '../core.dart';\n\n// **************************************************************************\n// JsonSerializableGenerator\n// **************************************************************************\n\n_SetupParams _$SetupParamsFromJson(Map<String, dynamic> json) => _SetupParams(\n  selectedMap: Map<String, String>.from(json['selected-map'] as Map),\n  testUrl: json['test-url'] as String,\n);\n\nMap<String, dynamic> _$SetupParamsToJson(_SetupParams instance) =>\n    <String, dynamic>{\n      'selected-map': instance.selectedMap,\n      'test-url': instance.testUrl,\n    };\n\n_UpdateParams _$UpdateParamsFromJson(Map<String, dynamic> json) =>\n    _UpdateParams(\n      tun: Tun.fromJson(json['tun'] as Map<String, dynamic>),\n      mixedPort: (json['mixed-port'] as num).toInt(),\n      allowLan: json['allow-lan'] as bool,\n      findProcessMode: $enumDecode(\n        _$FindProcessModeEnumMap,\n        json['find-process-mode'],\n      ),\n      mode: $enumDecode(_$ModeEnumMap, json['mode']),\n      logLevel: $enumDecode(_$LogLevelEnumMap, json['log-level']),\n      ipv6: json['ipv6'] as bool,\n      tcpConcurrent: json['tcp-concurrent'] as bool,\n      externalController: $enumDecode(\n        _$ExternalControllerStatusEnumMap,\n        json['external-controller'],\n      ),\n      unifiedDelay: json['unified-delay'] as bool,\n    );\n\nMap<String, dynamic> _$UpdateParamsToJson(_UpdateParams instance) =>\n    <String, dynamic>{\n      'tun': instance.tun,\n      'mixed-port': instance.mixedPort,\n      'allow-lan': instance.allowLan,\n      'find-process-mode': _$FindProcessModeEnumMap[instance.findProcessMode]!,\n      'mode': _$ModeEnumMap[instance.mode]!,\n      'log-level': _$LogLevelEnumMap[instance.logLevel]!,\n      'ipv6': instance.ipv6,\n      'tcp-concurrent': instance.tcpConcurrent,\n      'external-controller':\n          _$ExternalControllerStatusEnumMap[instance.externalController]!,\n      'unified-delay': instance.unifiedDelay,\n    };\n\nconst _$FindProcessModeEnumMap = {\n  FindProcessMode.always: 'always',\n  FindProcessMode.off: 'off',\n};\n\nconst _$ModeEnumMap = {\n  Mode.rule: 'rule',\n  Mode.global: 'global',\n  Mode.direct: 'direct',\n};\n\nconst _$LogLevelEnumMap = {\n  LogLevel.debug: 'debug',\n  LogLevel.info: 'info',\n  LogLevel.warning: 'warning',\n  LogLevel.error: 'error',\n  LogLevel.silent: 'silent',\n};\n\nconst _$ExternalControllerStatusEnumMap = {\n  ExternalControllerStatus.close: '',\n  ExternalControllerStatus.open: '127.0.0.1:9090',\n};\n\n_VpnOptions _$VpnOptionsFromJson(Map<String, dynamic> json) => _VpnOptions(\n  enable: json['enable'] as bool,\n  port: (json['port'] as num).toInt(),\n  ipv6: json['ipv6'] as bool,\n  dnsHijacking: json['dnsHijacking'] as bool,\n  accessControlProps: AccessControlProps.fromJson(\n    json['accessControlProps'] as Map<String, dynamic>,\n  ),\n  allowBypass: json['allowBypass'] as bool,\n  systemProxy: json['systemProxy'] as bool,\n  bypassDomain: (json['bypassDomain'] as List<dynamic>)\n      .map((e) => e as String)\n      .toList(),\n  stack: json['stack'] as String,\n  routeAddress:\n      (json['routeAddress'] as List<dynamic>?)\n          ?.map((e) => e as String)\n          .toList() ??\n      const [],\n);\n\nMap<String, dynamic> _$VpnOptionsToJson(_VpnOptions instance) =>\n    <String, dynamic>{\n      'enable': instance.enable,\n      'port': instance.port,\n      'ipv6': instance.ipv6,\n      'dnsHijacking': instance.dnsHijacking,\n      'accessControlProps': instance.accessControlProps,\n      'allowBypass': instance.allowBypass,\n      'systemProxy': instance.systemProxy,\n      'bypassDomain': instance.bypassDomain,\n      'stack': instance.stack,\n      'routeAddress': instance.routeAddress,\n    };\n\n_InitParams _$InitParamsFromJson(Map<String, dynamic> json) => _InitParams(\n  homeDir: json['home-dir'] as String,\n  version: (json['version'] as num).toInt(),\n);\n\nMap<String, dynamic> _$InitParamsToJson(_InitParams instance) =>\n    <String, dynamic>{\n      'home-dir': instance.homeDir,\n      'version': instance.version,\n    };\n\n_ChangeProxyParams _$ChangeProxyParamsFromJson(Map<String, dynamic> json) =>\n    _ChangeProxyParams(\n      groupName: json['group-name'] as String,\n      proxyName: json['proxy-name'] as String,\n    );\n\nMap<String, dynamic> _$ChangeProxyParamsToJson(_ChangeProxyParams instance) =>\n    <String, dynamic>{\n      'group-name': instance.groupName,\n      'proxy-name': instance.proxyName,\n    };\n\n_UpdateGeoDataParams _$UpdateGeoDataParamsFromJson(Map<String, dynamic> json) =>\n    _UpdateGeoDataParams(\n      geoType: json['geo-type'] as String,\n      geoName: json['geo-name'] as String,\n    );\n\nMap<String, dynamic> _$UpdateGeoDataParamsToJson(\n  _UpdateGeoDataParams instance,\n) => <String, dynamic>{\n  'geo-type': instance.geoType,\n  'geo-name': instance.geoName,\n};\n\n_CoreEvent _$CoreEventFromJson(Map<String, dynamic> json) => _CoreEvent(\n  type: $enumDecode(_$CoreEventTypeEnumMap, json['type']),\n  data: json['data'],\n);\n\nMap<String, dynamic> _$CoreEventToJson(_CoreEvent instance) =>\n    <String, dynamic>{\n      'type': _$CoreEventTypeEnumMap[instance.type]!,\n      'data': instance.data,\n    };\n\nconst _$CoreEventTypeEnumMap = {\n  CoreEventType.log: 'log',\n  CoreEventType.delay: 'delay',\n  CoreEventType.request: 'request',\n  CoreEventType.loaded: 'loaded',\n  CoreEventType.crash: 'crash',\n};\n\n_InvokeMessage _$InvokeMessageFromJson(Map<String, dynamic> json) =>\n    _InvokeMessage(\n      type: $enumDecode(_$InvokeMessageTypeEnumMap, json['type']),\n      data: json['data'],\n    );\n\nMap<String, dynamic> _$InvokeMessageToJson(_InvokeMessage instance) =>\n    <String, dynamic>{\n      'type': _$InvokeMessageTypeEnumMap[instance.type]!,\n      'data': instance.data,\n    };\n\nconst _$InvokeMessageTypeEnumMap = {\n  InvokeMessageType.protect: 'protect',\n  InvokeMessageType.process: 'process',\n};\n\n_Delay _$DelayFromJson(Map<String, dynamic> json) => _Delay(\n  name: json['name'] as String,\n  url: json['url'] as String,\n  value: (json['value'] as num?)?.toInt(),\n);\n\nMap<String, dynamic> _$DelayToJson(_Delay instance) => <String, dynamic>{\n  'name': instance.name,\n  'url': instance.url,\n  'value': instance.value,\n};\n\n_Now _$NowFromJson(Map<String, dynamic> json) =>\n    _Now(name: json['name'] as String, value: json['value'] as String);\n\nMap<String, dynamic> _$NowToJson(_Now instance) => <String, dynamic>{\n  'name': instance.name,\n  'value': instance.value,\n};\n\n_ProviderSubscriptionInfo _$ProviderSubscriptionInfoFromJson(\n  Map<String, dynamic> json,\n) => _ProviderSubscriptionInfo(\n  upload: (json['UPLOAD'] as num?)?.toInt() ?? 0,\n  download: (json['DOWNLOAD'] as num?)?.toInt() ?? 0,\n  total: (json['TOTAL'] as num?)?.toInt() ?? 0,\n  expire: (json['EXPIRE'] as num?)?.toInt() ?? 0,\n);\n\nMap<String, dynamic> _$ProviderSubscriptionInfoToJson(\n  _ProviderSubscriptionInfo instance,\n) => <String, dynamic>{\n  'UPLOAD': instance.upload,\n  'DOWNLOAD': instance.download,\n  'TOTAL': instance.total,\n  'EXPIRE': instance.expire,\n};\n\n_ExternalProvider _$ExternalProviderFromJson(Map<String, dynamic> json) =>\n    _ExternalProvider(\n      name: json['name'] as String,\n      type: json['type'] as String,\n      path: json['path'] as String?,\n      count: (json['count'] as num).toInt(),\n      subscriptionInfo: subscriptionInfoFormCore(\n        json['subscription-info'] as Map<String, Object?>?,\n      ),\n      vehicleType: json['vehicle-type'] as String,\n      updateAt: DateTime.parse(json['update-at'] as String),\n    );\n\nMap<String, dynamic> _$ExternalProviderToJson(_ExternalProvider instance) =>\n    <String, dynamic>{\n      'name': instance.name,\n      'type': instance.type,\n      'path': instance.path,\n      'count': instance.count,\n      'subscription-info': instance.subscriptionInfo,\n      'vehicle-type': instance.vehicleType,\n      'update-at': instance.updateAt.toIso8601String(),\n    };\n\n_Action _$ActionFromJson(Map<String, dynamic> json) => _Action(\n  method: $enumDecode(_$ActionMethodEnumMap, json['method']),\n  data: json['data'],\n  id: json['id'] as String,\n);\n\nMap<String, dynamic> _$ActionToJson(_Action instance) => <String, dynamic>{\n  'method': _$ActionMethodEnumMap[instance.method]!,\n  'data': instance.data,\n  'id': instance.id,\n};\n\nconst _$ActionMethodEnumMap = {\n  ActionMethod.message: 'message',\n  ActionMethod.initClash: 'initClash',\n  ActionMethod.getIsInit: 'getIsInit',\n  ActionMethod.forceGc: 'forceGc',\n  ActionMethod.shutdown: 'shutdown',\n  ActionMethod.validateConfig: 'validateConfig',\n  ActionMethod.updateConfig: 'updateConfig',\n  ActionMethod.getConfig: 'getConfig',\n  ActionMethod.getProxies: 'getProxies',\n  ActionMethod.changeProxy: 'changeProxy',\n  ActionMethod.getTraffic: 'getTraffic',\n  ActionMethod.getTotalTraffic: 'getTotalTraffic',\n  ActionMethod.resetTraffic: 'resetTraffic',\n  ActionMethod.asyncTestDelay: 'asyncTestDelay',\n  ActionMethod.getConnections: 'getConnections',\n  ActionMethod.closeConnections: 'closeConnections',\n  ActionMethod.resetConnections: 'resetConnections',\n  ActionMethod.closeConnection: 'closeConnection',\n  ActionMethod.getExternalProviders: 'getExternalProviders',\n  ActionMethod.getExternalProvider: 'getExternalProvider',\n  ActionMethod.updateGeoData: 'updateGeoData',\n  ActionMethod.updateExternalProvider: 'updateExternalProvider',\n  ActionMethod.sideLoadExternalProvider: 'sideLoadExternalProvider',\n  ActionMethod.startLog: 'startLog',\n  ActionMethod.stopLog: 'stopLog',\n  ActionMethod.startListener: 'startListener',\n  ActionMethod.stopListener: 'stopListener',\n  ActionMethod.getCountryCode: 'getCountryCode',\n  ActionMethod.getMemory: 'getMemory',\n  ActionMethod.crash: 'crash',\n  ActionMethod.setupConfig: 'setupConfig',\n  ActionMethod.deleteFile: 'deleteFile',\n  ActionMethod.setState: 'setState',\n  ActionMethod.startTun: 'startTun',\n  ActionMethod.stopTun: 'stopTun',\n  ActionMethod.getRunTime: 'getRunTime',\n  ActionMethod.updateDns: 'updateDns',\n  ActionMethod.getAndroidVpnOptions: 'getAndroidVpnOptions',\n  ActionMethod.getCurrentProfileName: 'getCurrentProfileName',\n};\n\n_ProxiesData _$ProxiesDataFromJson(Map<String, dynamic> json) => _ProxiesData(\n  proxies: json['proxies'] as Map<String, dynamic>,\n  all: (json['all'] as List<dynamic>).map((e) => e as String).toList(),\n);\n\nMap<String, dynamic> _$ProxiesDataToJson(_ProxiesData instance) =>\n    <String, dynamic>{'proxies': instance.proxies, 'all': instance.all};\n\n_ActionResult _$ActionResultFromJson(Map<String, dynamic> json) =>\n    _ActionResult(\n      method: $enumDecode(_$ActionMethodEnumMap, json['method']),\n      data: json['data'],\n      id: json['id'] as String?,\n      code:\n          $enumDecodeNullable(_$ResultTypeEnumMap, json['code']) ??\n          ResultType.success,\n    );\n\nMap<String, dynamic> _$ActionResultToJson(_ActionResult instance) =>\n    <String, dynamic>{\n      'method': _$ActionMethodEnumMap[instance.method]!,\n      'data': instance.data,\n      'id': instance.id,\n      'code': _$ResultTypeEnumMap[instance.code]!,\n    };\n\nconst _$ResultTypeEnumMap = {ResultType.success: 0, ResultType.error: -1};\n"
  },
  {
    "path": "lib/models/generated/profile.freezed.dart",
    "content": "// GENERATED CODE - DO NOT MODIFY BY HAND\n// coverage:ignore-file\n// ignore_for_file: type=lint\n// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark\n\npart of '../profile.dart';\n\n// **************************************************************************\n// FreezedGenerator\n// **************************************************************************\n\n// dart format off\nT _$identity<T>(T value) => value;\n\n/// @nodoc\nmixin _$SubscriptionInfo {\n\n int get upload; int get download; int get total; int get expire;\n/// Create a copy of SubscriptionInfo\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$SubscriptionInfoCopyWith<SubscriptionInfo> get copyWith => _$SubscriptionInfoCopyWithImpl<SubscriptionInfo>(this as SubscriptionInfo, _$identity);\n\n  /// Serializes this SubscriptionInfo to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is SubscriptionInfo&&(identical(other.upload, upload) || other.upload == upload)&&(identical(other.download, download) || other.download == download)&&(identical(other.total, total) || other.total == total)&&(identical(other.expire, expire) || other.expire == expire));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,upload,download,total,expire);\n\n@override\nString toString() {\n  return 'SubscriptionInfo(upload: $upload, download: $download, total: $total, expire: $expire)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $SubscriptionInfoCopyWith<$Res>  {\n  factory $SubscriptionInfoCopyWith(SubscriptionInfo value, $Res Function(SubscriptionInfo) _then) = _$SubscriptionInfoCopyWithImpl;\n@useResult\n$Res call({\n int upload, int download, int total, int expire\n});\n\n\n\n\n}\n/// @nodoc\nclass _$SubscriptionInfoCopyWithImpl<$Res>\n    implements $SubscriptionInfoCopyWith<$Res> {\n  _$SubscriptionInfoCopyWithImpl(this._self, this._then);\n\n  final SubscriptionInfo _self;\n  final $Res Function(SubscriptionInfo) _then;\n\n/// Create a copy of SubscriptionInfo\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? upload = null,Object? download = null,Object? total = null,Object? expire = null,}) {\n  return _then(_self.copyWith(\nupload: null == upload ? _self.upload : upload // ignore: cast_nullable_to_non_nullable\nas int,download: null == download ? _self.download : download // ignore: cast_nullable_to_non_nullable\nas int,total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable\nas int,expire: null == expire ? _self.expire : expire // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [SubscriptionInfo].\nextension SubscriptionInfoPatterns on SubscriptionInfo {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SubscriptionInfo value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _SubscriptionInfo() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SubscriptionInfo value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _SubscriptionInfo():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SubscriptionInfo value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _SubscriptionInfo() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int upload,  int download,  int total,  int expire)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _SubscriptionInfo() when $default != null:\nreturn $default(_that.upload,_that.download,_that.total,_that.expire);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int upload,  int download,  int total,  int expire)  $default,) {final _that = this;\nswitch (_that) {\ncase _SubscriptionInfo():\nreturn $default(_that.upload,_that.download,_that.total,_that.expire);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int upload,  int download,  int total,  int expire)?  $default,) {final _that = this;\nswitch (_that) {\ncase _SubscriptionInfo() when $default != null:\nreturn $default(_that.upload,_that.download,_that.total,_that.expire);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _SubscriptionInfo implements SubscriptionInfo {\n  const _SubscriptionInfo({this.upload = 0, this.download = 0, this.total = 0, this.expire = 0});\n  factory _SubscriptionInfo.fromJson(Map<String, dynamic> json) => _$SubscriptionInfoFromJson(json);\n\n@override@JsonKey() final  int upload;\n@override@JsonKey() final  int download;\n@override@JsonKey() final  int total;\n@override@JsonKey() final  int expire;\n\n/// Create a copy of SubscriptionInfo\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$SubscriptionInfoCopyWith<_SubscriptionInfo> get copyWith => __$SubscriptionInfoCopyWithImpl<_SubscriptionInfo>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$SubscriptionInfoToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _SubscriptionInfo&&(identical(other.upload, upload) || other.upload == upload)&&(identical(other.download, download) || other.download == download)&&(identical(other.total, total) || other.total == total)&&(identical(other.expire, expire) || other.expire == expire));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,upload,download,total,expire);\n\n@override\nString toString() {\n  return 'SubscriptionInfo(upload: $upload, download: $download, total: $total, expire: $expire)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$SubscriptionInfoCopyWith<$Res> implements $SubscriptionInfoCopyWith<$Res> {\n  factory _$SubscriptionInfoCopyWith(_SubscriptionInfo value, $Res Function(_SubscriptionInfo) _then) = __$SubscriptionInfoCopyWithImpl;\n@override @useResult\n$Res call({\n int upload, int download, int total, int expire\n});\n\n\n\n\n}\n/// @nodoc\nclass __$SubscriptionInfoCopyWithImpl<$Res>\n    implements _$SubscriptionInfoCopyWith<$Res> {\n  __$SubscriptionInfoCopyWithImpl(this._self, this._then);\n\n  final _SubscriptionInfo _self;\n  final $Res Function(_SubscriptionInfo) _then;\n\n/// Create a copy of SubscriptionInfo\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? upload = null,Object? download = null,Object? total = null,Object? expire = null,}) {\n  return _then(_SubscriptionInfo(\nupload: null == upload ? _self.upload : upload // ignore: cast_nullable_to_non_nullable\nas int,download: null == download ? _self.download : download // ignore: cast_nullable_to_non_nullable\nas int,total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable\nas int,expire: null == expire ? _self.expire : expire // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$Profile {\n\n int get id; String get label; String? get currentGroupName; String get url; DateTime? get lastUpdateDate; Duration get autoUpdateDuration; SubscriptionInfo? get subscriptionInfo; bool get autoUpdate; Map<String, String> get selectedMap; Set<String> get unfoldSet; OverwriteType get overwriteType; int? get scriptId; int? get order;\n/// Create a copy of Profile\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ProfileCopyWith<Profile> get copyWith => _$ProfileCopyWithImpl<Profile>(this as Profile, _$identity);\n\n  /// Serializes this Profile to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is Profile&&(identical(other.id, id) || other.id == id)&&(identical(other.label, label) || other.label == label)&&(identical(other.currentGroupName, currentGroupName) || other.currentGroupName == currentGroupName)&&(identical(other.url, url) || other.url == url)&&(identical(other.lastUpdateDate, lastUpdateDate) || other.lastUpdateDate == lastUpdateDate)&&(identical(other.autoUpdateDuration, autoUpdateDuration) || other.autoUpdateDuration == autoUpdateDuration)&&(identical(other.subscriptionInfo, subscriptionInfo) || other.subscriptionInfo == subscriptionInfo)&&(identical(other.autoUpdate, autoUpdate) || other.autoUpdate == autoUpdate)&&const DeepCollectionEquality().equals(other.selectedMap, selectedMap)&&const DeepCollectionEquality().equals(other.unfoldSet, unfoldSet)&&(identical(other.overwriteType, overwriteType) || other.overwriteType == overwriteType)&&(identical(other.scriptId, scriptId) || other.scriptId == scriptId)&&(identical(other.order, order) || other.order == order));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,id,label,currentGroupName,url,lastUpdateDate,autoUpdateDuration,subscriptionInfo,autoUpdate,const DeepCollectionEquality().hash(selectedMap),const DeepCollectionEquality().hash(unfoldSet),overwriteType,scriptId,order);\n\n@override\nString toString() {\n  return 'Profile(id: $id, label: $label, currentGroupName: $currentGroupName, url: $url, lastUpdateDate: $lastUpdateDate, autoUpdateDuration: $autoUpdateDuration, subscriptionInfo: $subscriptionInfo, autoUpdate: $autoUpdate, selectedMap: $selectedMap, unfoldSet: $unfoldSet, overwriteType: $overwriteType, scriptId: $scriptId, order: $order)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ProfileCopyWith<$Res>  {\n  factory $ProfileCopyWith(Profile value, $Res Function(Profile) _then) = _$ProfileCopyWithImpl;\n@useResult\n$Res call({\n int id, String label, String? currentGroupName, String url, DateTime? lastUpdateDate, Duration autoUpdateDuration, SubscriptionInfo? subscriptionInfo, bool autoUpdate, Map<String, String> selectedMap, Set<String> unfoldSet, OverwriteType overwriteType, int? scriptId, int? order\n});\n\n\n$SubscriptionInfoCopyWith<$Res>? get subscriptionInfo;\n\n}\n/// @nodoc\nclass _$ProfileCopyWithImpl<$Res>\n    implements $ProfileCopyWith<$Res> {\n  _$ProfileCopyWithImpl(this._self, this._then);\n\n  final Profile _self;\n  final $Res Function(Profile) _then;\n\n/// Create a copy of Profile\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? label = null,Object? currentGroupName = freezed,Object? url = null,Object? lastUpdateDate = freezed,Object? autoUpdateDuration = null,Object? subscriptionInfo = freezed,Object? autoUpdate = null,Object? selectedMap = null,Object? unfoldSet = null,Object? overwriteType = null,Object? scriptId = freezed,Object? order = freezed,}) {\n  return _then(_self.copyWith(\nid: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable\nas int,label: null == label ? _self.label : label // ignore: cast_nullable_to_non_nullable\nas String,currentGroupName: freezed == currentGroupName ? _self.currentGroupName : currentGroupName // ignore: cast_nullable_to_non_nullable\nas String?,url: null == url ? _self.url : url // ignore: cast_nullable_to_non_nullable\nas String,lastUpdateDate: freezed == lastUpdateDate ? _self.lastUpdateDate : lastUpdateDate // ignore: cast_nullable_to_non_nullable\nas DateTime?,autoUpdateDuration: null == autoUpdateDuration ? _self.autoUpdateDuration : autoUpdateDuration // ignore: cast_nullable_to_non_nullable\nas Duration,subscriptionInfo: freezed == subscriptionInfo ? _self.subscriptionInfo : subscriptionInfo // ignore: cast_nullable_to_non_nullable\nas SubscriptionInfo?,autoUpdate: null == autoUpdate ? _self.autoUpdate : autoUpdate // ignore: cast_nullable_to_non_nullable\nas bool,selectedMap: null == selectedMap ? _self.selectedMap : selectedMap // ignore: cast_nullable_to_non_nullable\nas Map<String, String>,unfoldSet: null == unfoldSet ? _self.unfoldSet : unfoldSet // ignore: cast_nullable_to_non_nullable\nas Set<String>,overwriteType: null == overwriteType ? _self.overwriteType : overwriteType // ignore: cast_nullable_to_non_nullable\nas OverwriteType,scriptId: freezed == scriptId ? _self.scriptId : scriptId // ignore: cast_nullable_to_non_nullable\nas int?,order: freezed == order ? _self.order : order // ignore: cast_nullable_to_non_nullable\nas int?,\n  ));\n}\n/// Create a copy of Profile\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$SubscriptionInfoCopyWith<$Res>? get subscriptionInfo {\n    if (_self.subscriptionInfo == null) {\n    return null;\n  }\n\n  return $SubscriptionInfoCopyWith<$Res>(_self.subscriptionInfo!, (value) {\n    return _then(_self.copyWith(subscriptionInfo: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [Profile].\nextension ProfilePatterns on Profile {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Profile value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _Profile() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Profile value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Profile():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Profile value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _Profile() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int id,  String label,  String? currentGroupName,  String url,  DateTime? lastUpdateDate,  Duration autoUpdateDuration,  SubscriptionInfo? subscriptionInfo,  bool autoUpdate,  Map<String, String> selectedMap,  Set<String> unfoldSet,  OverwriteType overwriteType,  int? scriptId,  int? order)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _Profile() when $default != null:\nreturn $default(_that.id,_that.label,_that.currentGroupName,_that.url,_that.lastUpdateDate,_that.autoUpdateDuration,_that.subscriptionInfo,_that.autoUpdate,_that.selectedMap,_that.unfoldSet,_that.overwriteType,_that.scriptId,_that.order);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int id,  String label,  String? currentGroupName,  String url,  DateTime? lastUpdateDate,  Duration autoUpdateDuration,  SubscriptionInfo? subscriptionInfo,  bool autoUpdate,  Map<String, String> selectedMap,  Set<String> unfoldSet,  OverwriteType overwriteType,  int? scriptId,  int? order)  $default,) {final _that = this;\nswitch (_that) {\ncase _Profile():\nreturn $default(_that.id,_that.label,_that.currentGroupName,_that.url,_that.lastUpdateDate,_that.autoUpdateDuration,_that.subscriptionInfo,_that.autoUpdate,_that.selectedMap,_that.unfoldSet,_that.overwriteType,_that.scriptId,_that.order);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int id,  String label,  String? currentGroupName,  String url,  DateTime? lastUpdateDate,  Duration autoUpdateDuration,  SubscriptionInfo? subscriptionInfo,  bool autoUpdate,  Map<String, String> selectedMap,  Set<String> unfoldSet,  OverwriteType overwriteType,  int? scriptId,  int? order)?  $default,) {final _that = this;\nswitch (_that) {\ncase _Profile() when $default != null:\nreturn $default(_that.id,_that.label,_that.currentGroupName,_that.url,_that.lastUpdateDate,_that.autoUpdateDuration,_that.subscriptionInfo,_that.autoUpdate,_that.selectedMap,_that.unfoldSet,_that.overwriteType,_that.scriptId,_that.order);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _Profile implements Profile {\n  const _Profile({required this.id, this.label = '', this.currentGroupName, this.url = '', this.lastUpdateDate, required this.autoUpdateDuration, this.subscriptionInfo, this.autoUpdate = true, final  Map<String, String> selectedMap = const {}, final  Set<String> unfoldSet = const {}, this.overwriteType = OverwriteType.standard, this.scriptId, this.order}): _selectedMap = selectedMap,_unfoldSet = unfoldSet;\n  factory _Profile.fromJson(Map<String, dynamic> json) => _$ProfileFromJson(json);\n\n@override final  int id;\n@override@JsonKey() final  String label;\n@override final  String? currentGroupName;\n@override@JsonKey() final  String url;\n@override final  DateTime? lastUpdateDate;\n@override final  Duration autoUpdateDuration;\n@override final  SubscriptionInfo? subscriptionInfo;\n@override@JsonKey() final  bool autoUpdate;\n final  Map<String, String> _selectedMap;\n@override@JsonKey() Map<String, String> get selectedMap {\n  if (_selectedMap is EqualUnmodifiableMapView) return _selectedMap;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableMapView(_selectedMap);\n}\n\n final  Set<String> _unfoldSet;\n@override@JsonKey() Set<String> get unfoldSet {\n  if (_unfoldSet is EqualUnmodifiableSetView) return _unfoldSet;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableSetView(_unfoldSet);\n}\n\n@override@JsonKey() final  OverwriteType overwriteType;\n@override final  int? scriptId;\n@override final  int? order;\n\n/// Create a copy of Profile\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ProfileCopyWith<_Profile> get copyWith => __$ProfileCopyWithImpl<_Profile>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$ProfileToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _Profile&&(identical(other.id, id) || other.id == id)&&(identical(other.label, label) || other.label == label)&&(identical(other.currentGroupName, currentGroupName) || other.currentGroupName == currentGroupName)&&(identical(other.url, url) || other.url == url)&&(identical(other.lastUpdateDate, lastUpdateDate) || other.lastUpdateDate == lastUpdateDate)&&(identical(other.autoUpdateDuration, autoUpdateDuration) || other.autoUpdateDuration == autoUpdateDuration)&&(identical(other.subscriptionInfo, subscriptionInfo) || other.subscriptionInfo == subscriptionInfo)&&(identical(other.autoUpdate, autoUpdate) || other.autoUpdate == autoUpdate)&&const DeepCollectionEquality().equals(other._selectedMap, _selectedMap)&&const DeepCollectionEquality().equals(other._unfoldSet, _unfoldSet)&&(identical(other.overwriteType, overwriteType) || other.overwriteType == overwriteType)&&(identical(other.scriptId, scriptId) || other.scriptId == scriptId)&&(identical(other.order, order) || other.order == order));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,id,label,currentGroupName,url,lastUpdateDate,autoUpdateDuration,subscriptionInfo,autoUpdate,const DeepCollectionEquality().hash(_selectedMap),const DeepCollectionEquality().hash(_unfoldSet),overwriteType,scriptId,order);\n\n@override\nString toString() {\n  return 'Profile(id: $id, label: $label, currentGroupName: $currentGroupName, url: $url, lastUpdateDate: $lastUpdateDate, autoUpdateDuration: $autoUpdateDuration, subscriptionInfo: $subscriptionInfo, autoUpdate: $autoUpdate, selectedMap: $selectedMap, unfoldSet: $unfoldSet, overwriteType: $overwriteType, scriptId: $scriptId, order: $order)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ProfileCopyWith<$Res> implements $ProfileCopyWith<$Res> {\n  factory _$ProfileCopyWith(_Profile value, $Res Function(_Profile) _then) = __$ProfileCopyWithImpl;\n@override @useResult\n$Res call({\n int id, String label, String? currentGroupName, String url, DateTime? lastUpdateDate, Duration autoUpdateDuration, SubscriptionInfo? subscriptionInfo, bool autoUpdate, Map<String, String> selectedMap, Set<String> unfoldSet, OverwriteType overwriteType, int? scriptId, int? order\n});\n\n\n@override $SubscriptionInfoCopyWith<$Res>? get subscriptionInfo;\n\n}\n/// @nodoc\nclass __$ProfileCopyWithImpl<$Res>\n    implements _$ProfileCopyWith<$Res> {\n  __$ProfileCopyWithImpl(this._self, this._then);\n\n  final _Profile _self;\n  final $Res Function(_Profile) _then;\n\n/// Create a copy of Profile\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? label = null,Object? currentGroupName = freezed,Object? url = null,Object? lastUpdateDate = freezed,Object? autoUpdateDuration = null,Object? subscriptionInfo = freezed,Object? autoUpdate = null,Object? selectedMap = null,Object? unfoldSet = null,Object? overwriteType = null,Object? scriptId = freezed,Object? order = freezed,}) {\n  return _then(_Profile(\nid: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable\nas int,label: null == label ? _self.label : label // ignore: cast_nullable_to_non_nullable\nas String,currentGroupName: freezed == currentGroupName ? _self.currentGroupName : currentGroupName // ignore: cast_nullable_to_non_nullable\nas String?,url: null == url ? _self.url : url // ignore: cast_nullable_to_non_nullable\nas String,lastUpdateDate: freezed == lastUpdateDate ? _self.lastUpdateDate : lastUpdateDate // ignore: cast_nullable_to_non_nullable\nas DateTime?,autoUpdateDuration: null == autoUpdateDuration ? _self.autoUpdateDuration : autoUpdateDuration // ignore: cast_nullable_to_non_nullable\nas Duration,subscriptionInfo: freezed == subscriptionInfo ? _self.subscriptionInfo : subscriptionInfo // ignore: cast_nullable_to_non_nullable\nas SubscriptionInfo?,autoUpdate: null == autoUpdate ? _self.autoUpdate : autoUpdate // ignore: cast_nullable_to_non_nullable\nas bool,selectedMap: null == selectedMap ? _self._selectedMap : selectedMap // ignore: cast_nullable_to_non_nullable\nas Map<String, String>,unfoldSet: null == unfoldSet ? _self._unfoldSet : unfoldSet // ignore: cast_nullable_to_non_nullable\nas Set<String>,overwriteType: null == overwriteType ? _self.overwriteType : overwriteType // ignore: cast_nullable_to_non_nullable\nas OverwriteType,scriptId: freezed == scriptId ? _self.scriptId : scriptId // ignore: cast_nullable_to_non_nullable\nas int?,order: freezed == order ? _self.order : order // ignore: cast_nullable_to_non_nullable\nas int?,\n  ));\n}\n\n/// Create a copy of Profile\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$SubscriptionInfoCopyWith<$Res>? get subscriptionInfo {\n    if (_self.subscriptionInfo == null) {\n    return null;\n  }\n\n  return $SubscriptionInfoCopyWith<$Res>(_self.subscriptionInfo!, (value) {\n    return _then(_self.copyWith(subscriptionInfo: value));\n  });\n}\n}\n\n/// @nodoc\nmixin _$ProfileRuleLink {\n\n int? get profileId; int get ruleId; RuleScene? get scene; String? get order;\n/// Create a copy of ProfileRuleLink\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ProfileRuleLinkCopyWith<ProfileRuleLink> get copyWith => _$ProfileRuleLinkCopyWithImpl<ProfileRuleLink>(this as ProfileRuleLink, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ProfileRuleLink&&(identical(other.profileId, profileId) || other.profileId == profileId)&&(identical(other.ruleId, ruleId) || other.ruleId == ruleId)&&(identical(other.scene, scene) || other.scene == scene)&&(identical(other.order, order) || other.order == order));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,profileId,ruleId,scene,order);\n\n@override\nString toString() {\n  return 'ProfileRuleLink(profileId: $profileId, ruleId: $ruleId, scene: $scene, order: $order)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ProfileRuleLinkCopyWith<$Res>  {\n  factory $ProfileRuleLinkCopyWith(ProfileRuleLink value, $Res Function(ProfileRuleLink) _then) = _$ProfileRuleLinkCopyWithImpl;\n@useResult\n$Res call({\n int? profileId, int ruleId, RuleScene? scene, String? order\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ProfileRuleLinkCopyWithImpl<$Res>\n    implements $ProfileRuleLinkCopyWith<$Res> {\n  _$ProfileRuleLinkCopyWithImpl(this._self, this._then);\n\n  final ProfileRuleLink _self;\n  final $Res Function(ProfileRuleLink) _then;\n\n/// Create a copy of ProfileRuleLink\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? profileId = freezed,Object? ruleId = null,Object? scene = freezed,Object? order = freezed,}) {\n  return _then(_self.copyWith(\nprofileId: freezed == profileId ? _self.profileId : profileId // ignore: cast_nullable_to_non_nullable\nas int?,ruleId: null == ruleId ? _self.ruleId : ruleId // ignore: cast_nullable_to_non_nullable\nas int,scene: freezed == scene ? _self.scene : scene // ignore: cast_nullable_to_non_nullable\nas RuleScene?,order: freezed == order ? _self.order : order // ignore: cast_nullable_to_non_nullable\nas String?,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [ProfileRuleLink].\nextension ProfileRuleLinkPatterns on ProfileRuleLink {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ProfileRuleLink value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ProfileRuleLink() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ProfileRuleLink value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProfileRuleLink():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ProfileRuleLink value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProfileRuleLink() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int? profileId,  int ruleId,  RuleScene? scene,  String? order)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ProfileRuleLink() when $default != null:\nreturn $default(_that.profileId,_that.ruleId,_that.scene,_that.order);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int? profileId,  int ruleId,  RuleScene? scene,  String? order)  $default,) {final _that = this;\nswitch (_that) {\ncase _ProfileRuleLink():\nreturn $default(_that.profileId,_that.ruleId,_that.scene,_that.order);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int? profileId,  int ruleId,  RuleScene? scene,  String? order)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ProfileRuleLink() when $default != null:\nreturn $default(_that.profileId,_that.ruleId,_that.scene,_that.order);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _ProfileRuleLink implements ProfileRuleLink {\n  const _ProfileRuleLink({this.profileId, required this.ruleId, this.scene, this.order});\n  \n\n@override final  int? profileId;\n@override final  int ruleId;\n@override final  RuleScene? scene;\n@override final  String? order;\n\n/// Create a copy of ProfileRuleLink\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ProfileRuleLinkCopyWith<_ProfileRuleLink> get copyWith => __$ProfileRuleLinkCopyWithImpl<_ProfileRuleLink>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProfileRuleLink&&(identical(other.profileId, profileId) || other.profileId == profileId)&&(identical(other.ruleId, ruleId) || other.ruleId == ruleId)&&(identical(other.scene, scene) || other.scene == scene)&&(identical(other.order, order) || other.order == order));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,profileId,ruleId,scene,order);\n\n@override\nString toString() {\n  return 'ProfileRuleLink(profileId: $profileId, ruleId: $ruleId, scene: $scene, order: $order)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ProfileRuleLinkCopyWith<$Res> implements $ProfileRuleLinkCopyWith<$Res> {\n  factory _$ProfileRuleLinkCopyWith(_ProfileRuleLink value, $Res Function(_ProfileRuleLink) _then) = __$ProfileRuleLinkCopyWithImpl;\n@override @useResult\n$Res call({\n int? profileId, int ruleId, RuleScene? scene, String? order\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ProfileRuleLinkCopyWithImpl<$Res>\n    implements _$ProfileRuleLinkCopyWith<$Res> {\n  __$ProfileRuleLinkCopyWithImpl(this._self, this._then);\n\n  final _ProfileRuleLink _self;\n  final $Res Function(_ProfileRuleLink) _then;\n\n/// Create a copy of ProfileRuleLink\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? profileId = freezed,Object? ruleId = null,Object? scene = freezed,Object? order = freezed,}) {\n  return _then(_ProfileRuleLink(\nprofileId: freezed == profileId ? _self.profileId : profileId // ignore: cast_nullable_to_non_nullable\nas int?,ruleId: null == ruleId ? _self.ruleId : ruleId // ignore: cast_nullable_to_non_nullable\nas int,scene: freezed == scene ? _self.scene : scene // ignore: cast_nullable_to_non_nullable\nas RuleScene?,order: freezed == order ? _self.order : order // ignore: cast_nullable_to_non_nullable\nas String?,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$StandardOverwrite {\n\n List<Rule> get addedRules; List<int> get disabledRuleIds;\n/// Create a copy of StandardOverwrite\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$StandardOverwriteCopyWith<StandardOverwrite> get copyWith => _$StandardOverwriteCopyWithImpl<StandardOverwrite>(this as StandardOverwrite, _$identity);\n\n  /// Serializes this StandardOverwrite to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is StandardOverwrite&&const DeepCollectionEquality().equals(other.addedRules, addedRules)&&const DeepCollectionEquality().equals(other.disabledRuleIds, disabledRuleIds));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(addedRules),const DeepCollectionEquality().hash(disabledRuleIds));\n\n@override\nString toString() {\n  return 'StandardOverwrite(addedRules: $addedRules, disabledRuleIds: $disabledRuleIds)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $StandardOverwriteCopyWith<$Res>  {\n  factory $StandardOverwriteCopyWith(StandardOverwrite value, $Res Function(StandardOverwrite) _then) = _$StandardOverwriteCopyWithImpl;\n@useResult\n$Res call({\n List<Rule> addedRules, List<int> disabledRuleIds\n});\n\n\n\n\n}\n/// @nodoc\nclass _$StandardOverwriteCopyWithImpl<$Res>\n    implements $StandardOverwriteCopyWith<$Res> {\n  _$StandardOverwriteCopyWithImpl(this._self, this._then);\n\n  final StandardOverwrite _self;\n  final $Res Function(StandardOverwrite) _then;\n\n/// Create a copy of StandardOverwrite\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? addedRules = null,Object? disabledRuleIds = null,}) {\n  return _then(_self.copyWith(\naddedRules: null == addedRules ? _self.addedRules : addedRules // ignore: cast_nullable_to_non_nullable\nas List<Rule>,disabledRuleIds: null == disabledRuleIds ? _self.disabledRuleIds : disabledRuleIds // ignore: cast_nullable_to_non_nullable\nas List<int>,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [StandardOverwrite].\nextension StandardOverwritePatterns on StandardOverwrite {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _StandardOverwrite value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _StandardOverwrite() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _StandardOverwrite value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _StandardOverwrite():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _StandardOverwrite value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _StandardOverwrite() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( List<Rule> addedRules,  List<int> disabledRuleIds)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _StandardOverwrite() when $default != null:\nreturn $default(_that.addedRules,_that.disabledRuleIds);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( List<Rule> addedRules,  List<int> disabledRuleIds)  $default,) {final _that = this;\nswitch (_that) {\ncase _StandardOverwrite():\nreturn $default(_that.addedRules,_that.disabledRuleIds);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( List<Rule> addedRules,  List<int> disabledRuleIds)?  $default,) {final _that = this;\nswitch (_that) {\ncase _StandardOverwrite() when $default != null:\nreturn $default(_that.addedRules,_that.disabledRuleIds);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _StandardOverwrite implements StandardOverwrite {\n  const _StandardOverwrite({final  List<Rule> addedRules = const [], final  List<int> disabledRuleIds = const []}): _addedRules = addedRules,_disabledRuleIds = disabledRuleIds;\n  factory _StandardOverwrite.fromJson(Map<String, dynamic> json) => _$StandardOverwriteFromJson(json);\n\n final  List<Rule> _addedRules;\n@override@JsonKey() List<Rule> get addedRules {\n  if (_addedRules is EqualUnmodifiableListView) return _addedRules;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_addedRules);\n}\n\n final  List<int> _disabledRuleIds;\n@override@JsonKey() List<int> get disabledRuleIds {\n  if (_disabledRuleIds is EqualUnmodifiableListView) return _disabledRuleIds;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_disabledRuleIds);\n}\n\n\n/// Create a copy of StandardOverwrite\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$StandardOverwriteCopyWith<_StandardOverwrite> get copyWith => __$StandardOverwriteCopyWithImpl<_StandardOverwrite>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$StandardOverwriteToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _StandardOverwrite&&const DeepCollectionEquality().equals(other._addedRules, _addedRules)&&const DeepCollectionEquality().equals(other._disabledRuleIds, _disabledRuleIds));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_addedRules),const DeepCollectionEquality().hash(_disabledRuleIds));\n\n@override\nString toString() {\n  return 'StandardOverwrite(addedRules: $addedRules, disabledRuleIds: $disabledRuleIds)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$StandardOverwriteCopyWith<$Res> implements $StandardOverwriteCopyWith<$Res> {\n  factory _$StandardOverwriteCopyWith(_StandardOverwrite value, $Res Function(_StandardOverwrite) _then) = __$StandardOverwriteCopyWithImpl;\n@override @useResult\n$Res call({\n List<Rule> addedRules, List<int> disabledRuleIds\n});\n\n\n\n\n}\n/// @nodoc\nclass __$StandardOverwriteCopyWithImpl<$Res>\n    implements _$StandardOverwriteCopyWith<$Res> {\n  __$StandardOverwriteCopyWithImpl(this._self, this._then);\n\n  final _StandardOverwrite _self;\n  final $Res Function(_StandardOverwrite) _then;\n\n/// Create a copy of StandardOverwrite\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? addedRules = null,Object? disabledRuleIds = null,}) {\n  return _then(_StandardOverwrite(\naddedRules: null == addedRules ? _self._addedRules : addedRules // ignore: cast_nullable_to_non_nullable\nas List<Rule>,disabledRuleIds: null == disabledRuleIds ? _self._disabledRuleIds : disabledRuleIds // ignore: cast_nullable_to_non_nullable\nas List<int>,\n  ));\n}\n\n\n}\n\n\n/// @nodoc\nmixin _$ScriptOverwrite {\n\n int? get scriptId;\n/// Create a copy of ScriptOverwrite\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ScriptOverwriteCopyWith<ScriptOverwrite> get copyWith => _$ScriptOverwriteCopyWithImpl<ScriptOverwrite>(this as ScriptOverwrite, _$identity);\n\n  /// Serializes this ScriptOverwrite to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ScriptOverwrite&&(identical(other.scriptId, scriptId) || other.scriptId == scriptId));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,scriptId);\n\n@override\nString toString() {\n  return 'ScriptOverwrite(scriptId: $scriptId)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ScriptOverwriteCopyWith<$Res>  {\n  factory $ScriptOverwriteCopyWith(ScriptOverwrite value, $Res Function(ScriptOverwrite) _then) = _$ScriptOverwriteCopyWithImpl;\n@useResult\n$Res call({\n int? scriptId\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ScriptOverwriteCopyWithImpl<$Res>\n    implements $ScriptOverwriteCopyWith<$Res> {\n  _$ScriptOverwriteCopyWithImpl(this._self, this._then);\n\n  final ScriptOverwrite _self;\n  final $Res Function(ScriptOverwrite) _then;\n\n/// Create a copy of ScriptOverwrite\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? scriptId = freezed,}) {\n  return _then(_self.copyWith(\nscriptId: freezed == scriptId ? _self.scriptId : scriptId // ignore: cast_nullable_to_non_nullable\nas int?,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [ScriptOverwrite].\nextension ScriptOverwritePatterns on ScriptOverwrite {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ScriptOverwrite value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ScriptOverwrite() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ScriptOverwrite value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ScriptOverwrite():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ScriptOverwrite value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ScriptOverwrite() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int? scriptId)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ScriptOverwrite() when $default != null:\nreturn $default(_that.scriptId);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int? scriptId)  $default,) {final _that = this;\nswitch (_that) {\ncase _ScriptOverwrite():\nreturn $default(_that.scriptId);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int? scriptId)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ScriptOverwrite() when $default != null:\nreturn $default(_that.scriptId);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _ScriptOverwrite implements ScriptOverwrite {\n  const _ScriptOverwrite({this.scriptId});\n  factory _ScriptOverwrite.fromJson(Map<String, dynamic> json) => _$ScriptOverwriteFromJson(json);\n\n@override final  int? scriptId;\n\n/// Create a copy of ScriptOverwrite\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ScriptOverwriteCopyWith<_ScriptOverwrite> get copyWith => __$ScriptOverwriteCopyWithImpl<_ScriptOverwrite>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$ScriptOverwriteToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ScriptOverwrite&&(identical(other.scriptId, scriptId) || other.scriptId == scriptId));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,scriptId);\n\n@override\nString toString() {\n  return 'ScriptOverwrite(scriptId: $scriptId)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ScriptOverwriteCopyWith<$Res> implements $ScriptOverwriteCopyWith<$Res> {\n  factory _$ScriptOverwriteCopyWith(_ScriptOverwrite value, $Res Function(_ScriptOverwrite) _then) = __$ScriptOverwriteCopyWithImpl;\n@override @useResult\n$Res call({\n int? scriptId\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ScriptOverwriteCopyWithImpl<$Res>\n    implements _$ScriptOverwriteCopyWith<$Res> {\n  __$ScriptOverwriteCopyWithImpl(this._self, this._then);\n\n  final _ScriptOverwrite _self;\n  final $Res Function(_ScriptOverwrite) _then;\n\n/// Create a copy of ScriptOverwrite\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? scriptId = freezed,}) {\n  return _then(_ScriptOverwrite(\nscriptId: freezed == scriptId ? _self.scriptId : scriptId // ignore: cast_nullable_to_non_nullable\nas int?,\n  ));\n}\n\n\n}\n\n// dart format on\n"
  },
  {
    "path": "lib/models/generated/profile.g.dart",
    "content": "// GENERATED CODE - DO NOT MODIFY BY HAND\n\npart of '../profile.dart';\n\n// **************************************************************************\n// JsonSerializableGenerator\n// **************************************************************************\n\n_SubscriptionInfo _$SubscriptionInfoFromJson(Map<String, dynamic> json) =>\n    _SubscriptionInfo(\n      upload: (json['upload'] as num?)?.toInt() ?? 0,\n      download: (json['download'] as num?)?.toInt() ?? 0,\n      total: (json['total'] as num?)?.toInt() ?? 0,\n      expire: (json['expire'] as num?)?.toInt() ?? 0,\n    );\n\nMap<String, dynamic> _$SubscriptionInfoToJson(_SubscriptionInfo instance) =>\n    <String, dynamic>{\n      'upload': instance.upload,\n      'download': instance.download,\n      'total': instance.total,\n      'expire': instance.expire,\n    };\n\n_Profile _$ProfileFromJson(Map<String, dynamic> json) => _Profile(\n  id: (json['id'] as num).toInt(),\n  label: json['label'] as String? ?? '',\n  currentGroupName: json['currentGroupName'] as String?,\n  url: json['url'] as String? ?? '',\n  lastUpdateDate: json['lastUpdateDate'] == null\n      ? null\n      : DateTime.parse(json['lastUpdateDate'] as String),\n  autoUpdateDuration: Duration(\n    microseconds: (json['autoUpdateDuration'] as num).toInt(),\n  ),\n  subscriptionInfo: json['subscriptionInfo'] == null\n      ? null\n      : SubscriptionInfo.fromJson(\n          json['subscriptionInfo'] as Map<String, dynamic>,\n        ),\n  autoUpdate: json['autoUpdate'] as bool? ?? true,\n  selectedMap:\n      (json['selectedMap'] as Map<String, dynamic>?)?.map(\n        (k, e) => MapEntry(k, e as String),\n      ) ??\n      const {},\n  unfoldSet:\n      (json['unfoldSet'] as List<dynamic>?)?.map((e) => e as String).toSet() ??\n      const {},\n  overwriteType:\n      $enumDecodeNullable(_$OverwriteTypeEnumMap, json['overwriteType']) ??\n      OverwriteType.standard,\n  scriptId: (json['scriptId'] as num?)?.toInt(),\n  order: (json['order'] as num?)?.toInt(),\n);\n\nMap<String, dynamic> _$ProfileToJson(_Profile instance) => <String, dynamic>{\n  'id': instance.id,\n  'label': instance.label,\n  'currentGroupName': instance.currentGroupName,\n  'url': instance.url,\n  'lastUpdateDate': instance.lastUpdateDate?.toIso8601String(),\n  'autoUpdateDuration': instance.autoUpdateDuration.inMicroseconds,\n  'subscriptionInfo': instance.subscriptionInfo,\n  'autoUpdate': instance.autoUpdate,\n  'selectedMap': instance.selectedMap,\n  'unfoldSet': instance.unfoldSet.toList(),\n  'overwriteType': _$OverwriteTypeEnumMap[instance.overwriteType]!,\n  'scriptId': instance.scriptId,\n  'order': instance.order,\n};\n\nconst _$OverwriteTypeEnumMap = {\n  OverwriteType.standard: 'standard',\n  OverwriteType.script: 'script',\n};\n\n_StandardOverwrite _$StandardOverwriteFromJson(Map<String, dynamic> json) =>\n    _StandardOverwrite(\n      addedRules:\n          (json['addedRules'] as List<dynamic>?)\n              ?.map((e) => Rule.fromJson(e as Map<String, dynamic>))\n              .toList() ??\n          const [],\n      disabledRuleIds:\n          (json['disabledRuleIds'] as List<dynamic>?)\n              ?.map((e) => (e as num).toInt())\n              .toList() ??\n          const [],\n    );\n\nMap<String, dynamic> _$StandardOverwriteToJson(_StandardOverwrite instance) =>\n    <String, dynamic>{\n      'addedRules': instance.addedRules,\n      'disabledRuleIds': instance.disabledRuleIds,\n    };\n\n_ScriptOverwrite _$ScriptOverwriteFromJson(Map<String, dynamic> json) =>\n    _ScriptOverwrite(scriptId: (json['scriptId'] as num?)?.toInt());\n\nMap<String, dynamic> _$ScriptOverwriteToJson(_ScriptOverwrite instance) =>\n    <String, dynamic>{'scriptId': instance.scriptId};\n"
  },
  {
    "path": "lib/models/generated/state.freezed.dart",
    "content": "// GENERATED CODE - DO NOT MODIFY BY HAND\n// coverage:ignore-file\n// ignore_for_file: type=lint\n// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark\n\npart of '../state.dart';\n\n// **************************************************************************\n// FreezedGenerator\n// **************************************************************************\n\n// dart format off\nT _$identity<T>(T value) => value;\n/// @nodoc\nmixin _$VM2<A,B> {\n\n A get a; B get b;\n/// Create a copy of VM2\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$VM2CopyWith<A, B, VM2<A, B>> get copyWith => _$VM2CopyWithImpl<A, B, VM2<A, B>>(this as VM2<A, B>, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is VM2<A, B>&&const DeepCollectionEquality().equals(other.a, a)&&const DeepCollectionEquality().equals(other.b, b));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(a),const DeepCollectionEquality().hash(b));\n\n@override\nString toString() {\n  return 'VM2<$A, $B>(a: $a, b: $b)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $VM2CopyWith<A,B,$Res>  {\n  factory $VM2CopyWith(VM2<A, B> value, $Res Function(VM2<A, B>) _then) = _$VM2CopyWithImpl;\n@useResult\n$Res call({\n A a, B b\n});\n\n\n\n\n}\n/// @nodoc\nclass _$VM2CopyWithImpl<A,B,$Res>\n    implements $VM2CopyWith<A, B, $Res> {\n  _$VM2CopyWithImpl(this._self, this._then);\n\n  final VM2<A, B> _self;\n  final $Res Function(VM2<A, B>) _then;\n\n/// Create a copy of VM2\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? a = freezed,Object? b = freezed,}) {\n  return _then(_self.copyWith(\na: freezed == a ? _self.a : a // ignore: cast_nullable_to_non_nullable\nas A,b: freezed == b ? _self.b : b // ignore: cast_nullable_to_non_nullable\nas B,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [VM2].\nextension VM2Patterns<A,B> on VM2<A, B> {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _VM2<A, B> value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _VM2() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _VM2<A, B> value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _VM2():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _VM2<A, B> value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _VM2() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( A a,  B b)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _VM2() when $default != null:\nreturn $default(_that.a,_that.b);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( A a,  B b)  $default,) {final _that = this;\nswitch (_that) {\ncase _VM2():\nreturn $default(_that.a,_that.b);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( A a,  B b)?  $default,) {final _that = this;\nswitch (_that) {\ncase _VM2() when $default != null:\nreturn $default(_that.a,_that.b);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _VM2<A,B> implements VM2<A, B> {\n  const _VM2(this.a, this.b);\n  \n\n@override final  A a;\n@override final  B b;\n\n/// Create a copy of VM2\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$VM2CopyWith<A, B, _VM2<A, B>> get copyWith => __$VM2CopyWithImpl<A, B, _VM2<A, B>>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _VM2<A, B>&&const DeepCollectionEquality().equals(other.a, a)&&const DeepCollectionEquality().equals(other.b, b));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(a),const DeepCollectionEquality().hash(b));\n\n@override\nString toString() {\n  return 'VM2<$A, $B>(a: $a, b: $b)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$VM2CopyWith<A,B,$Res> implements $VM2CopyWith<A, B, $Res> {\n  factory _$VM2CopyWith(_VM2<A, B> value, $Res Function(_VM2<A, B>) _then) = __$VM2CopyWithImpl;\n@override @useResult\n$Res call({\n A a, B b\n});\n\n\n\n\n}\n/// @nodoc\nclass __$VM2CopyWithImpl<A,B,$Res>\n    implements _$VM2CopyWith<A, B, $Res> {\n  __$VM2CopyWithImpl(this._self, this._then);\n\n  final _VM2<A, B> _self;\n  final $Res Function(_VM2<A, B>) _then;\n\n/// Create a copy of VM2\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? a = freezed,Object? b = freezed,}) {\n  return _then(_VM2<A, B>(\nfreezed == a ? _self.a : a // ignore: cast_nullable_to_non_nullable\nas A,freezed == b ? _self.b : b // ignore: cast_nullable_to_non_nullable\nas B,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$VM3<A,B,C> {\n\n A get a; B get b; C get c;\n/// Create a copy of VM3\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$VM3CopyWith<A, B, C, VM3<A, B, C>> get copyWith => _$VM3CopyWithImpl<A, B, C, VM3<A, B, C>>(this as VM3<A, B, C>, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is VM3<A, B, C>&&const DeepCollectionEquality().equals(other.a, a)&&const DeepCollectionEquality().equals(other.b, b)&&const DeepCollectionEquality().equals(other.c, c));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(a),const DeepCollectionEquality().hash(b),const DeepCollectionEquality().hash(c));\n\n@override\nString toString() {\n  return 'VM3<$A, $B, $C>(a: $a, b: $b, c: $c)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $VM3CopyWith<A,B,C,$Res>  {\n  factory $VM3CopyWith(VM3<A, B, C> value, $Res Function(VM3<A, B, C>) _then) = _$VM3CopyWithImpl;\n@useResult\n$Res call({\n A a, B b, C c\n});\n\n\n\n\n}\n/// @nodoc\nclass _$VM3CopyWithImpl<A,B,C,$Res>\n    implements $VM3CopyWith<A, B, C, $Res> {\n  _$VM3CopyWithImpl(this._self, this._then);\n\n  final VM3<A, B, C> _self;\n  final $Res Function(VM3<A, B, C>) _then;\n\n/// Create a copy of VM3\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? a = freezed,Object? b = freezed,Object? c = freezed,}) {\n  return _then(_self.copyWith(\na: freezed == a ? _self.a : a // ignore: cast_nullable_to_non_nullable\nas A,b: freezed == b ? _self.b : b // ignore: cast_nullable_to_non_nullable\nas B,c: freezed == c ? _self.c : c // ignore: cast_nullable_to_non_nullable\nas C,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [VM3].\nextension VM3Patterns<A,B,C> on VM3<A, B, C> {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _VM3<A, B, C> value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _VM3() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _VM3<A, B, C> value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _VM3():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _VM3<A, B, C> value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _VM3() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( A a,  B b,  C c)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _VM3() when $default != null:\nreturn $default(_that.a,_that.b,_that.c);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( A a,  B b,  C c)  $default,) {final _that = this;\nswitch (_that) {\ncase _VM3():\nreturn $default(_that.a,_that.b,_that.c);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( A a,  B b,  C c)?  $default,) {final _that = this;\nswitch (_that) {\ncase _VM3() when $default != null:\nreturn $default(_that.a,_that.b,_that.c);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _VM3<A,B,C> implements VM3<A, B, C> {\n  const _VM3(this.a, this.b, this.c);\n  \n\n@override final  A a;\n@override final  B b;\n@override final  C c;\n\n/// Create a copy of VM3\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$VM3CopyWith<A, B, C, _VM3<A, B, C>> get copyWith => __$VM3CopyWithImpl<A, B, C, _VM3<A, B, C>>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _VM3<A, B, C>&&const DeepCollectionEquality().equals(other.a, a)&&const DeepCollectionEquality().equals(other.b, b)&&const DeepCollectionEquality().equals(other.c, c));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(a),const DeepCollectionEquality().hash(b),const DeepCollectionEquality().hash(c));\n\n@override\nString toString() {\n  return 'VM3<$A, $B, $C>(a: $a, b: $b, c: $c)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$VM3CopyWith<A,B,C,$Res> implements $VM3CopyWith<A, B, C, $Res> {\n  factory _$VM3CopyWith(_VM3<A, B, C> value, $Res Function(_VM3<A, B, C>) _then) = __$VM3CopyWithImpl;\n@override @useResult\n$Res call({\n A a, B b, C c\n});\n\n\n\n\n}\n/// @nodoc\nclass __$VM3CopyWithImpl<A,B,C,$Res>\n    implements _$VM3CopyWith<A, B, C, $Res> {\n  __$VM3CopyWithImpl(this._self, this._then);\n\n  final _VM3<A, B, C> _self;\n  final $Res Function(_VM3<A, B, C>) _then;\n\n/// Create a copy of VM3\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? a = freezed,Object? b = freezed,Object? c = freezed,}) {\n  return _then(_VM3<A, B, C>(\nfreezed == a ? _self.a : a // ignore: cast_nullable_to_non_nullable\nas A,freezed == b ? _self.b : b // ignore: cast_nullable_to_non_nullable\nas B,freezed == c ? _self.c : c // ignore: cast_nullable_to_non_nullable\nas C,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$VM4<A,B,C,D> {\n\n A get a; B get b; C get c; D get d;\n/// Create a copy of VM4\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$VM4CopyWith<A, B, C, D, VM4<A, B, C, D>> get copyWith => _$VM4CopyWithImpl<A, B, C, D, VM4<A, B, C, D>>(this as VM4<A, B, C, D>, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is VM4<A, B, C, D>&&const DeepCollectionEquality().equals(other.a, a)&&const DeepCollectionEquality().equals(other.b, b)&&const DeepCollectionEquality().equals(other.c, c)&&const DeepCollectionEquality().equals(other.d, d));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(a),const DeepCollectionEquality().hash(b),const DeepCollectionEquality().hash(c),const DeepCollectionEquality().hash(d));\n\n@override\nString toString() {\n  return 'VM4<$A, $B, $C, $D>(a: $a, b: $b, c: $c, d: $d)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $VM4CopyWith<A,B,C,D,$Res>  {\n  factory $VM4CopyWith(VM4<A, B, C, D> value, $Res Function(VM4<A, B, C, D>) _then) = _$VM4CopyWithImpl;\n@useResult\n$Res call({\n A a, B b, C c, D d\n});\n\n\n\n\n}\n/// @nodoc\nclass _$VM4CopyWithImpl<A,B,C,D,$Res>\n    implements $VM4CopyWith<A, B, C, D, $Res> {\n  _$VM4CopyWithImpl(this._self, this._then);\n\n  final VM4<A, B, C, D> _self;\n  final $Res Function(VM4<A, B, C, D>) _then;\n\n/// Create a copy of VM4\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? a = freezed,Object? b = freezed,Object? c = freezed,Object? d = freezed,}) {\n  return _then(_self.copyWith(\na: freezed == a ? _self.a : a // ignore: cast_nullable_to_non_nullable\nas A,b: freezed == b ? _self.b : b // ignore: cast_nullable_to_non_nullable\nas B,c: freezed == c ? _self.c : c // ignore: cast_nullable_to_non_nullable\nas C,d: freezed == d ? _self.d : d // ignore: cast_nullable_to_non_nullable\nas D,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [VM4].\nextension VM4Patterns<A,B,C,D> on VM4<A, B, C, D> {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _VM4<A, B, C, D> value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _VM4() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _VM4<A, B, C, D> value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _VM4():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _VM4<A, B, C, D> value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _VM4() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( A a,  B b,  C c,  D d)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _VM4() when $default != null:\nreturn $default(_that.a,_that.b,_that.c,_that.d);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( A a,  B b,  C c,  D d)  $default,) {final _that = this;\nswitch (_that) {\ncase _VM4():\nreturn $default(_that.a,_that.b,_that.c,_that.d);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( A a,  B b,  C c,  D d)?  $default,) {final _that = this;\nswitch (_that) {\ncase _VM4() when $default != null:\nreturn $default(_that.a,_that.b,_that.c,_that.d);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _VM4<A,B,C,D> implements VM4<A, B, C, D> {\n  const _VM4(this.a, this.b, this.c, this.d);\n  \n\n@override final  A a;\n@override final  B b;\n@override final  C c;\n@override final  D d;\n\n/// Create a copy of VM4\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$VM4CopyWith<A, B, C, D, _VM4<A, B, C, D>> get copyWith => __$VM4CopyWithImpl<A, B, C, D, _VM4<A, B, C, D>>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _VM4<A, B, C, D>&&const DeepCollectionEquality().equals(other.a, a)&&const DeepCollectionEquality().equals(other.b, b)&&const DeepCollectionEquality().equals(other.c, c)&&const DeepCollectionEquality().equals(other.d, d));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(a),const DeepCollectionEquality().hash(b),const DeepCollectionEquality().hash(c),const DeepCollectionEquality().hash(d));\n\n@override\nString toString() {\n  return 'VM4<$A, $B, $C, $D>(a: $a, b: $b, c: $c, d: $d)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$VM4CopyWith<A,B,C,D,$Res> implements $VM4CopyWith<A, B, C, D, $Res> {\n  factory _$VM4CopyWith(_VM4<A, B, C, D> value, $Res Function(_VM4<A, B, C, D>) _then) = __$VM4CopyWithImpl;\n@override @useResult\n$Res call({\n A a, B b, C c, D d\n});\n\n\n\n\n}\n/// @nodoc\nclass __$VM4CopyWithImpl<A,B,C,D,$Res>\n    implements _$VM4CopyWith<A, B, C, D, $Res> {\n  __$VM4CopyWithImpl(this._self, this._then);\n\n  final _VM4<A, B, C, D> _self;\n  final $Res Function(_VM4<A, B, C, D>) _then;\n\n/// Create a copy of VM4\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? a = freezed,Object? b = freezed,Object? c = freezed,Object? d = freezed,}) {\n  return _then(_VM4<A, B, C, D>(\nfreezed == a ? _self.a : a // ignore: cast_nullable_to_non_nullable\nas A,freezed == b ? _self.b : b // ignore: cast_nullable_to_non_nullable\nas B,freezed == c ? _self.c : c // ignore: cast_nullable_to_non_nullable\nas C,freezed == d ? _self.d : d // ignore: cast_nullable_to_non_nullable\nas D,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$VM5<A,B,C,D,E> {\n\n A get a; B get b; C get c; D get d; E get e;\n/// Create a copy of VM5\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$VM5CopyWith<A, B, C, D, E, VM5<A, B, C, D, E>> get copyWith => _$VM5CopyWithImpl<A, B, C, D, E, VM5<A, B, C, D, E>>(this as VM5<A, B, C, D, E>, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is VM5<A, B, C, D, E>&&const DeepCollectionEquality().equals(other.a, a)&&const DeepCollectionEquality().equals(other.b, b)&&const DeepCollectionEquality().equals(other.c, c)&&const DeepCollectionEquality().equals(other.d, d)&&const DeepCollectionEquality().equals(other.e, e));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(a),const DeepCollectionEquality().hash(b),const DeepCollectionEquality().hash(c),const DeepCollectionEquality().hash(d),const DeepCollectionEquality().hash(e));\n\n@override\nString toString() {\n  return 'VM5<$A, $B, $C, $D, $E>(a: $a, b: $b, c: $c, d: $d, e: $e)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $VM5CopyWith<A,B,C,D,E,$Res>  {\n  factory $VM5CopyWith(VM5<A, B, C, D, E> value, $Res Function(VM5<A, B, C, D, E>) _then) = _$VM5CopyWithImpl;\n@useResult\n$Res call({\n A a, B b, C c, D d, E e\n});\n\n\n\n\n}\n/// @nodoc\nclass _$VM5CopyWithImpl<A,B,C,D,E,$Res>\n    implements $VM5CopyWith<A, B, C, D, E, $Res> {\n  _$VM5CopyWithImpl(this._self, this._then);\n\n  final VM5<A, B, C, D, E> _self;\n  final $Res Function(VM5<A, B, C, D, E>) _then;\n\n/// Create a copy of VM5\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? a = freezed,Object? b = freezed,Object? c = freezed,Object? d = freezed,Object? e = freezed,}) {\n  return _then(_self.copyWith(\na: freezed == a ? _self.a : a // ignore: cast_nullable_to_non_nullable\nas A,b: freezed == b ? _self.b : b // ignore: cast_nullable_to_non_nullable\nas B,c: freezed == c ? _self.c : c // ignore: cast_nullable_to_non_nullable\nas C,d: freezed == d ? _self.d : d // ignore: cast_nullable_to_non_nullable\nas D,e: freezed == e ? _self.e : e // ignore: cast_nullable_to_non_nullable\nas E,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [VM5].\nextension VM5Patterns<A,B,C,D,E> on VM5<A, B, C, D, E> {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _VM5<A, B, C, D, E> value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _VM5() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _VM5<A, B, C, D, E> value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _VM5():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _VM5<A, B, C, D, E> value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _VM5() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( A a,  B b,  C c,  D d,  E e)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _VM5() when $default != null:\nreturn $default(_that.a,_that.b,_that.c,_that.d,_that.e);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( A a,  B b,  C c,  D d,  E e)  $default,) {final _that = this;\nswitch (_that) {\ncase _VM5():\nreturn $default(_that.a,_that.b,_that.c,_that.d,_that.e);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( A a,  B b,  C c,  D d,  E e)?  $default,) {final _that = this;\nswitch (_that) {\ncase _VM5() when $default != null:\nreturn $default(_that.a,_that.b,_that.c,_that.d,_that.e);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _VM5<A,B,C,D,E> implements VM5<A, B, C, D, E> {\n  const _VM5(this.a, this.b, this.c, this.d, this.e);\n  \n\n@override final  A a;\n@override final  B b;\n@override final  C c;\n@override final  D d;\n@override final  E e;\n\n/// Create a copy of VM5\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$VM5CopyWith<A, B, C, D, E, _VM5<A, B, C, D, E>> get copyWith => __$VM5CopyWithImpl<A, B, C, D, E, _VM5<A, B, C, D, E>>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _VM5<A, B, C, D, E>&&const DeepCollectionEquality().equals(other.a, a)&&const DeepCollectionEquality().equals(other.b, b)&&const DeepCollectionEquality().equals(other.c, c)&&const DeepCollectionEquality().equals(other.d, d)&&const DeepCollectionEquality().equals(other.e, e));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(a),const DeepCollectionEquality().hash(b),const DeepCollectionEquality().hash(c),const DeepCollectionEquality().hash(d),const DeepCollectionEquality().hash(e));\n\n@override\nString toString() {\n  return 'VM5<$A, $B, $C, $D, $E>(a: $a, b: $b, c: $c, d: $d, e: $e)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$VM5CopyWith<A,B,C,D,E,$Res> implements $VM5CopyWith<A, B, C, D, E, $Res> {\n  factory _$VM5CopyWith(_VM5<A, B, C, D, E> value, $Res Function(_VM5<A, B, C, D, E>) _then) = __$VM5CopyWithImpl;\n@override @useResult\n$Res call({\n A a, B b, C c, D d, E e\n});\n\n\n\n\n}\n/// @nodoc\nclass __$VM5CopyWithImpl<A,B,C,D,E,$Res>\n    implements _$VM5CopyWith<A, B, C, D, E, $Res> {\n  __$VM5CopyWithImpl(this._self, this._then);\n\n  final _VM5<A, B, C, D, E> _self;\n  final $Res Function(_VM5<A, B, C, D, E>) _then;\n\n/// Create a copy of VM5\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? a = freezed,Object? b = freezed,Object? c = freezed,Object? d = freezed,Object? e = freezed,}) {\n  return _then(_VM5<A, B, C, D, E>(\nfreezed == a ? _self.a : a // ignore: cast_nullable_to_non_nullable\nas A,freezed == b ? _self.b : b // ignore: cast_nullable_to_non_nullable\nas B,freezed == c ? _self.c : c // ignore: cast_nullable_to_non_nullable\nas C,freezed == d ? _self.d : d // ignore: cast_nullable_to_non_nullable\nas D,freezed == e ? _self.e : e // ignore: cast_nullable_to_non_nullable\nas E,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$ActivateState {\n\n bool get active;\n/// Create a copy of ActivateState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ActivateStateCopyWith<ActivateState> get copyWith => _$ActivateStateCopyWithImpl<ActivateState>(this as ActivateState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ActivateState&&(identical(other.active, active) || other.active == active));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,active);\n\n@override\nString toString() {\n  return 'ActivateState(active: $active)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ActivateStateCopyWith<$Res>  {\n  factory $ActivateStateCopyWith(ActivateState value, $Res Function(ActivateState) _then) = _$ActivateStateCopyWithImpl;\n@useResult\n$Res call({\n bool active\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ActivateStateCopyWithImpl<$Res>\n    implements $ActivateStateCopyWith<$Res> {\n  _$ActivateStateCopyWithImpl(this._self, this._then);\n\n  final ActivateState _self;\n  final $Res Function(ActivateState) _then;\n\n/// Create a copy of ActivateState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? active = null,}) {\n  return _then(_self.copyWith(\nactive: null == active ? _self.active : active // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [ActivateState].\nextension ActivateStatePatterns on ActivateState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ActivateState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ActivateState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ActivateState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ActivateState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ActivateState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ActivateState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool active)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ActivateState() when $default != null:\nreturn $default(_that.active);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool active)  $default,) {final _that = this;\nswitch (_that) {\ncase _ActivateState():\nreturn $default(_that.active);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool active)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ActivateState() when $default != null:\nreturn $default(_that.active);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _ActivateState implements ActivateState {\n  const _ActivateState({required this.active});\n  \n\n@override final  bool active;\n\n/// Create a copy of ActivateState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ActivateStateCopyWith<_ActivateState> get copyWith => __$ActivateStateCopyWithImpl<_ActivateState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ActivateState&&(identical(other.active, active) || other.active == active));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,active);\n\n@override\nString toString() {\n  return 'ActivateState(active: $active)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ActivateStateCopyWith<$Res> implements $ActivateStateCopyWith<$Res> {\n  factory _$ActivateStateCopyWith(_ActivateState value, $Res Function(_ActivateState) _then) = __$ActivateStateCopyWithImpl;\n@override @useResult\n$Res call({\n bool active\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ActivateStateCopyWithImpl<$Res>\n    implements _$ActivateStateCopyWith<$Res> {\n  __$ActivateStateCopyWithImpl(this._self, this._then);\n\n  final _ActivateState _self;\n  final $Res Function(_ActivateState) _then;\n\n/// Create a copy of ActivateState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? active = null,}) {\n  return _then(_ActivateState(\nactive: null == active ? _self.active : active // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$InitState {\n\n Config get config; List<Profile> get profiles;\n/// Create a copy of InitState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$InitStateCopyWith<InitState> get copyWith => _$InitStateCopyWithImpl<InitState>(this as InitState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is InitState&&(identical(other.config, config) || other.config == config)&&const DeepCollectionEquality().equals(other.profiles, profiles));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,config,const DeepCollectionEquality().hash(profiles));\n\n@override\nString toString() {\n  return 'InitState(config: $config, profiles: $profiles)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $InitStateCopyWith<$Res>  {\n  factory $InitStateCopyWith(InitState value, $Res Function(InitState) _then) = _$InitStateCopyWithImpl;\n@useResult\n$Res call({\n Config config, List<Profile> profiles\n});\n\n\n$ConfigCopyWith<$Res> get config;\n\n}\n/// @nodoc\nclass _$InitStateCopyWithImpl<$Res>\n    implements $InitStateCopyWith<$Res> {\n  _$InitStateCopyWithImpl(this._self, this._then);\n\n  final InitState _self;\n  final $Res Function(InitState) _then;\n\n/// Create a copy of InitState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? config = null,Object? profiles = null,}) {\n  return _then(_self.copyWith(\nconfig: null == config ? _self.config : config // ignore: cast_nullable_to_non_nullable\nas Config,profiles: null == profiles ? _self.profiles : profiles // ignore: cast_nullable_to_non_nullable\nas List<Profile>,\n  ));\n}\n/// Create a copy of InitState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$ConfigCopyWith<$Res> get config {\n  \n  return $ConfigCopyWith<$Res>(_self.config, (value) {\n    return _then(_self.copyWith(config: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [InitState].\nextension InitStatePatterns on InitState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _InitState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _InitState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _InitState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _InitState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _InitState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _InitState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( Config config,  List<Profile> profiles)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _InitState() when $default != null:\nreturn $default(_that.config,_that.profiles);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( Config config,  List<Profile> profiles)  $default,) {final _that = this;\nswitch (_that) {\ncase _InitState():\nreturn $default(_that.config,_that.profiles);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( Config config,  List<Profile> profiles)?  $default,) {final _that = this;\nswitch (_that) {\ncase _InitState() when $default != null:\nreturn $default(_that.config,_that.profiles);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _InitState implements InitState {\n  const _InitState({required this.config, required final  List<Profile> profiles}): _profiles = profiles;\n  \n\n@override final  Config config;\n final  List<Profile> _profiles;\n@override List<Profile> get profiles {\n  if (_profiles is EqualUnmodifiableListView) return _profiles;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_profiles);\n}\n\n\n/// Create a copy of InitState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$InitStateCopyWith<_InitState> get copyWith => __$InitStateCopyWithImpl<_InitState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _InitState&&(identical(other.config, config) || other.config == config)&&const DeepCollectionEquality().equals(other._profiles, _profiles));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,config,const DeepCollectionEquality().hash(_profiles));\n\n@override\nString toString() {\n  return 'InitState(config: $config, profiles: $profiles)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$InitStateCopyWith<$Res> implements $InitStateCopyWith<$Res> {\n  factory _$InitStateCopyWith(_InitState value, $Res Function(_InitState) _then) = __$InitStateCopyWithImpl;\n@override @useResult\n$Res call({\n Config config, List<Profile> profiles\n});\n\n\n@override $ConfigCopyWith<$Res> get config;\n\n}\n/// @nodoc\nclass __$InitStateCopyWithImpl<$Res>\n    implements _$InitStateCopyWith<$Res> {\n  __$InitStateCopyWithImpl(this._self, this._then);\n\n  final _InitState _self;\n  final $Res Function(_InitState) _then;\n\n/// Create a copy of InitState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? config = null,Object? profiles = null,}) {\n  return _then(_InitState(\nconfig: null == config ? _self.config : config // ignore: cast_nullable_to_non_nullable\nas Config,profiles: null == profiles ? _self._profiles : profiles // ignore: cast_nullable_to_non_nullable\nas List<Profile>,\n  ));\n}\n\n/// Create a copy of InitState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$ConfigCopyWith<$Res> get config {\n  \n  return $ConfigCopyWith<$Res>(_self.config, (value) {\n    return _then(_self.copyWith(config: value));\n  });\n}\n}\n\n/// @nodoc\nmixin _$CommonMessage {\n\n String get id; String get text; Duration get duration; MessageActionState? get actionState;\n/// Create a copy of CommonMessage\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$CommonMessageCopyWith<CommonMessage> get copyWith => _$CommonMessageCopyWithImpl<CommonMessage>(this as CommonMessage, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is CommonMessage&&(identical(other.id, id) || other.id == id)&&(identical(other.text, text) || other.text == text)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.actionState, actionState) || other.actionState == actionState));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,id,text,duration,actionState);\n\n@override\nString toString() {\n  return 'CommonMessage(id: $id, text: $text, duration: $duration, actionState: $actionState)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $CommonMessageCopyWith<$Res>  {\n  factory $CommonMessageCopyWith(CommonMessage value, $Res Function(CommonMessage) _then) = _$CommonMessageCopyWithImpl;\n@useResult\n$Res call({\n String id, String text, Duration duration, MessageActionState? actionState\n});\n\n\n$MessageActionStateCopyWith<$Res>? get actionState;\n\n}\n/// @nodoc\nclass _$CommonMessageCopyWithImpl<$Res>\n    implements $CommonMessageCopyWith<$Res> {\n  _$CommonMessageCopyWithImpl(this._self, this._then);\n\n  final CommonMessage _self;\n  final $Res Function(CommonMessage) _then;\n\n/// Create a copy of CommonMessage\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? text = null,Object? duration = null,Object? actionState = freezed,}) {\n  return _then(_self.copyWith(\nid: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable\nas String,text: null == text ? _self.text : text // ignore: cast_nullable_to_non_nullable\nas String,duration: null == duration ? _self.duration : duration // ignore: cast_nullable_to_non_nullable\nas Duration,actionState: freezed == actionState ? _self.actionState : actionState // ignore: cast_nullable_to_non_nullable\nas MessageActionState?,\n  ));\n}\n/// Create a copy of CommonMessage\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$MessageActionStateCopyWith<$Res>? get actionState {\n    if (_self.actionState == null) {\n    return null;\n  }\n\n  return $MessageActionStateCopyWith<$Res>(_self.actionState!, (value) {\n    return _then(_self.copyWith(actionState: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [CommonMessage].\nextension CommonMessagePatterns on CommonMessage {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _CommonMessage value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _CommonMessage() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _CommonMessage value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _CommonMessage():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _CommonMessage value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _CommonMessage() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id,  String text,  Duration duration,  MessageActionState? actionState)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _CommonMessage() when $default != null:\nreturn $default(_that.id,_that.text,_that.duration,_that.actionState);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id,  String text,  Duration duration,  MessageActionState? actionState)  $default,) {final _that = this;\nswitch (_that) {\ncase _CommonMessage():\nreturn $default(_that.id,_that.text,_that.duration,_that.actionState);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id,  String text,  Duration duration,  MessageActionState? actionState)?  $default,) {final _that = this;\nswitch (_that) {\ncase _CommonMessage() when $default != null:\nreturn $default(_that.id,_that.text,_that.duration,_that.actionState);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _CommonMessage implements CommonMessage {\n  const _CommonMessage({required this.id, required this.text, this.duration = const Duration(seconds: 3), this.actionState});\n  \n\n@override final  String id;\n@override final  String text;\n@override@JsonKey() final  Duration duration;\n@override final  MessageActionState? actionState;\n\n/// Create a copy of CommonMessage\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$CommonMessageCopyWith<_CommonMessage> get copyWith => __$CommonMessageCopyWithImpl<_CommonMessage>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _CommonMessage&&(identical(other.id, id) || other.id == id)&&(identical(other.text, text) || other.text == text)&&(identical(other.duration, duration) || other.duration == duration)&&(identical(other.actionState, actionState) || other.actionState == actionState));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,id,text,duration,actionState);\n\n@override\nString toString() {\n  return 'CommonMessage(id: $id, text: $text, duration: $duration, actionState: $actionState)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$CommonMessageCopyWith<$Res> implements $CommonMessageCopyWith<$Res> {\n  factory _$CommonMessageCopyWith(_CommonMessage value, $Res Function(_CommonMessage) _then) = __$CommonMessageCopyWithImpl;\n@override @useResult\n$Res call({\n String id, String text, Duration duration, MessageActionState? actionState\n});\n\n\n@override $MessageActionStateCopyWith<$Res>? get actionState;\n\n}\n/// @nodoc\nclass __$CommonMessageCopyWithImpl<$Res>\n    implements _$CommonMessageCopyWith<$Res> {\n  __$CommonMessageCopyWithImpl(this._self, this._then);\n\n  final _CommonMessage _self;\n  final $Res Function(_CommonMessage) _then;\n\n/// Create a copy of CommonMessage\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? text = null,Object? duration = null,Object? actionState = freezed,}) {\n  return _then(_CommonMessage(\nid: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable\nas String,text: null == text ? _self.text : text // ignore: cast_nullable_to_non_nullable\nas String,duration: null == duration ? _self.duration : duration // ignore: cast_nullable_to_non_nullable\nas Duration,actionState: freezed == actionState ? _self.actionState : actionState // ignore: cast_nullable_to_non_nullable\nas MessageActionState?,\n  ));\n}\n\n/// Create a copy of CommonMessage\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$MessageActionStateCopyWith<$Res>? get actionState {\n    if (_self.actionState == null) {\n    return null;\n  }\n\n  return $MessageActionStateCopyWith<$Res>(_self.actionState!, (value) {\n    return _then(_self.copyWith(actionState: value));\n  });\n}\n}\n\n/// @nodoc\nmixin _$MessageActionState {\n\n String get actionText; VoidCallback get action;\n/// Create a copy of MessageActionState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$MessageActionStateCopyWith<MessageActionState> get copyWith => _$MessageActionStateCopyWithImpl<MessageActionState>(this as MessageActionState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is MessageActionState&&(identical(other.actionText, actionText) || other.actionText == actionText)&&(identical(other.action, action) || other.action == action));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,actionText,action);\n\n@override\nString toString() {\n  return 'MessageActionState(actionText: $actionText, action: $action)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $MessageActionStateCopyWith<$Res>  {\n  factory $MessageActionStateCopyWith(MessageActionState value, $Res Function(MessageActionState) _then) = _$MessageActionStateCopyWithImpl;\n@useResult\n$Res call({\n String actionText, VoidCallback action\n});\n\n\n\n\n}\n/// @nodoc\nclass _$MessageActionStateCopyWithImpl<$Res>\n    implements $MessageActionStateCopyWith<$Res> {\n  _$MessageActionStateCopyWithImpl(this._self, this._then);\n\n  final MessageActionState _self;\n  final $Res Function(MessageActionState) _then;\n\n/// Create a copy of MessageActionState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? actionText = null,Object? action = null,}) {\n  return _then(_self.copyWith(\nactionText: null == actionText ? _self.actionText : actionText // ignore: cast_nullable_to_non_nullable\nas String,action: null == action ? _self.action : action // ignore: cast_nullable_to_non_nullable\nas VoidCallback,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [MessageActionState].\nextension MessageActionStatePatterns on MessageActionState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _MessageActionState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _MessageActionState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _MessageActionState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _MessageActionState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _MessageActionState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _MessageActionState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String actionText,  VoidCallback action)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _MessageActionState() when $default != null:\nreturn $default(_that.actionText,_that.action);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String actionText,  VoidCallback action)  $default,) {final _that = this;\nswitch (_that) {\ncase _MessageActionState():\nreturn $default(_that.actionText,_that.action);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String actionText,  VoidCallback action)?  $default,) {final _that = this;\nswitch (_that) {\ncase _MessageActionState() when $default != null:\nreturn $default(_that.actionText,_that.action);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _MessageActionState implements MessageActionState {\n  const _MessageActionState({required this.actionText, required this.action});\n  \n\n@override final  String actionText;\n@override final  VoidCallback action;\n\n/// Create a copy of MessageActionState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$MessageActionStateCopyWith<_MessageActionState> get copyWith => __$MessageActionStateCopyWithImpl<_MessageActionState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _MessageActionState&&(identical(other.actionText, actionText) || other.actionText == actionText)&&(identical(other.action, action) || other.action == action));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,actionText,action);\n\n@override\nString toString() {\n  return 'MessageActionState(actionText: $actionText, action: $action)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$MessageActionStateCopyWith<$Res> implements $MessageActionStateCopyWith<$Res> {\n  factory _$MessageActionStateCopyWith(_MessageActionState value, $Res Function(_MessageActionState) _then) = __$MessageActionStateCopyWithImpl;\n@override @useResult\n$Res call({\n String actionText, VoidCallback action\n});\n\n\n\n\n}\n/// @nodoc\nclass __$MessageActionStateCopyWithImpl<$Res>\n    implements _$MessageActionStateCopyWith<$Res> {\n  __$MessageActionStateCopyWithImpl(this._self, this._then);\n\n  final _MessageActionState _self;\n  final $Res Function(_MessageActionState) _then;\n\n/// Create a copy of MessageActionState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? actionText = null,Object? action = null,}) {\n  return _then(_MessageActionState(\nactionText: null == actionText ? _self.actionText : actionText // ignore: cast_nullable_to_non_nullable\nas String,action: null == action ? _self.action : action // ignore: cast_nullable_to_non_nullable\nas VoidCallback,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$AppBarState {\n\n List<Widget> get actions; AppBarSearchState? get searchState; AppBarEditState? get editState;\n/// Create a copy of AppBarState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$AppBarStateCopyWith<AppBarState> get copyWith => _$AppBarStateCopyWithImpl<AppBarState>(this as AppBarState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is AppBarState&&const DeepCollectionEquality().equals(other.actions, actions)&&(identical(other.searchState, searchState) || other.searchState == searchState)&&(identical(other.editState, editState) || other.editState == editState));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(actions),searchState,editState);\n\n@override\nString toString() {\n  return 'AppBarState(actions: $actions, searchState: $searchState, editState: $editState)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $AppBarStateCopyWith<$Res>  {\n  factory $AppBarStateCopyWith(AppBarState value, $Res Function(AppBarState) _then) = _$AppBarStateCopyWithImpl;\n@useResult\n$Res call({\n List<Widget> actions, AppBarSearchState? searchState, AppBarEditState? editState\n});\n\n\n$AppBarSearchStateCopyWith<$Res>? get searchState;$AppBarEditStateCopyWith<$Res>? get editState;\n\n}\n/// @nodoc\nclass _$AppBarStateCopyWithImpl<$Res>\n    implements $AppBarStateCopyWith<$Res> {\n  _$AppBarStateCopyWithImpl(this._self, this._then);\n\n  final AppBarState _self;\n  final $Res Function(AppBarState) _then;\n\n/// Create a copy of AppBarState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? actions = null,Object? searchState = freezed,Object? editState = freezed,}) {\n  return _then(_self.copyWith(\nactions: null == actions ? _self.actions : actions // ignore: cast_nullable_to_non_nullable\nas List<Widget>,searchState: freezed == searchState ? _self.searchState : searchState // ignore: cast_nullable_to_non_nullable\nas AppBarSearchState?,editState: freezed == editState ? _self.editState : editState // ignore: cast_nullable_to_non_nullable\nas AppBarEditState?,\n  ));\n}\n/// Create a copy of AppBarState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$AppBarSearchStateCopyWith<$Res>? get searchState {\n    if (_self.searchState == null) {\n    return null;\n  }\n\n  return $AppBarSearchStateCopyWith<$Res>(_self.searchState!, (value) {\n    return _then(_self.copyWith(searchState: value));\n  });\n}/// Create a copy of AppBarState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$AppBarEditStateCopyWith<$Res>? get editState {\n    if (_self.editState == null) {\n    return null;\n  }\n\n  return $AppBarEditStateCopyWith<$Res>(_self.editState!, (value) {\n    return _then(_self.copyWith(editState: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [AppBarState].\nextension AppBarStatePatterns on AppBarState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _AppBarState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _AppBarState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _AppBarState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _AppBarState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _AppBarState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _AppBarState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( List<Widget> actions,  AppBarSearchState? searchState,  AppBarEditState? editState)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _AppBarState() when $default != null:\nreturn $default(_that.actions,_that.searchState,_that.editState);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( List<Widget> actions,  AppBarSearchState? searchState,  AppBarEditState? editState)  $default,) {final _that = this;\nswitch (_that) {\ncase _AppBarState():\nreturn $default(_that.actions,_that.searchState,_that.editState);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( List<Widget> actions,  AppBarSearchState? searchState,  AppBarEditState? editState)?  $default,) {final _that = this;\nswitch (_that) {\ncase _AppBarState() when $default != null:\nreturn $default(_that.actions,_that.searchState,_that.editState);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _AppBarState implements AppBarState {\n  const _AppBarState({final  List<Widget> actions = const [], this.searchState, this.editState}): _actions = actions;\n  \n\n final  List<Widget> _actions;\n@override@JsonKey() List<Widget> get actions {\n  if (_actions is EqualUnmodifiableListView) return _actions;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_actions);\n}\n\n@override final  AppBarSearchState? searchState;\n@override final  AppBarEditState? editState;\n\n/// Create a copy of AppBarState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$AppBarStateCopyWith<_AppBarState> get copyWith => __$AppBarStateCopyWithImpl<_AppBarState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppBarState&&const DeepCollectionEquality().equals(other._actions, _actions)&&(identical(other.searchState, searchState) || other.searchState == searchState)&&(identical(other.editState, editState) || other.editState == editState));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_actions),searchState,editState);\n\n@override\nString toString() {\n  return 'AppBarState(actions: $actions, searchState: $searchState, editState: $editState)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$AppBarStateCopyWith<$Res> implements $AppBarStateCopyWith<$Res> {\n  factory _$AppBarStateCopyWith(_AppBarState value, $Res Function(_AppBarState) _then) = __$AppBarStateCopyWithImpl;\n@override @useResult\n$Res call({\n List<Widget> actions, AppBarSearchState? searchState, AppBarEditState? editState\n});\n\n\n@override $AppBarSearchStateCopyWith<$Res>? get searchState;@override $AppBarEditStateCopyWith<$Res>? get editState;\n\n}\n/// @nodoc\nclass __$AppBarStateCopyWithImpl<$Res>\n    implements _$AppBarStateCopyWith<$Res> {\n  __$AppBarStateCopyWithImpl(this._self, this._then);\n\n  final _AppBarState _self;\n  final $Res Function(_AppBarState) _then;\n\n/// Create a copy of AppBarState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? actions = null,Object? searchState = freezed,Object? editState = freezed,}) {\n  return _then(_AppBarState(\nactions: null == actions ? _self._actions : actions // ignore: cast_nullable_to_non_nullable\nas List<Widget>,searchState: freezed == searchState ? _self.searchState : searchState // ignore: cast_nullable_to_non_nullable\nas AppBarSearchState?,editState: freezed == editState ? _self.editState : editState // ignore: cast_nullable_to_non_nullable\nas AppBarEditState?,\n  ));\n}\n\n/// Create a copy of AppBarState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$AppBarSearchStateCopyWith<$Res>? get searchState {\n    if (_self.searchState == null) {\n    return null;\n  }\n\n  return $AppBarSearchStateCopyWith<$Res>(_self.searchState!, (value) {\n    return _then(_self.copyWith(searchState: value));\n  });\n}/// Create a copy of AppBarState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$AppBarEditStateCopyWith<$Res>? get editState {\n    if (_self.editState == null) {\n    return null;\n  }\n\n  return $AppBarEditStateCopyWith<$Res>(_self.editState!, (value) {\n    return _then(_self.copyWith(editState: value));\n  });\n}\n}\n\n/// @nodoc\nmixin _$AppBarSearchState {\n\n  Function(String) get onSearch; bool get autoAddSearch; String? get query;\n/// Create a copy of AppBarSearchState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$AppBarSearchStateCopyWith<AppBarSearchState> get copyWith => _$AppBarSearchStateCopyWithImpl<AppBarSearchState>(this as AppBarSearchState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is AppBarSearchState&&(identical(other.onSearch, onSearch) || other.onSearch == onSearch)&&(identical(other.autoAddSearch, autoAddSearch) || other.autoAddSearch == autoAddSearch)&&(identical(other.query, query) || other.query == query));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,onSearch,autoAddSearch,query);\n\n@override\nString toString() {\n  return 'AppBarSearchState(onSearch: $onSearch, autoAddSearch: $autoAddSearch, query: $query)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $AppBarSearchStateCopyWith<$Res>  {\n  factory $AppBarSearchStateCopyWith(AppBarSearchState value, $Res Function(AppBarSearchState) _then) = _$AppBarSearchStateCopyWithImpl;\n@useResult\n$Res call({\n  Function(String) onSearch, bool autoAddSearch, String? query\n});\n\n\n\n\n}\n/// @nodoc\nclass _$AppBarSearchStateCopyWithImpl<$Res>\n    implements $AppBarSearchStateCopyWith<$Res> {\n  _$AppBarSearchStateCopyWithImpl(this._self, this._then);\n\n  final AppBarSearchState _self;\n  final $Res Function(AppBarSearchState) _then;\n\n/// Create a copy of AppBarSearchState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? onSearch = null,Object? autoAddSearch = null,Object? query = freezed,}) {\n  return _then(_self.copyWith(\nonSearch: null == onSearch ? _self.onSearch : onSearch // ignore: cast_nullable_to_non_nullable\nas  Function(String),autoAddSearch: null == autoAddSearch ? _self.autoAddSearch : autoAddSearch // ignore: cast_nullable_to_non_nullable\nas bool,query: freezed == query ? _self.query : query // ignore: cast_nullable_to_non_nullable\nas String?,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [AppBarSearchState].\nextension AppBarSearchStatePatterns on AppBarSearchState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _AppBarSearchState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _AppBarSearchState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _AppBarSearchState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _AppBarSearchState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _AppBarSearchState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _AppBarSearchState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(  Function(String) onSearch,  bool autoAddSearch,  String? query)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _AppBarSearchState() when $default != null:\nreturn $default(_that.onSearch,_that.autoAddSearch,_that.query);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(  Function(String) onSearch,  bool autoAddSearch,  String? query)  $default,) {final _that = this;\nswitch (_that) {\ncase _AppBarSearchState():\nreturn $default(_that.onSearch,_that.autoAddSearch,_that.query);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(  Function(String) onSearch,  bool autoAddSearch,  String? query)?  $default,) {final _that = this;\nswitch (_that) {\ncase _AppBarSearchState() when $default != null:\nreturn $default(_that.onSearch,_that.autoAddSearch,_that.query);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _AppBarSearchState implements AppBarSearchState {\n  const _AppBarSearchState({required this.onSearch, this.autoAddSearch = true, this.query = null});\n  \n\n@override final   Function(String) onSearch;\n@override@JsonKey() final  bool autoAddSearch;\n@override@JsonKey() final  String? query;\n\n/// Create a copy of AppBarSearchState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$AppBarSearchStateCopyWith<_AppBarSearchState> get copyWith => __$AppBarSearchStateCopyWithImpl<_AppBarSearchState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppBarSearchState&&(identical(other.onSearch, onSearch) || other.onSearch == onSearch)&&(identical(other.autoAddSearch, autoAddSearch) || other.autoAddSearch == autoAddSearch)&&(identical(other.query, query) || other.query == query));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,onSearch,autoAddSearch,query);\n\n@override\nString toString() {\n  return 'AppBarSearchState(onSearch: $onSearch, autoAddSearch: $autoAddSearch, query: $query)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$AppBarSearchStateCopyWith<$Res> implements $AppBarSearchStateCopyWith<$Res> {\n  factory _$AppBarSearchStateCopyWith(_AppBarSearchState value, $Res Function(_AppBarSearchState) _then) = __$AppBarSearchStateCopyWithImpl;\n@override @useResult\n$Res call({\n  Function(String) onSearch, bool autoAddSearch, String? query\n});\n\n\n\n\n}\n/// @nodoc\nclass __$AppBarSearchStateCopyWithImpl<$Res>\n    implements _$AppBarSearchStateCopyWith<$Res> {\n  __$AppBarSearchStateCopyWithImpl(this._self, this._then);\n\n  final _AppBarSearchState _self;\n  final $Res Function(_AppBarSearchState) _then;\n\n/// Create a copy of AppBarSearchState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? onSearch = null,Object? autoAddSearch = null,Object? query = freezed,}) {\n  return _then(_AppBarSearchState(\nonSearch: null == onSearch ? _self.onSearch : onSearch // ignore: cast_nullable_to_non_nullable\nas  Function(String),autoAddSearch: null == autoAddSearch ? _self.autoAddSearch : autoAddSearch // ignore: cast_nullable_to_non_nullable\nas bool,query: freezed == query ? _self.query : query // ignore: cast_nullable_to_non_nullable\nas String?,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$AppBarEditState {\n\n int get editCount;  Function() get onExit;\n/// Create a copy of AppBarEditState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$AppBarEditStateCopyWith<AppBarEditState> get copyWith => _$AppBarEditStateCopyWithImpl<AppBarEditState>(this as AppBarEditState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is AppBarEditState&&(identical(other.editCount, editCount) || other.editCount == editCount)&&(identical(other.onExit, onExit) || other.onExit == onExit));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,editCount,onExit);\n\n@override\nString toString() {\n  return 'AppBarEditState(editCount: $editCount, onExit: $onExit)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $AppBarEditStateCopyWith<$Res>  {\n  factory $AppBarEditStateCopyWith(AppBarEditState value, $Res Function(AppBarEditState) _then) = _$AppBarEditStateCopyWithImpl;\n@useResult\n$Res call({\n int editCount,  Function() onExit\n});\n\n\n\n\n}\n/// @nodoc\nclass _$AppBarEditStateCopyWithImpl<$Res>\n    implements $AppBarEditStateCopyWith<$Res> {\n  _$AppBarEditStateCopyWithImpl(this._self, this._then);\n\n  final AppBarEditState _self;\n  final $Res Function(AppBarEditState) _then;\n\n/// Create a copy of AppBarEditState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? editCount = null,Object? onExit = null,}) {\n  return _then(_self.copyWith(\neditCount: null == editCount ? _self.editCount : editCount // ignore: cast_nullable_to_non_nullable\nas int,onExit: null == onExit ? _self.onExit : onExit // ignore: cast_nullable_to_non_nullable\nas  Function(),\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [AppBarEditState].\nextension AppBarEditStatePatterns on AppBarEditState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _AppBarEditState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _AppBarEditState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _AppBarEditState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _AppBarEditState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _AppBarEditState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _AppBarEditState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int editCount,   Function() onExit)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _AppBarEditState() when $default != null:\nreturn $default(_that.editCount,_that.onExit);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int editCount,   Function() onExit)  $default,) {final _that = this;\nswitch (_that) {\ncase _AppBarEditState():\nreturn $default(_that.editCount,_that.onExit);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int editCount,   Function() onExit)?  $default,) {final _that = this;\nswitch (_that) {\ncase _AppBarEditState() when $default != null:\nreturn $default(_that.editCount,_that.onExit);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _AppBarEditState implements AppBarEditState {\n  const _AppBarEditState({this.editCount = 0, required this.onExit});\n  \n\n@override@JsonKey() final  int editCount;\n@override final   Function() onExit;\n\n/// Create a copy of AppBarEditState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$AppBarEditStateCopyWith<_AppBarEditState> get copyWith => __$AppBarEditStateCopyWithImpl<_AppBarEditState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _AppBarEditState&&(identical(other.editCount, editCount) || other.editCount == editCount)&&(identical(other.onExit, onExit) || other.onExit == onExit));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,editCount,onExit);\n\n@override\nString toString() {\n  return 'AppBarEditState(editCount: $editCount, onExit: $onExit)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$AppBarEditStateCopyWith<$Res> implements $AppBarEditStateCopyWith<$Res> {\n  factory _$AppBarEditStateCopyWith(_AppBarEditState value, $Res Function(_AppBarEditState) _then) = __$AppBarEditStateCopyWithImpl;\n@override @useResult\n$Res call({\n int editCount,  Function() onExit\n});\n\n\n\n\n}\n/// @nodoc\nclass __$AppBarEditStateCopyWithImpl<$Res>\n    implements _$AppBarEditStateCopyWith<$Res> {\n  __$AppBarEditStateCopyWithImpl(this._self, this._then);\n\n  final _AppBarEditState _self;\n  final $Res Function(_AppBarEditState) _then;\n\n/// Create a copy of AppBarEditState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? editCount = null,Object? onExit = null,}) {\n  return _then(_AppBarEditState(\neditCount: null == editCount ? _self.editCount : editCount // ignore: cast_nullable_to_non_nullable\nas int,onExit: null == onExit ? _self.onExit : onExit // ignore: cast_nullable_to_non_nullable\nas  Function(),\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$StartButtonState {\n\n bool get isPreload; bool get hasProfile;\n/// Create a copy of StartButtonState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$StartButtonStateCopyWith<StartButtonState> get copyWith => _$StartButtonStateCopyWithImpl<StartButtonState>(this as StartButtonState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is StartButtonState&&(identical(other.isPreload, isPreload) || other.isPreload == isPreload)&&(identical(other.hasProfile, hasProfile) || other.hasProfile == hasProfile));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,isPreload,hasProfile);\n\n@override\nString toString() {\n  return 'StartButtonState(isPreload: $isPreload, hasProfile: $hasProfile)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $StartButtonStateCopyWith<$Res>  {\n  factory $StartButtonStateCopyWith(StartButtonState value, $Res Function(StartButtonState) _then) = _$StartButtonStateCopyWithImpl;\n@useResult\n$Res call({\n bool isPreload, bool hasProfile\n});\n\n\n\n\n}\n/// @nodoc\nclass _$StartButtonStateCopyWithImpl<$Res>\n    implements $StartButtonStateCopyWith<$Res> {\n  _$StartButtonStateCopyWithImpl(this._self, this._then);\n\n  final StartButtonState _self;\n  final $Res Function(StartButtonState) _then;\n\n/// Create a copy of StartButtonState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? isPreload = null,Object? hasProfile = null,}) {\n  return _then(_self.copyWith(\nisPreload: null == isPreload ? _self.isPreload : isPreload // ignore: cast_nullable_to_non_nullable\nas bool,hasProfile: null == hasProfile ? _self.hasProfile : hasProfile // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [StartButtonState].\nextension StartButtonStatePatterns on StartButtonState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _StartButtonState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _StartButtonState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _StartButtonState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _StartButtonState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _StartButtonState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _StartButtonState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isPreload,  bool hasProfile)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _StartButtonState() when $default != null:\nreturn $default(_that.isPreload,_that.hasProfile);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isPreload,  bool hasProfile)  $default,) {final _that = this;\nswitch (_that) {\ncase _StartButtonState():\nreturn $default(_that.isPreload,_that.hasProfile);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isPreload,  bool hasProfile)?  $default,) {final _that = this;\nswitch (_that) {\ncase _StartButtonState() when $default != null:\nreturn $default(_that.isPreload,_that.hasProfile);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _StartButtonState implements StartButtonState {\n  const _StartButtonState({required this.isPreload, required this.hasProfile});\n  \n\n@override final  bool isPreload;\n@override final  bool hasProfile;\n\n/// Create a copy of StartButtonState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$StartButtonStateCopyWith<_StartButtonState> get copyWith => __$StartButtonStateCopyWithImpl<_StartButtonState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _StartButtonState&&(identical(other.isPreload, isPreload) || other.isPreload == isPreload)&&(identical(other.hasProfile, hasProfile) || other.hasProfile == hasProfile));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,isPreload,hasProfile);\n\n@override\nString toString() {\n  return 'StartButtonState(isPreload: $isPreload, hasProfile: $hasProfile)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$StartButtonStateCopyWith<$Res> implements $StartButtonStateCopyWith<$Res> {\n  factory _$StartButtonStateCopyWith(_StartButtonState value, $Res Function(_StartButtonState) _then) = __$StartButtonStateCopyWithImpl;\n@override @useResult\n$Res call({\n bool isPreload, bool hasProfile\n});\n\n\n\n\n}\n/// @nodoc\nclass __$StartButtonStateCopyWithImpl<$Res>\n    implements _$StartButtonStateCopyWith<$Res> {\n  __$StartButtonStateCopyWithImpl(this._self, this._then);\n\n  final _StartButtonState _self;\n  final $Res Function(_StartButtonState) _then;\n\n/// Create a copy of StartButtonState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? isPreload = null,Object? hasProfile = null,}) {\n  return _then(_StartButtonState(\nisPreload: null == isPreload ? _self.isPreload : isPreload // ignore: cast_nullable_to_non_nullable\nas bool,hasProfile: null == hasProfile ? _self.hasProfile : hasProfile // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$ProfilesState {\n\n List<Profile> get profiles; int? get currentProfileId; int get columns;\n/// Create a copy of ProfilesState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ProfilesStateCopyWith<ProfilesState> get copyWith => _$ProfilesStateCopyWithImpl<ProfilesState>(this as ProfilesState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ProfilesState&&const DeepCollectionEquality().equals(other.profiles, profiles)&&(identical(other.currentProfileId, currentProfileId) || other.currentProfileId == currentProfileId)&&(identical(other.columns, columns) || other.columns == columns));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(profiles),currentProfileId,columns);\n\n@override\nString toString() {\n  return 'ProfilesState(profiles: $profiles, currentProfileId: $currentProfileId, columns: $columns)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ProfilesStateCopyWith<$Res>  {\n  factory $ProfilesStateCopyWith(ProfilesState value, $Res Function(ProfilesState) _then) = _$ProfilesStateCopyWithImpl;\n@useResult\n$Res call({\n List<Profile> profiles, int? currentProfileId, int columns\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ProfilesStateCopyWithImpl<$Res>\n    implements $ProfilesStateCopyWith<$Res> {\n  _$ProfilesStateCopyWithImpl(this._self, this._then);\n\n  final ProfilesState _self;\n  final $Res Function(ProfilesState) _then;\n\n/// Create a copy of ProfilesState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? profiles = null,Object? currentProfileId = freezed,Object? columns = null,}) {\n  return _then(_self.copyWith(\nprofiles: null == profiles ? _self.profiles : profiles // ignore: cast_nullable_to_non_nullable\nas List<Profile>,currentProfileId: freezed == currentProfileId ? _self.currentProfileId : currentProfileId // ignore: cast_nullable_to_non_nullable\nas int?,columns: null == columns ? _self.columns : columns // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [ProfilesState].\nextension ProfilesStatePatterns on ProfilesState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ProfilesState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ProfilesState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ProfilesState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProfilesState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ProfilesState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProfilesState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( List<Profile> profiles,  int? currentProfileId,  int columns)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ProfilesState() when $default != null:\nreturn $default(_that.profiles,_that.currentProfileId,_that.columns);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( List<Profile> profiles,  int? currentProfileId,  int columns)  $default,) {final _that = this;\nswitch (_that) {\ncase _ProfilesState():\nreturn $default(_that.profiles,_that.currentProfileId,_that.columns);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( List<Profile> profiles,  int? currentProfileId,  int columns)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ProfilesState() when $default != null:\nreturn $default(_that.profiles,_that.currentProfileId,_that.columns);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _ProfilesState implements ProfilesState {\n  const _ProfilesState({required final  List<Profile> profiles, required this.currentProfileId, required this.columns}): _profiles = profiles;\n  \n\n final  List<Profile> _profiles;\n@override List<Profile> get profiles {\n  if (_profiles is EqualUnmodifiableListView) return _profiles;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_profiles);\n}\n\n@override final  int? currentProfileId;\n@override final  int columns;\n\n/// Create a copy of ProfilesState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ProfilesStateCopyWith<_ProfilesState> get copyWith => __$ProfilesStateCopyWithImpl<_ProfilesState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProfilesState&&const DeepCollectionEquality().equals(other._profiles, _profiles)&&(identical(other.currentProfileId, currentProfileId) || other.currentProfileId == currentProfileId)&&(identical(other.columns, columns) || other.columns == columns));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_profiles),currentProfileId,columns);\n\n@override\nString toString() {\n  return 'ProfilesState(profiles: $profiles, currentProfileId: $currentProfileId, columns: $columns)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ProfilesStateCopyWith<$Res> implements $ProfilesStateCopyWith<$Res> {\n  factory _$ProfilesStateCopyWith(_ProfilesState value, $Res Function(_ProfilesState) _then) = __$ProfilesStateCopyWithImpl;\n@override @useResult\n$Res call({\n List<Profile> profiles, int? currentProfileId, int columns\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ProfilesStateCopyWithImpl<$Res>\n    implements _$ProfilesStateCopyWith<$Res> {\n  __$ProfilesStateCopyWithImpl(this._self, this._then);\n\n  final _ProfilesState _self;\n  final $Res Function(_ProfilesState) _then;\n\n/// Create a copy of ProfilesState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? profiles = null,Object? currentProfileId = freezed,Object? columns = null,}) {\n  return _then(_ProfilesState(\nprofiles: null == profiles ? _self._profiles : profiles // ignore: cast_nullable_to_non_nullable\nas List<Profile>,currentProfileId: freezed == currentProfileId ? _self.currentProfileId : currentProfileId // ignore: cast_nullable_to_non_nullable\nas int?,columns: null == columns ? _self.columns : columns // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$NetworkDetectionState {\n\n bool get isLoading; IpInfo? get ipInfo;\n/// Create a copy of NetworkDetectionState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$NetworkDetectionStateCopyWith<NetworkDetectionState> get copyWith => _$NetworkDetectionStateCopyWithImpl<NetworkDetectionState>(this as NetworkDetectionState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is NetworkDetectionState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.ipInfo, ipInfo) || other.ipInfo == ipInfo));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,isLoading,ipInfo);\n\n@override\nString toString() {\n  return 'NetworkDetectionState(isLoading: $isLoading, ipInfo: $ipInfo)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $NetworkDetectionStateCopyWith<$Res>  {\n  factory $NetworkDetectionStateCopyWith(NetworkDetectionState value, $Res Function(NetworkDetectionState) _then) = _$NetworkDetectionStateCopyWithImpl;\n@useResult\n$Res call({\n bool isLoading, IpInfo? ipInfo\n});\n\n\n$IpInfoCopyWith<$Res>? get ipInfo;\n\n}\n/// @nodoc\nclass _$NetworkDetectionStateCopyWithImpl<$Res>\n    implements $NetworkDetectionStateCopyWith<$Res> {\n  _$NetworkDetectionStateCopyWithImpl(this._self, this._then);\n\n  final NetworkDetectionState _self;\n  final $Res Function(NetworkDetectionState) _then;\n\n/// Create a copy of NetworkDetectionState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? isLoading = null,Object? ipInfo = freezed,}) {\n  return _then(_self.copyWith(\nisLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable\nas bool,ipInfo: freezed == ipInfo ? _self.ipInfo : ipInfo // ignore: cast_nullable_to_non_nullable\nas IpInfo?,\n  ));\n}\n/// Create a copy of NetworkDetectionState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$IpInfoCopyWith<$Res>? get ipInfo {\n    if (_self.ipInfo == null) {\n    return null;\n  }\n\n  return $IpInfoCopyWith<$Res>(_self.ipInfo!, (value) {\n    return _then(_self.copyWith(ipInfo: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [NetworkDetectionState].\nextension NetworkDetectionStatePatterns on NetworkDetectionState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _NetworkDetectionState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _NetworkDetectionState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _NetworkDetectionState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _NetworkDetectionState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _NetworkDetectionState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _NetworkDetectionState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isLoading,  IpInfo? ipInfo)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _NetworkDetectionState() when $default != null:\nreturn $default(_that.isLoading,_that.ipInfo);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isLoading,  IpInfo? ipInfo)  $default,) {final _that = this;\nswitch (_that) {\ncase _NetworkDetectionState():\nreturn $default(_that.isLoading,_that.ipInfo);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isLoading,  IpInfo? ipInfo)?  $default,) {final _that = this;\nswitch (_that) {\ncase _NetworkDetectionState() when $default != null:\nreturn $default(_that.isLoading,_that.ipInfo);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _NetworkDetectionState implements NetworkDetectionState {\n  const _NetworkDetectionState({required this.isLoading, required this.ipInfo});\n  \n\n@override final  bool isLoading;\n@override final  IpInfo? ipInfo;\n\n/// Create a copy of NetworkDetectionState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$NetworkDetectionStateCopyWith<_NetworkDetectionState> get copyWith => __$NetworkDetectionStateCopyWithImpl<_NetworkDetectionState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _NetworkDetectionState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.ipInfo, ipInfo) || other.ipInfo == ipInfo));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,isLoading,ipInfo);\n\n@override\nString toString() {\n  return 'NetworkDetectionState(isLoading: $isLoading, ipInfo: $ipInfo)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$NetworkDetectionStateCopyWith<$Res> implements $NetworkDetectionStateCopyWith<$Res> {\n  factory _$NetworkDetectionStateCopyWith(_NetworkDetectionState value, $Res Function(_NetworkDetectionState) _then) = __$NetworkDetectionStateCopyWithImpl;\n@override @useResult\n$Res call({\n bool isLoading, IpInfo? ipInfo\n});\n\n\n@override $IpInfoCopyWith<$Res>? get ipInfo;\n\n}\n/// @nodoc\nclass __$NetworkDetectionStateCopyWithImpl<$Res>\n    implements _$NetworkDetectionStateCopyWith<$Res> {\n  __$NetworkDetectionStateCopyWithImpl(this._self, this._then);\n\n  final _NetworkDetectionState _self;\n  final $Res Function(_NetworkDetectionState) _then;\n\n/// Create a copy of NetworkDetectionState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? isLoading = null,Object? ipInfo = freezed,}) {\n  return _then(_NetworkDetectionState(\nisLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable\nas bool,ipInfo: freezed == ipInfo ? _self.ipInfo : ipInfo // ignore: cast_nullable_to_non_nullable\nas IpInfo?,\n  ));\n}\n\n/// Create a copy of NetworkDetectionState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$IpInfoCopyWith<$Res>? get ipInfo {\n    if (_self.ipInfo == null) {\n    return null;\n  }\n\n  return $IpInfoCopyWith<$Res>(_self.ipInfo!, (value) {\n    return _then(_self.copyWith(ipInfo: value));\n  });\n}\n}\n\n/// @nodoc\nmixin _$TrayState {\n\n Mode get mode; int get port; bool get autoLaunch; bool get systemProxy; bool get tunEnable; bool get isStart; String? get locale; Brightness? get brightness; List<Group> get groups; Map<String, String> get selectedMap; bool get showTrayTitle;\n/// Create a copy of TrayState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$TrayStateCopyWith<TrayState> get copyWith => _$TrayStateCopyWithImpl<TrayState>(this as TrayState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is TrayState&&(identical(other.mode, mode) || other.mode == mode)&&(identical(other.port, port) || other.port == port)&&(identical(other.autoLaunch, autoLaunch) || other.autoLaunch == autoLaunch)&&(identical(other.systemProxy, systemProxy) || other.systemProxy == systemProxy)&&(identical(other.tunEnable, tunEnable) || other.tunEnable == tunEnable)&&(identical(other.isStart, isStart) || other.isStart == isStart)&&(identical(other.locale, locale) || other.locale == locale)&&(identical(other.brightness, brightness) || other.brightness == brightness)&&const DeepCollectionEquality().equals(other.groups, groups)&&const DeepCollectionEquality().equals(other.selectedMap, selectedMap)&&(identical(other.showTrayTitle, showTrayTitle) || other.showTrayTitle == showTrayTitle));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,mode,port,autoLaunch,systemProxy,tunEnable,isStart,locale,brightness,const DeepCollectionEquality().hash(groups),const DeepCollectionEquality().hash(selectedMap),showTrayTitle);\n\n@override\nString toString() {\n  return 'TrayState(mode: $mode, port: $port, autoLaunch: $autoLaunch, systemProxy: $systemProxy, tunEnable: $tunEnable, isStart: $isStart, locale: $locale, brightness: $brightness, groups: $groups, selectedMap: $selectedMap, showTrayTitle: $showTrayTitle)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $TrayStateCopyWith<$Res>  {\n  factory $TrayStateCopyWith(TrayState value, $Res Function(TrayState) _then) = _$TrayStateCopyWithImpl;\n@useResult\n$Res call({\n Mode mode, int port, bool autoLaunch, bool systemProxy, bool tunEnable, bool isStart, String? locale, Brightness? brightness, List<Group> groups, Map<String, String> selectedMap, bool showTrayTitle\n});\n\n\n\n\n}\n/// @nodoc\nclass _$TrayStateCopyWithImpl<$Res>\n    implements $TrayStateCopyWith<$Res> {\n  _$TrayStateCopyWithImpl(this._self, this._then);\n\n  final TrayState _self;\n  final $Res Function(TrayState) _then;\n\n/// Create a copy of TrayState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? mode = null,Object? port = null,Object? autoLaunch = null,Object? systemProxy = null,Object? tunEnable = null,Object? isStart = null,Object? locale = freezed,Object? brightness = freezed,Object? groups = null,Object? selectedMap = null,Object? showTrayTitle = null,}) {\n  return _then(_self.copyWith(\nmode: null == mode ? _self.mode : mode // ignore: cast_nullable_to_non_nullable\nas Mode,port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable\nas int,autoLaunch: null == autoLaunch ? _self.autoLaunch : autoLaunch // ignore: cast_nullable_to_non_nullable\nas bool,systemProxy: null == systemProxy ? _self.systemProxy : systemProxy // ignore: cast_nullable_to_non_nullable\nas bool,tunEnable: null == tunEnable ? _self.tunEnable : tunEnable // ignore: cast_nullable_to_non_nullable\nas bool,isStart: null == isStart ? _self.isStart : isStart // ignore: cast_nullable_to_non_nullable\nas bool,locale: freezed == locale ? _self.locale : locale // ignore: cast_nullable_to_non_nullable\nas String?,brightness: freezed == brightness ? _self.brightness : brightness // ignore: cast_nullable_to_non_nullable\nas Brightness?,groups: null == groups ? _self.groups : groups // ignore: cast_nullable_to_non_nullable\nas List<Group>,selectedMap: null == selectedMap ? _self.selectedMap : selectedMap // ignore: cast_nullable_to_non_nullable\nas Map<String, String>,showTrayTitle: null == showTrayTitle ? _self.showTrayTitle : showTrayTitle // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [TrayState].\nextension TrayStatePatterns on TrayState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _TrayState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _TrayState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _TrayState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _TrayState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _TrayState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _TrayState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( Mode mode,  int port,  bool autoLaunch,  bool systemProxy,  bool tunEnable,  bool isStart,  String? locale,  Brightness? brightness,  List<Group> groups,  Map<String, String> selectedMap,  bool showTrayTitle)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _TrayState() when $default != null:\nreturn $default(_that.mode,_that.port,_that.autoLaunch,_that.systemProxy,_that.tunEnable,_that.isStart,_that.locale,_that.brightness,_that.groups,_that.selectedMap,_that.showTrayTitle);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( Mode mode,  int port,  bool autoLaunch,  bool systemProxy,  bool tunEnable,  bool isStart,  String? locale,  Brightness? brightness,  List<Group> groups,  Map<String, String> selectedMap,  bool showTrayTitle)  $default,) {final _that = this;\nswitch (_that) {\ncase _TrayState():\nreturn $default(_that.mode,_that.port,_that.autoLaunch,_that.systemProxy,_that.tunEnable,_that.isStart,_that.locale,_that.brightness,_that.groups,_that.selectedMap,_that.showTrayTitle);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( Mode mode,  int port,  bool autoLaunch,  bool systemProxy,  bool tunEnable,  bool isStart,  String? locale,  Brightness? brightness,  List<Group> groups,  Map<String, String> selectedMap,  bool showTrayTitle)?  $default,) {final _that = this;\nswitch (_that) {\ncase _TrayState() when $default != null:\nreturn $default(_that.mode,_that.port,_that.autoLaunch,_that.systemProxy,_that.tunEnable,_that.isStart,_that.locale,_that.brightness,_that.groups,_that.selectedMap,_that.showTrayTitle);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _TrayState implements TrayState {\n  const _TrayState({required this.mode, required this.port, required this.autoLaunch, required this.systemProxy, required this.tunEnable, required this.isStart, required this.locale, required this.brightness, required final  List<Group> groups, required final  Map<String, String> selectedMap, required this.showTrayTitle}): _groups = groups,_selectedMap = selectedMap;\n  \n\n@override final  Mode mode;\n@override final  int port;\n@override final  bool autoLaunch;\n@override final  bool systemProxy;\n@override final  bool tunEnable;\n@override final  bool isStart;\n@override final  String? locale;\n@override final  Brightness? brightness;\n final  List<Group> _groups;\n@override List<Group> get groups {\n  if (_groups is EqualUnmodifiableListView) return _groups;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_groups);\n}\n\n final  Map<String, String> _selectedMap;\n@override Map<String, String> get selectedMap {\n  if (_selectedMap is EqualUnmodifiableMapView) return _selectedMap;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableMapView(_selectedMap);\n}\n\n@override final  bool showTrayTitle;\n\n/// Create a copy of TrayState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$TrayStateCopyWith<_TrayState> get copyWith => __$TrayStateCopyWithImpl<_TrayState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _TrayState&&(identical(other.mode, mode) || other.mode == mode)&&(identical(other.port, port) || other.port == port)&&(identical(other.autoLaunch, autoLaunch) || other.autoLaunch == autoLaunch)&&(identical(other.systemProxy, systemProxy) || other.systemProxy == systemProxy)&&(identical(other.tunEnable, tunEnable) || other.tunEnable == tunEnable)&&(identical(other.isStart, isStart) || other.isStart == isStart)&&(identical(other.locale, locale) || other.locale == locale)&&(identical(other.brightness, brightness) || other.brightness == brightness)&&const DeepCollectionEquality().equals(other._groups, _groups)&&const DeepCollectionEquality().equals(other._selectedMap, _selectedMap)&&(identical(other.showTrayTitle, showTrayTitle) || other.showTrayTitle == showTrayTitle));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,mode,port,autoLaunch,systemProxy,tunEnable,isStart,locale,brightness,const DeepCollectionEquality().hash(_groups),const DeepCollectionEquality().hash(_selectedMap),showTrayTitle);\n\n@override\nString toString() {\n  return 'TrayState(mode: $mode, port: $port, autoLaunch: $autoLaunch, systemProxy: $systemProxy, tunEnable: $tunEnable, isStart: $isStart, locale: $locale, brightness: $brightness, groups: $groups, selectedMap: $selectedMap, showTrayTitle: $showTrayTitle)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$TrayStateCopyWith<$Res> implements $TrayStateCopyWith<$Res> {\n  factory _$TrayStateCopyWith(_TrayState value, $Res Function(_TrayState) _then) = __$TrayStateCopyWithImpl;\n@override @useResult\n$Res call({\n Mode mode, int port, bool autoLaunch, bool systemProxy, bool tunEnable, bool isStart, String? locale, Brightness? brightness, List<Group> groups, Map<String, String> selectedMap, bool showTrayTitle\n});\n\n\n\n\n}\n/// @nodoc\nclass __$TrayStateCopyWithImpl<$Res>\n    implements _$TrayStateCopyWith<$Res> {\n  __$TrayStateCopyWithImpl(this._self, this._then);\n\n  final _TrayState _self;\n  final $Res Function(_TrayState) _then;\n\n/// Create a copy of TrayState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? mode = null,Object? port = null,Object? autoLaunch = null,Object? systemProxy = null,Object? tunEnable = null,Object? isStart = null,Object? locale = freezed,Object? brightness = freezed,Object? groups = null,Object? selectedMap = null,Object? showTrayTitle = null,}) {\n  return _then(_TrayState(\nmode: null == mode ? _self.mode : mode // ignore: cast_nullable_to_non_nullable\nas Mode,port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable\nas int,autoLaunch: null == autoLaunch ? _self.autoLaunch : autoLaunch // ignore: cast_nullable_to_non_nullable\nas bool,systemProxy: null == systemProxy ? _self.systemProxy : systemProxy // ignore: cast_nullable_to_non_nullable\nas bool,tunEnable: null == tunEnable ? _self.tunEnable : tunEnable // ignore: cast_nullable_to_non_nullable\nas bool,isStart: null == isStart ? _self.isStart : isStart // ignore: cast_nullable_to_non_nullable\nas bool,locale: freezed == locale ? _self.locale : locale // ignore: cast_nullable_to_non_nullable\nas String?,brightness: freezed == brightness ? _self.brightness : brightness // ignore: cast_nullable_to_non_nullable\nas Brightness?,groups: null == groups ? _self._groups : groups // ignore: cast_nullable_to_non_nullable\nas List<Group>,selectedMap: null == selectedMap ? _self._selectedMap : selectedMap // ignore: cast_nullable_to_non_nullable\nas Map<String, String>,showTrayTitle: null == showTrayTitle ? _self.showTrayTitle : showTrayTitle // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$TrayTitleState {\n\n Traffic get traffic; bool get showTrayTitle;\n/// Create a copy of TrayTitleState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$TrayTitleStateCopyWith<TrayTitleState> get copyWith => _$TrayTitleStateCopyWithImpl<TrayTitleState>(this as TrayTitleState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is TrayTitleState&&(identical(other.traffic, traffic) || other.traffic == traffic)&&(identical(other.showTrayTitle, showTrayTitle) || other.showTrayTitle == showTrayTitle));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,traffic,showTrayTitle);\n\n@override\nString toString() {\n  return 'TrayTitleState(traffic: $traffic, showTrayTitle: $showTrayTitle)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $TrayTitleStateCopyWith<$Res>  {\n  factory $TrayTitleStateCopyWith(TrayTitleState value, $Res Function(TrayTitleState) _then) = _$TrayTitleStateCopyWithImpl;\n@useResult\n$Res call({\n Traffic traffic, bool showTrayTitle\n});\n\n\n$TrafficCopyWith<$Res> get traffic;\n\n}\n/// @nodoc\nclass _$TrayTitleStateCopyWithImpl<$Res>\n    implements $TrayTitleStateCopyWith<$Res> {\n  _$TrayTitleStateCopyWithImpl(this._self, this._then);\n\n  final TrayTitleState _self;\n  final $Res Function(TrayTitleState) _then;\n\n/// Create a copy of TrayTitleState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? traffic = null,Object? showTrayTitle = null,}) {\n  return _then(_self.copyWith(\ntraffic: null == traffic ? _self.traffic : traffic // ignore: cast_nullable_to_non_nullable\nas Traffic,showTrayTitle: null == showTrayTitle ? _self.showTrayTitle : showTrayTitle // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n/// Create a copy of TrayTitleState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$TrafficCopyWith<$Res> get traffic {\n  \n  return $TrafficCopyWith<$Res>(_self.traffic, (value) {\n    return _then(_self.copyWith(traffic: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [TrayTitleState].\nextension TrayTitleStatePatterns on TrayTitleState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _TrayTitleState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _TrayTitleState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _TrayTitleState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _TrayTitleState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _TrayTitleState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _TrayTitleState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( Traffic traffic,  bool showTrayTitle)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _TrayTitleState() when $default != null:\nreturn $default(_that.traffic,_that.showTrayTitle);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( Traffic traffic,  bool showTrayTitle)  $default,) {final _that = this;\nswitch (_that) {\ncase _TrayTitleState():\nreturn $default(_that.traffic,_that.showTrayTitle);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( Traffic traffic,  bool showTrayTitle)?  $default,) {final _that = this;\nswitch (_that) {\ncase _TrayTitleState() when $default != null:\nreturn $default(_that.traffic,_that.showTrayTitle);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _TrayTitleState implements TrayTitleState {\n  const _TrayTitleState({required this.traffic, required this.showTrayTitle});\n  \n\n@override final  Traffic traffic;\n@override final  bool showTrayTitle;\n\n/// Create a copy of TrayTitleState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$TrayTitleStateCopyWith<_TrayTitleState> get copyWith => __$TrayTitleStateCopyWithImpl<_TrayTitleState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _TrayTitleState&&(identical(other.traffic, traffic) || other.traffic == traffic)&&(identical(other.showTrayTitle, showTrayTitle) || other.showTrayTitle == showTrayTitle));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,traffic,showTrayTitle);\n\n@override\nString toString() {\n  return 'TrayTitleState(traffic: $traffic, showTrayTitle: $showTrayTitle)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$TrayTitleStateCopyWith<$Res> implements $TrayTitleStateCopyWith<$Res> {\n  factory _$TrayTitleStateCopyWith(_TrayTitleState value, $Res Function(_TrayTitleState) _then) = __$TrayTitleStateCopyWithImpl;\n@override @useResult\n$Res call({\n Traffic traffic, bool showTrayTitle\n});\n\n\n@override $TrafficCopyWith<$Res> get traffic;\n\n}\n/// @nodoc\nclass __$TrayTitleStateCopyWithImpl<$Res>\n    implements _$TrayTitleStateCopyWith<$Res> {\n  __$TrayTitleStateCopyWithImpl(this._self, this._then);\n\n  final _TrayTitleState _self;\n  final $Res Function(_TrayTitleState) _then;\n\n/// Create a copy of TrayTitleState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? traffic = null,Object? showTrayTitle = null,}) {\n  return _then(_TrayTitleState(\ntraffic: null == traffic ? _self.traffic : traffic // ignore: cast_nullable_to_non_nullable\nas Traffic,showTrayTitle: null == showTrayTitle ? _self.showTrayTitle : showTrayTitle // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n/// Create a copy of TrayTitleState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$TrafficCopyWith<$Res> get traffic {\n  \n  return $TrafficCopyWith<$Res>(_self.traffic, (value) {\n    return _then(_self.copyWith(traffic: value));\n  });\n}\n}\n\n/// @nodoc\nmixin _$NavigationState {\n\n PageLabel get pageLabel; List<NavigationItem> get navigationItems; ViewMode get viewMode; String? get locale; int get currentIndex;\n/// Create a copy of NavigationState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$NavigationStateCopyWith<NavigationState> get copyWith => _$NavigationStateCopyWithImpl<NavigationState>(this as NavigationState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is NavigationState&&(identical(other.pageLabel, pageLabel) || other.pageLabel == pageLabel)&&const DeepCollectionEquality().equals(other.navigationItems, navigationItems)&&(identical(other.viewMode, viewMode) || other.viewMode == viewMode)&&(identical(other.locale, locale) || other.locale == locale)&&(identical(other.currentIndex, currentIndex) || other.currentIndex == currentIndex));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,pageLabel,const DeepCollectionEquality().hash(navigationItems),viewMode,locale,currentIndex);\n\n@override\nString toString() {\n  return 'NavigationState(pageLabel: $pageLabel, navigationItems: $navigationItems, viewMode: $viewMode, locale: $locale, currentIndex: $currentIndex)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $NavigationStateCopyWith<$Res>  {\n  factory $NavigationStateCopyWith(NavigationState value, $Res Function(NavigationState) _then) = _$NavigationStateCopyWithImpl;\n@useResult\n$Res call({\n PageLabel pageLabel, List<NavigationItem> navigationItems, ViewMode viewMode, String? locale, int currentIndex\n});\n\n\n\n\n}\n/// @nodoc\nclass _$NavigationStateCopyWithImpl<$Res>\n    implements $NavigationStateCopyWith<$Res> {\n  _$NavigationStateCopyWithImpl(this._self, this._then);\n\n  final NavigationState _self;\n  final $Res Function(NavigationState) _then;\n\n/// Create a copy of NavigationState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? pageLabel = null,Object? navigationItems = null,Object? viewMode = null,Object? locale = freezed,Object? currentIndex = null,}) {\n  return _then(_self.copyWith(\npageLabel: null == pageLabel ? _self.pageLabel : pageLabel // ignore: cast_nullable_to_non_nullable\nas PageLabel,navigationItems: null == navigationItems ? _self.navigationItems : navigationItems // ignore: cast_nullable_to_non_nullable\nas List<NavigationItem>,viewMode: null == viewMode ? _self.viewMode : viewMode // ignore: cast_nullable_to_non_nullable\nas ViewMode,locale: freezed == locale ? _self.locale : locale // ignore: cast_nullable_to_non_nullable\nas String?,currentIndex: null == currentIndex ? _self.currentIndex : currentIndex // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [NavigationState].\nextension NavigationStatePatterns on NavigationState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _NavigationState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _NavigationState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _NavigationState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _NavigationState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _NavigationState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _NavigationState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( PageLabel pageLabel,  List<NavigationItem> navigationItems,  ViewMode viewMode,  String? locale,  int currentIndex)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _NavigationState() when $default != null:\nreturn $default(_that.pageLabel,_that.navigationItems,_that.viewMode,_that.locale,_that.currentIndex);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( PageLabel pageLabel,  List<NavigationItem> navigationItems,  ViewMode viewMode,  String? locale,  int currentIndex)  $default,) {final _that = this;\nswitch (_that) {\ncase _NavigationState():\nreturn $default(_that.pageLabel,_that.navigationItems,_that.viewMode,_that.locale,_that.currentIndex);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( PageLabel pageLabel,  List<NavigationItem> navigationItems,  ViewMode viewMode,  String? locale,  int currentIndex)?  $default,) {final _that = this;\nswitch (_that) {\ncase _NavigationState() when $default != null:\nreturn $default(_that.pageLabel,_that.navigationItems,_that.viewMode,_that.locale,_that.currentIndex);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _NavigationState implements NavigationState {\n  const _NavigationState({required this.pageLabel, required final  List<NavigationItem> navigationItems, required this.viewMode, required this.locale, required this.currentIndex}): _navigationItems = navigationItems;\n  \n\n@override final  PageLabel pageLabel;\n final  List<NavigationItem> _navigationItems;\n@override List<NavigationItem> get navigationItems {\n  if (_navigationItems is EqualUnmodifiableListView) return _navigationItems;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_navigationItems);\n}\n\n@override final  ViewMode viewMode;\n@override final  String? locale;\n@override final  int currentIndex;\n\n/// Create a copy of NavigationState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$NavigationStateCopyWith<_NavigationState> get copyWith => __$NavigationStateCopyWithImpl<_NavigationState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _NavigationState&&(identical(other.pageLabel, pageLabel) || other.pageLabel == pageLabel)&&const DeepCollectionEquality().equals(other._navigationItems, _navigationItems)&&(identical(other.viewMode, viewMode) || other.viewMode == viewMode)&&(identical(other.locale, locale) || other.locale == locale)&&(identical(other.currentIndex, currentIndex) || other.currentIndex == currentIndex));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,pageLabel,const DeepCollectionEquality().hash(_navigationItems),viewMode,locale,currentIndex);\n\n@override\nString toString() {\n  return 'NavigationState(pageLabel: $pageLabel, navigationItems: $navigationItems, viewMode: $viewMode, locale: $locale, currentIndex: $currentIndex)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$NavigationStateCopyWith<$Res> implements $NavigationStateCopyWith<$Res> {\n  factory _$NavigationStateCopyWith(_NavigationState value, $Res Function(_NavigationState) _then) = __$NavigationStateCopyWithImpl;\n@override @useResult\n$Res call({\n PageLabel pageLabel, List<NavigationItem> navigationItems, ViewMode viewMode, String? locale, int currentIndex\n});\n\n\n\n\n}\n/// @nodoc\nclass __$NavigationStateCopyWithImpl<$Res>\n    implements _$NavigationStateCopyWith<$Res> {\n  __$NavigationStateCopyWithImpl(this._self, this._then);\n\n  final _NavigationState _self;\n  final $Res Function(_NavigationState) _then;\n\n/// Create a copy of NavigationState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? pageLabel = null,Object? navigationItems = null,Object? viewMode = null,Object? locale = freezed,Object? currentIndex = null,}) {\n  return _then(_NavigationState(\npageLabel: null == pageLabel ? _self.pageLabel : pageLabel // ignore: cast_nullable_to_non_nullable\nas PageLabel,navigationItems: null == navigationItems ? _self._navigationItems : navigationItems // ignore: cast_nullable_to_non_nullable\nas List<NavigationItem>,viewMode: null == viewMode ? _self.viewMode : viewMode // ignore: cast_nullable_to_non_nullable\nas ViewMode,locale: freezed == locale ? _self.locale : locale // ignore: cast_nullable_to_non_nullable\nas String?,currentIndex: null == currentIndex ? _self.currentIndex : currentIndex // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$GroupsState {\n\n List<Group> get value;\n/// Create a copy of GroupsState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$GroupsStateCopyWith<GroupsState> get copyWith => _$GroupsStateCopyWithImpl<GroupsState>(this as GroupsState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is GroupsState&&const DeepCollectionEquality().equals(other.value, value));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(value));\n\n@override\nString toString() {\n  return 'GroupsState(value: $value)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $GroupsStateCopyWith<$Res>  {\n  factory $GroupsStateCopyWith(GroupsState value, $Res Function(GroupsState) _then) = _$GroupsStateCopyWithImpl;\n@useResult\n$Res call({\n List<Group> value\n});\n\n\n\n\n}\n/// @nodoc\nclass _$GroupsStateCopyWithImpl<$Res>\n    implements $GroupsStateCopyWith<$Res> {\n  _$GroupsStateCopyWithImpl(this._self, this._then);\n\n  final GroupsState _self;\n  final $Res Function(GroupsState) _then;\n\n/// Create a copy of GroupsState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? value = null,}) {\n  return _then(_self.copyWith(\nvalue: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable\nas List<Group>,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [GroupsState].\nextension GroupsStatePatterns on GroupsState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _GroupsState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _GroupsState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _GroupsState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _GroupsState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _GroupsState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _GroupsState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( List<Group> value)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _GroupsState() when $default != null:\nreturn $default(_that.value);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( List<Group> value)  $default,) {final _that = this;\nswitch (_that) {\ncase _GroupsState():\nreturn $default(_that.value);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( List<Group> value)?  $default,) {final _that = this;\nswitch (_that) {\ncase _GroupsState() when $default != null:\nreturn $default(_that.value);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _GroupsState implements GroupsState {\n  const _GroupsState({required final  List<Group> value}): _value = value;\n  \n\n final  List<Group> _value;\n@override List<Group> get value {\n  if (_value is EqualUnmodifiableListView) return _value;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_value);\n}\n\n\n/// Create a copy of GroupsState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$GroupsStateCopyWith<_GroupsState> get copyWith => __$GroupsStateCopyWithImpl<_GroupsState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _GroupsState&&const DeepCollectionEquality().equals(other._value, _value));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_value));\n\n@override\nString toString() {\n  return 'GroupsState(value: $value)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$GroupsStateCopyWith<$Res> implements $GroupsStateCopyWith<$Res> {\n  factory _$GroupsStateCopyWith(_GroupsState value, $Res Function(_GroupsState) _then) = __$GroupsStateCopyWithImpl;\n@override @useResult\n$Res call({\n List<Group> value\n});\n\n\n\n\n}\n/// @nodoc\nclass __$GroupsStateCopyWithImpl<$Res>\n    implements _$GroupsStateCopyWith<$Res> {\n  __$GroupsStateCopyWithImpl(this._self, this._then);\n\n  final _GroupsState _self;\n  final $Res Function(_GroupsState) _then;\n\n/// Create a copy of GroupsState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? value = null,}) {\n  return _then(_GroupsState(\nvalue: null == value ? _self._value : value // ignore: cast_nullable_to_non_nullable\nas List<Group>,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$NavigationItemsState {\n\n List<NavigationItem> get value;\n/// Create a copy of NavigationItemsState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$NavigationItemsStateCopyWith<NavigationItemsState> get copyWith => _$NavigationItemsStateCopyWithImpl<NavigationItemsState>(this as NavigationItemsState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is NavigationItemsState&&const DeepCollectionEquality().equals(other.value, value));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(value));\n\n@override\nString toString() {\n  return 'NavigationItemsState(value: $value)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $NavigationItemsStateCopyWith<$Res>  {\n  factory $NavigationItemsStateCopyWith(NavigationItemsState value, $Res Function(NavigationItemsState) _then) = _$NavigationItemsStateCopyWithImpl;\n@useResult\n$Res call({\n List<NavigationItem> value\n});\n\n\n\n\n}\n/// @nodoc\nclass _$NavigationItemsStateCopyWithImpl<$Res>\n    implements $NavigationItemsStateCopyWith<$Res> {\n  _$NavigationItemsStateCopyWithImpl(this._self, this._then);\n\n  final NavigationItemsState _self;\n  final $Res Function(NavigationItemsState) _then;\n\n/// Create a copy of NavigationItemsState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? value = null,}) {\n  return _then(_self.copyWith(\nvalue: null == value ? _self.value : value // ignore: cast_nullable_to_non_nullable\nas List<NavigationItem>,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [NavigationItemsState].\nextension NavigationItemsStatePatterns on NavigationItemsState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _NavigationItemsState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _NavigationItemsState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _NavigationItemsState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _NavigationItemsState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _NavigationItemsState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _NavigationItemsState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( List<NavigationItem> value)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _NavigationItemsState() when $default != null:\nreturn $default(_that.value);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( List<NavigationItem> value)  $default,) {final _that = this;\nswitch (_that) {\ncase _NavigationItemsState():\nreturn $default(_that.value);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( List<NavigationItem> value)?  $default,) {final _that = this;\nswitch (_that) {\ncase _NavigationItemsState() when $default != null:\nreturn $default(_that.value);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _NavigationItemsState implements NavigationItemsState {\n  const _NavigationItemsState({required final  List<NavigationItem> value}): _value = value;\n  \n\n final  List<NavigationItem> _value;\n@override List<NavigationItem> get value {\n  if (_value is EqualUnmodifiableListView) return _value;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_value);\n}\n\n\n/// Create a copy of NavigationItemsState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$NavigationItemsStateCopyWith<_NavigationItemsState> get copyWith => __$NavigationItemsStateCopyWithImpl<_NavigationItemsState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _NavigationItemsState&&const DeepCollectionEquality().equals(other._value, _value));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_value));\n\n@override\nString toString() {\n  return 'NavigationItemsState(value: $value)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$NavigationItemsStateCopyWith<$Res> implements $NavigationItemsStateCopyWith<$Res> {\n  factory _$NavigationItemsStateCopyWith(_NavigationItemsState value, $Res Function(_NavigationItemsState) _then) = __$NavigationItemsStateCopyWithImpl;\n@override @useResult\n$Res call({\n List<NavigationItem> value\n});\n\n\n\n\n}\n/// @nodoc\nclass __$NavigationItemsStateCopyWithImpl<$Res>\n    implements _$NavigationItemsStateCopyWith<$Res> {\n  __$NavigationItemsStateCopyWithImpl(this._self, this._then);\n\n  final _NavigationItemsState _self;\n  final $Res Function(_NavigationItemsState) _then;\n\n/// Create a copy of NavigationItemsState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? value = null,}) {\n  return _then(_NavigationItemsState(\nvalue: null == value ? _self._value : value // ignore: cast_nullable_to_non_nullable\nas List<NavigationItem>,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$ProxiesListState {\n\n List<Group> get groups; Set<String> get currentUnfoldSet; ProxyCardType get proxyCardType; int get columns;\n/// Create a copy of ProxiesListState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ProxiesListStateCopyWith<ProxiesListState> get copyWith => _$ProxiesListStateCopyWithImpl<ProxiesListState>(this as ProxiesListState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ProxiesListState&&const DeepCollectionEquality().equals(other.groups, groups)&&const DeepCollectionEquality().equals(other.currentUnfoldSet, currentUnfoldSet)&&(identical(other.proxyCardType, proxyCardType) || other.proxyCardType == proxyCardType)&&(identical(other.columns, columns) || other.columns == columns));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(groups),const DeepCollectionEquality().hash(currentUnfoldSet),proxyCardType,columns);\n\n@override\nString toString() {\n  return 'ProxiesListState(groups: $groups, currentUnfoldSet: $currentUnfoldSet, proxyCardType: $proxyCardType, columns: $columns)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ProxiesListStateCopyWith<$Res>  {\n  factory $ProxiesListStateCopyWith(ProxiesListState value, $Res Function(ProxiesListState) _then) = _$ProxiesListStateCopyWithImpl;\n@useResult\n$Res call({\n List<Group> groups, Set<String> currentUnfoldSet, ProxyCardType proxyCardType, int columns\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ProxiesListStateCopyWithImpl<$Res>\n    implements $ProxiesListStateCopyWith<$Res> {\n  _$ProxiesListStateCopyWithImpl(this._self, this._then);\n\n  final ProxiesListState _self;\n  final $Res Function(ProxiesListState) _then;\n\n/// Create a copy of ProxiesListState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? groups = null,Object? currentUnfoldSet = null,Object? proxyCardType = null,Object? columns = null,}) {\n  return _then(_self.copyWith(\ngroups: null == groups ? _self.groups : groups // ignore: cast_nullable_to_non_nullable\nas List<Group>,currentUnfoldSet: null == currentUnfoldSet ? _self.currentUnfoldSet : currentUnfoldSet // ignore: cast_nullable_to_non_nullable\nas Set<String>,proxyCardType: null == proxyCardType ? _self.proxyCardType : proxyCardType // ignore: cast_nullable_to_non_nullable\nas ProxyCardType,columns: null == columns ? _self.columns : columns // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [ProxiesListState].\nextension ProxiesListStatePatterns on ProxiesListState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ProxiesListState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ProxiesListState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ProxiesListState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProxiesListState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ProxiesListState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProxiesListState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( List<Group> groups,  Set<String> currentUnfoldSet,  ProxyCardType proxyCardType,  int columns)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ProxiesListState() when $default != null:\nreturn $default(_that.groups,_that.currentUnfoldSet,_that.proxyCardType,_that.columns);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( List<Group> groups,  Set<String> currentUnfoldSet,  ProxyCardType proxyCardType,  int columns)  $default,) {final _that = this;\nswitch (_that) {\ncase _ProxiesListState():\nreturn $default(_that.groups,_that.currentUnfoldSet,_that.proxyCardType,_that.columns);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( List<Group> groups,  Set<String> currentUnfoldSet,  ProxyCardType proxyCardType,  int columns)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ProxiesListState() when $default != null:\nreturn $default(_that.groups,_that.currentUnfoldSet,_that.proxyCardType,_that.columns);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _ProxiesListState implements ProxiesListState {\n  const _ProxiesListState({required final  List<Group> groups, required final  Set<String> currentUnfoldSet, required this.proxyCardType, required this.columns}): _groups = groups,_currentUnfoldSet = currentUnfoldSet;\n  \n\n final  List<Group> _groups;\n@override List<Group> get groups {\n  if (_groups is EqualUnmodifiableListView) return _groups;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_groups);\n}\n\n final  Set<String> _currentUnfoldSet;\n@override Set<String> get currentUnfoldSet {\n  if (_currentUnfoldSet is EqualUnmodifiableSetView) return _currentUnfoldSet;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableSetView(_currentUnfoldSet);\n}\n\n@override final  ProxyCardType proxyCardType;\n@override final  int columns;\n\n/// Create a copy of ProxiesListState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ProxiesListStateCopyWith<_ProxiesListState> get copyWith => __$ProxiesListStateCopyWithImpl<_ProxiesListState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProxiesListState&&const DeepCollectionEquality().equals(other._groups, _groups)&&const DeepCollectionEquality().equals(other._currentUnfoldSet, _currentUnfoldSet)&&(identical(other.proxyCardType, proxyCardType) || other.proxyCardType == proxyCardType)&&(identical(other.columns, columns) || other.columns == columns));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_groups),const DeepCollectionEquality().hash(_currentUnfoldSet),proxyCardType,columns);\n\n@override\nString toString() {\n  return 'ProxiesListState(groups: $groups, currentUnfoldSet: $currentUnfoldSet, proxyCardType: $proxyCardType, columns: $columns)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ProxiesListStateCopyWith<$Res> implements $ProxiesListStateCopyWith<$Res> {\n  factory _$ProxiesListStateCopyWith(_ProxiesListState value, $Res Function(_ProxiesListState) _then) = __$ProxiesListStateCopyWithImpl;\n@override @useResult\n$Res call({\n List<Group> groups, Set<String> currentUnfoldSet, ProxyCardType proxyCardType, int columns\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ProxiesListStateCopyWithImpl<$Res>\n    implements _$ProxiesListStateCopyWith<$Res> {\n  __$ProxiesListStateCopyWithImpl(this._self, this._then);\n\n  final _ProxiesListState _self;\n  final $Res Function(_ProxiesListState) _then;\n\n/// Create a copy of ProxiesListState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? groups = null,Object? currentUnfoldSet = null,Object? proxyCardType = null,Object? columns = null,}) {\n  return _then(_ProxiesListState(\ngroups: null == groups ? _self._groups : groups // ignore: cast_nullable_to_non_nullable\nas List<Group>,currentUnfoldSet: null == currentUnfoldSet ? _self._currentUnfoldSet : currentUnfoldSet // ignore: cast_nullable_to_non_nullable\nas Set<String>,proxyCardType: null == proxyCardType ? _self.proxyCardType : proxyCardType // ignore: cast_nullable_to_non_nullable\nas ProxyCardType,columns: null == columns ? _self.columns : columns // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$ProxiesTabState {\n\n List<Group> get groups; String? get currentGroupName; ProxyCardType get proxyCardType; int get columns;\n/// Create a copy of ProxiesTabState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ProxiesTabStateCopyWith<ProxiesTabState> get copyWith => _$ProxiesTabStateCopyWithImpl<ProxiesTabState>(this as ProxiesTabState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ProxiesTabState&&const DeepCollectionEquality().equals(other.groups, groups)&&(identical(other.currentGroupName, currentGroupName) || other.currentGroupName == currentGroupName)&&(identical(other.proxyCardType, proxyCardType) || other.proxyCardType == proxyCardType)&&(identical(other.columns, columns) || other.columns == columns));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(groups),currentGroupName,proxyCardType,columns);\n\n@override\nString toString() {\n  return 'ProxiesTabState(groups: $groups, currentGroupName: $currentGroupName, proxyCardType: $proxyCardType, columns: $columns)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ProxiesTabStateCopyWith<$Res>  {\n  factory $ProxiesTabStateCopyWith(ProxiesTabState value, $Res Function(ProxiesTabState) _then) = _$ProxiesTabStateCopyWithImpl;\n@useResult\n$Res call({\n List<Group> groups, String? currentGroupName, ProxyCardType proxyCardType, int columns\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ProxiesTabStateCopyWithImpl<$Res>\n    implements $ProxiesTabStateCopyWith<$Res> {\n  _$ProxiesTabStateCopyWithImpl(this._self, this._then);\n\n  final ProxiesTabState _self;\n  final $Res Function(ProxiesTabState) _then;\n\n/// Create a copy of ProxiesTabState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? groups = null,Object? currentGroupName = freezed,Object? proxyCardType = null,Object? columns = null,}) {\n  return _then(_self.copyWith(\ngroups: null == groups ? _self.groups : groups // ignore: cast_nullable_to_non_nullable\nas List<Group>,currentGroupName: freezed == currentGroupName ? _self.currentGroupName : currentGroupName // ignore: cast_nullable_to_non_nullable\nas String?,proxyCardType: null == proxyCardType ? _self.proxyCardType : proxyCardType // ignore: cast_nullable_to_non_nullable\nas ProxyCardType,columns: null == columns ? _self.columns : columns // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [ProxiesTabState].\nextension ProxiesTabStatePatterns on ProxiesTabState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ProxiesTabState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ProxiesTabState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ProxiesTabState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProxiesTabState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ProxiesTabState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProxiesTabState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( List<Group> groups,  String? currentGroupName,  ProxyCardType proxyCardType,  int columns)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ProxiesTabState() when $default != null:\nreturn $default(_that.groups,_that.currentGroupName,_that.proxyCardType,_that.columns);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( List<Group> groups,  String? currentGroupName,  ProxyCardType proxyCardType,  int columns)  $default,) {final _that = this;\nswitch (_that) {\ncase _ProxiesTabState():\nreturn $default(_that.groups,_that.currentGroupName,_that.proxyCardType,_that.columns);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( List<Group> groups,  String? currentGroupName,  ProxyCardType proxyCardType,  int columns)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ProxiesTabState() when $default != null:\nreturn $default(_that.groups,_that.currentGroupName,_that.proxyCardType,_that.columns);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _ProxiesTabState implements ProxiesTabState {\n  const _ProxiesTabState({required final  List<Group> groups, required this.currentGroupName, required this.proxyCardType, required this.columns}): _groups = groups;\n  \n\n final  List<Group> _groups;\n@override List<Group> get groups {\n  if (_groups is EqualUnmodifiableListView) return _groups;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_groups);\n}\n\n@override final  String? currentGroupName;\n@override final  ProxyCardType proxyCardType;\n@override final  int columns;\n\n/// Create a copy of ProxiesTabState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ProxiesTabStateCopyWith<_ProxiesTabState> get copyWith => __$ProxiesTabStateCopyWithImpl<_ProxiesTabState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProxiesTabState&&const DeepCollectionEquality().equals(other._groups, _groups)&&(identical(other.currentGroupName, currentGroupName) || other.currentGroupName == currentGroupName)&&(identical(other.proxyCardType, proxyCardType) || other.proxyCardType == proxyCardType)&&(identical(other.columns, columns) || other.columns == columns));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_groups),currentGroupName,proxyCardType,columns);\n\n@override\nString toString() {\n  return 'ProxiesTabState(groups: $groups, currentGroupName: $currentGroupName, proxyCardType: $proxyCardType, columns: $columns)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ProxiesTabStateCopyWith<$Res> implements $ProxiesTabStateCopyWith<$Res> {\n  factory _$ProxiesTabStateCopyWith(_ProxiesTabState value, $Res Function(_ProxiesTabState) _then) = __$ProxiesTabStateCopyWithImpl;\n@override @useResult\n$Res call({\n List<Group> groups, String? currentGroupName, ProxyCardType proxyCardType, int columns\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ProxiesTabStateCopyWithImpl<$Res>\n    implements _$ProxiesTabStateCopyWith<$Res> {\n  __$ProxiesTabStateCopyWithImpl(this._self, this._then);\n\n  final _ProxiesTabState _self;\n  final $Res Function(_ProxiesTabState) _then;\n\n/// Create a copy of ProxiesTabState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? groups = null,Object? currentGroupName = freezed,Object? proxyCardType = null,Object? columns = null,}) {\n  return _then(_ProxiesTabState(\ngroups: null == groups ? _self._groups : groups // ignore: cast_nullable_to_non_nullable\nas List<Group>,currentGroupName: freezed == currentGroupName ? _self.currentGroupName : currentGroupName // ignore: cast_nullable_to_non_nullable\nas String?,proxyCardType: null == proxyCardType ? _self.proxyCardType : proxyCardType // ignore: cast_nullable_to_non_nullable\nas ProxyCardType,columns: null == columns ? _self.columns : columns // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$ProxyGroupSelectorState {\n\n String? get testUrl; ProxiesSortType get proxiesSortType; ProxyCardType get proxyCardType; num get sortNum; GroupType get groupType; List<Proxy> get proxies; int get columns;\n/// Create a copy of ProxyGroupSelectorState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ProxyGroupSelectorStateCopyWith<ProxyGroupSelectorState> get copyWith => _$ProxyGroupSelectorStateCopyWithImpl<ProxyGroupSelectorState>(this as ProxyGroupSelectorState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ProxyGroupSelectorState&&(identical(other.testUrl, testUrl) || other.testUrl == testUrl)&&(identical(other.proxiesSortType, proxiesSortType) || other.proxiesSortType == proxiesSortType)&&(identical(other.proxyCardType, proxyCardType) || other.proxyCardType == proxyCardType)&&(identical(other.sortNum, sortNum) || other.sortNum == sortNum)&&(identical(other.groupType, groupType) || other.groupType == groupType)&&const DeepCollectionEquality().equals(other.proxies, proxies)&&(identical(other.columns, columns) || other.columns == columns));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,testUrl,proxiesSortType,proxyCardType,sortNum,groupType,const DeepCollectionEquality().hash(proxies),columns);\n\n@override\nString toString() {\n  return 'ProxyGroupSelectorState(testUrl: $testUrl, proxiesSortType: $proxiesSortType, proxyCardType: $proxyCardType, sortNum: $sortNum, groupType: $groupType, proxies: $proxies, columns: $columns)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ProxyGroupSelectorStateCopyWith<$Res>  {\n  factory $ProxyGroupSelectorStateCopyWith(ProxyGroupSelectorState value, $Res Function(ProxyGroupSelectorState) _then) = _$ProxyGroupSelectorStateCopyWithImpl;\n@useResult\n$Res call({\n String? testUrl, ProxiesSortType proxiesSortType, ProxyCardType proxyCardType, num sortNum, GroupType groupType, List<Proxy> proxies, int columns\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ProxyGroupSelectorStateCopyWithImpl<$Res>\n    implements $ProxyGroupSelectorStateCopyWith<$Res> {\n  _$ProxyGroupSelectorStateCopyWithImpl(this._self, this._then);\n\n  final ProxyGroupSelectorState _self;\n  final $Res Function(ProxyGroupSelectorState) _then;\n\n/// Create a copy of ProxyGroupSelectorState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? testUrl = freezed,Object? proxiesSortType = null,Object? proxyCardType = null,Object? sortNum = null,Object? groupType = null,Object? proxies = null,Object? columns = null,}) {\n  return _then(_self.copyWith(\ntestUrl: freezed == testUrl ? _self.testUrl : testUrl // ignore: cast_nullable_to_non_nullable\nas String?,proxiesSortType: null == proxiesSortType ? _self.proxiesSortType : proxiesSortType // ignore: cast_nullable_to_non_nullable\nas ProxiesSortType,proxyCardType: null == proxyCardType ? _self.proxyCardType : proxyCardType // ignore: cast_nullable_to_non_nullable\nas ProxyCardType,sortNum: null == sortNum ? _self.sortNum : sortNum // ignore: cast_nullable_to_non_nullable\nas num,groupType: null == groupType ? _self.groupType : groupType // ignore: cast_nullable_to_non_nullable\nas GroupType,proxies: null == proxies ? _self.proxies : proxies // ignore: cast_nullable_to_non_nullable\nas List<Proxy>,columns: null == columns ? _self.columns : columns // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [ProxyGroupSelectorState].\nextension ProxyGroupSelectorStatePatterns on ProxyGroupSelectorState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ProxyGroupSelectorState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ProxyGroupSelectorState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ProxyGroupSelectorState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProxyGroupSelectorState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ProxyGroupSelectorState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProxyGroupSelectorState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? testUrl,  ProxiesSortType proxiesSortType,  ProxyCardType proxyCardType,  num sortNum,  GroupType groupType,  List<Proxy> proxies,  int columns)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ProxyGroupSelectorState() when $default != null:\nreturn $default(_that.testUrl,_that.proxiesSortType,_that.proxyCardType,_that.sortNum,_that.groupType,_that.proxies,_that.columns);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? testUrl,  ProxiesSortType proxiesSortType,  ProxyCardType proxyCardType,  num sortNum,  GroupType groupType,  List<Proxy> proxies,  int columns)  $default,) {final _that = this;\nswitch (_that) {\ncase _ProxyGroupSelectorState():\nreturn $default(_that.testUrl,_that.proxiesSortType,_that.proxyCardType,_that.sortNum,_that.groupType,_that.proxies,_that.columns);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? testUrl,  ProxiesSortType proxiesSortType,  ProxyCardType proxyCardType,  num sortNum,  GroupType groupType,  List<Proxy> proxies,  int columns)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ProxyGroupSelectorState() when $default != null:\nreturn $default(_that.testUrl,_that.proxiesSortType,_that.proxyCardType,_that.sortNum,_that.groupType,_that.proxies,_that.columns);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _ProxyGroupSelectorState implements ProxyGroupSelectorState {\n  const _ProxyGroupSelectorState({required this.testUrl, required this.proxiesSortType, required this.proxyCardType, required this.sortNum, required this.groupType, required final  List<Proxy> proxies, required this.columns}): _proxies = proxies;\n  \n\n@override final  String? testUrl;\n@override final  ProxiesSortType proxiesSortType;\n@override final  ProxyCardType proxyCardType;\n@override final  num sortNum;\n@override final  GroupType groupType;\n final  List<Proxy> _proxies;\n@override List<Proxy> get proxies {\n  if (_proxies is EqualUnmodifiableListView) return _proxies;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_proxies);\n}\n\n@override final  int columns;\n\n/// Create a copy of ProxyGroupSelectorState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ProxyGroupSelectorStateCopyWith<_ProxyGroupSelectorState> get copyWith => __$ProxyGroupSelectorStateCopyWithImpl<_ProxyGroupSelectorState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProxyGroupSelectorState&&(identical(other.testUrl, testUrl) || other.testUrl == testUrl)&&(identical(other.proxiesSortType, proxiesSortType) || other.proxiesSortType == proxiesSortType)&&(identical(other.proxyCardType, proxyCardType) || other.proxyCardType == proxyCardType)&&(identical(other.sortNum, sortNum) || other.sortNum == sortNum)&&(identical(other.groupType, groupType) || other.groupType == groupType)&&const DeepCollectionEquality().equals(other._proxies, _proxies)&&(identical(other.columns, columns) || other.columns == columns));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,testUrl,proxiesSortType,proxyCardType,sortNum,groupType,const DeepCollectionEquality().hash(_proxies),columns);\n\n@override\nString toString() {\n  return 'ProxyGroupSelectorState(testUrl: $testUrl, proxiesSortType: $proxiesSortType, proxyCardType: $proxyCardType, sortNum: $sortNum, groupType: $groupType, proxies: $proxies, columns: $columns)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ProxyGroupSelectorStateCopyWith<$Res> implements $ProxyGroupSelectorStateCopyWith<$Res> {\n  factory _$ProxyGroupSelectorStateCopyWith(_ProxyGroupSelectorState value, $Res Function(_ProxyGroupSelectorState) _then) = __$ProxyGroupSelectorStateCopyWithImpl;\n@override @useResult\n$Res call({\n String? testUrl, ProxiesSortType proxiesSortType, ProxyCardType proxyCardType, num sortNum, GroupType groupType, List<Proxy> proxies, int columns\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ProxyGroupSelectorStateCopyWithImpl<$Res>\n    implements _$ProxyGroupSelectorStateCopyWith<$Res> {\n  __$ProxyGroupSelectorStateCopyWithImpl(this._self, this._then);\n\n  final _ProxyGroupSelectorState _self;\n  final $Res Function(_ProxyGroupSelectorState) _then;\n\n/// Create a copy of ProxyGroupSelectorState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? testUrl = freezed,Object? proxiesSortType = null,Object? proxyCardType = null,Object? sortNum = null,Object? groupType = null,Object? proxies = null,Object? columns = null,}) {\n  return _then(_ProxyGroupSelectorState(\ntestUrl: freezed == testUrl ? _self.testUrl : testUrl // ignore: cast_nullable_to_non_nullable\nas String?,proxiesSortType: null == proxiesSortType ? _self.proxiesSortType : proxiesSortType // ignore: cast_nullable_to_non_nullable\nas ProxiesSortType,proxyCardType: null == proxyCardType ? _self.proxyCardType : proxyCardType // ignore: cast_nullable_to_non_nullable\nas ProxyCardType,sortNum: null == sortNum ? _self.sortNum : sortNum // ignore: cast_nullable_to_non_nullable\nas num,groupType: null == groupType ? _self.groupType : groupType // ignore: cast_nullable_to_non_nullable\nas GroupType,proxies: null == proxies ? _self._proxies : proxies // ignore: cast_nullable_to_non_nullable\nas List<Proxy>,columns: null == columns ? _self.columns : columns // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$MoreToolsSelectorState {\n\n List<NavigationItem> get navigationItems;\n/// Create a copy of MoreToolsSelectorState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$MoreToolsSelectorStateCopyWith<MoreToolsSelectorState> get copyWith => _$MoreToolsSelectorStateCopyWithImpl<MoreToolsSelectorState>(this as MoreToolsSelectorState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is MoreToolsSelectorState&&const DeepCollectionEquality().equals(other.navigationItems, navigationItems));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(navigationItems));\n\n@override\nString toString() {\n  return 'MoreToolsSelectorState(navigationItems: $navigationItems)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $MoreToolsSelectorStateCopyWith<$Res>  {\n  factory $MoreToolsSelectorStateCopyWith(MoreToolsSelectorState value, $Res Function(MoreToolsSelectorState) _then) = _$MoreToolsSelectorStateCopyWithImpl;\n@useResult\n$Res call({\n List<NavigationItem> navigationItems\n});\n\n\n\n\n}\n/// @nodoc\nclass _$MoreToolsSelectorStateCopyWithImpl<$Res>\n    implements $MoreToolsSelectorStateCopyWith<$Res> {\n  _$MoreToolsSelectorStateCopyWithImpl(this._self, this._then);\n\n  final MoreToolsSelectorState _self;\n  final $Res Function(MoreToolsSelectorState) _then;\n\n/// Create a copy of MoreToolsSelectorState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? navigationItems = null,}) {\n  return _then(_self.copyWith(\nnavigationItems: null == navigationItems ? _self.navigationItems : navigationItems // ignore: cast_nullable_to_non_nullable\nas List<NavigationItem>,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [MoreToolsSelectorState].\nextension MoreToolsSelectorStatePatterns on MoreToolsSelectorState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _MoreToolsSelectorState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _MoreToolsSelectorState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _MoreToolsSelectorState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _MoreToolsSelectorState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _MoreToolsSelectorState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _MoreToolsSelectorState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( List<NavigationItem> navigationItems)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _MoreToolsSelectorState() when $default != null:\nreturn $default(_that.navigationItems);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( List<NavigationItem> navigationItems)  $default,) {final _that = this;\nswitch (_that) {\ncase _MoreToolsSelectorState():\nreturn $default(_that.navigationItems);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( List<NavigationItem> navigationItems)?  $default,) {final _that = this;\nswitch (_that) {\ncase _MoreToolsSelectorState() when $default != null:\nreturn $default(_that.navigationItems);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _MoreToolsSelectorState implements MoreToolsSelectorState {\n  const _MoreToolsSelectorState({required final  List<NavigationItem> navigationItems}): _navigationItems = navigationItems;\n  \n\n final  List<NavigationItem> _navigationItems;\n@override List<NavigationItem> get navigationItems {\n  if (_navigationItems is EqualUnmodifiableListView) return _navigationItems;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_navigationItems);\n}\n\n\n/// Create a copy of MoreToolsSelectorState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$MoreToolsSelectorStateCopyWith<_MoreToolsSelectorState> get copyWith => __$MoreToolsSelectorStateCopyWithImpl<_MoreToolsSelectorState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _MoreToolsSelectorState&&const DeepCollectionEquality().equals(other._navigationItems, _navigationItems));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_navigationItems));\n\n@override\nString toString() {\n  return 'MoreToolsSelectorState(navigationItems: $navigationItems)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$MoreToolsSelectorStateCopyWith<$Res> implements $MoreToolsSelectorStateCopyWith<$Res> {\n  factory _$MoreToolsSelectorStateCopyWith(_MoreToolsSelectorState value, $Res Function(_MoreToolsSelectorState) _then) = __$MoreToolsSelectorStateCopyWithImpl;\n@override @useResult\n$Res call({\n List<NavigationItem> navigationItems\n});\n\n\n\n\n}\n/// @nodoc\nclass __$MoreToolsSelectorStateCopyWithImpl<$Res>\n    implements _$MoreToolsSelectorStateCopyWith<$Res> {\n  __$MoreToolsSelectorStateCopyWithImpl(this._self, this._then);\n\n  final _MoreToolsSelectorState _self;\n  final $Res Function(_MoreToolsSelectorState) _then;\n\n/// Create a copy of MoreToolsSelectorState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? navigationItems = null,}) {\n  return _then(_MoreToolsSelectorState(\nnavigationItems: null == navigationItems ? _self._navigationItems : navigationItems // ignore: cast_nullable_to_non_nullable\nas List<NavigationItem>,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$PackageListSelectorState {\n\n List<Package> get packages; AccessControlProps get accessControlProps;\n/// Create a copy of PackageListSelectorState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$PackageListSelectorStateCopyWith<PackageListSelectorState> get copyWith => _$PackageListSelectorStateCopyWithImpl<PackageListSelectorState>(this as PackageListSelectorState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is PackageListSelectorState&&const DeepCollectionEquality().equals(other.packages, packages)&&(identical(other.accessControlProps, accessControlProps) || other.accessControlProps == accessControlProps));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(packages),accessControlProps);\n\n@override\nString toString() {\n  return 'PackageListSelectorState(packages: $packages, accessControlProps: $accessControlProps)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $PackageListSelectorStateCopyWith<$Res>  {\n  factory $PackageListSelectorStateCopyWith(PackageListSelectorState value, $Res Function(PackageListSelectorState) _then) = _$PackageListSelectorStateCopyWithImpl;\n@useResult\n$Res call({\n List<Package> packages, AccessControlProps accessControlProps\n});\n\n\n$AccessControlPropsCopyWith<$Res> get accessControlProps;\n\n}\n/// @nodoc\nclass _$PackageListSelectorStateCopyWithImpl<$Res>\n    implements $PackageListSelectorStateCopyWith<$Res> {\n  _$PackageListSelectorStateCopyWithImpl(this._self, this._then);\n\n  final PackageListSelectorState _self;\n  final $Res Function(PackageListSelectorState) _then;\n\n/// Create a copy of PackageListSelectorState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? packages = null,Object? accessControlProps = null,}) {\n  return _then(_self.copyWith(\npackages: null == packages ? _self.packages : packages // ignore: cast_nullable_to_non_nullable\nas List<Package>,accessControlProps: null == accessControlProps ? _self.accessControlProps : accessControlProps // ignore: cast_nullable_to_non_nullable\nas AccessControlProps,\n  ));\n}\n/// Create a copy of PackageListSelectorState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$AccessControlPropsCopyWith<$Res> get accessControlProps {\n  \n  return $AccessControlPropsCopyWith<$Res>(_self.accessControlProps, (value) {\n    return _then(_self.copyWith(accessControlProps: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [PackageListSelectorState].\nextension PackageListSelectorStatePatterns on PackageListSelectorState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _PackageListSelectorState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _PackageListSelectorState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _PackageListSelectorState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _PackageListSelectorState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _PackageListSelectorState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _PackageListSelectorState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( List<Package> packages,  AccessControlProps accessControlProps)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _PackageListSelectorState() when $default != null:\nreturn $default(_that.packages,_that.accessControlProps);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( List<Package> packages,  AccessControlProps accessControlProps)  $default,) {final _that = this;\nswitch (_that) {\ncase _PackageListSelectorState():\nreturn $default(_that.packages,_that.accessControlProps);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( List<Package> packages,  AccessControlProps accessControlProps)?  $default,) {final _that = this;\nswitch (_that) {\ncase _PackageListSelectorState() when $default != null:\nreturn $default(_that.packages,_that.accessControlProps);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _PackageListSelectorState implements PackageListSelectorState {\n  const _PackageListSelectorState({required final  List<Package> packages, required this.accessControlProps}): _packages = packages;\n  \n\n final  List<Package> _packages;\n@override List<Package> get packages {\n  if (_packages is EqualUnmodifiableListView) return _packages;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_packages);\n}\n\n@override final  AccessControlProps accessControlProps;\n\n/// Create a copy of PackageListSelectorState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$PackageListSelectorStateCopyWith<_PackageListSelectorState> get copyWith => __$PackageListSelectorStateCopyWithImpl<_PackageListSelectorState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _PackageListSelectorState&&const DeepCollectionEquality().equals(other._packages, _packages)&&(identical(other.accessControlProps, accessControlProps) || other.accessControlProps == accessControlProps));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_packages),accessControlProps);\n\n@override\nString toString() {\n  return 'PackageListSelectorState(packages: $packages, accessControlProps: $accessControlProps)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$PackageListSelectorStateCopyWith<$Res> implements $PackageListSelectorStateCopyWith<$Res> {\n  factory _$PackageListSelectorStateCopyWith(_PackageListSelectorState value, $Res Function(_PackageListSelectorState) _then) = __$PackageListSelectorStateCopyWithImpl;\n@override @useResult\n$Res call({\n List<Package> packages, AccessControlProps accessControlProps\n});\n\n\n@override $AccessControlPropsCopyWith<$Res> get accessControlProps;\n\n}\n/// @nodoc\nclass __$PackageListSelectorStateCopyWithImpl<$Res>\n    implements _$PackageListSelectorStateCopyWith<$Res> {\n  __$PackageListSelectorStateCopyWithImpl(this._self, this._then);\n\n  final _PackageListSelectorState _self;\n  final $Res Function(_PackageListSelectorState) _then;\n\n/// Create a copy of PackageListSelectorState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? packages = null,Object? accessControlProps = null,}) {\n  return _then(_PackageListSelectorState(\npackages: null == packages ? _self._packages : packages // ignore: cast_nullable_to_non_nullable\nas List<Package>,accessControlProps: null == accessControlProps ? _self.accessControlProps : accessControlProps // ignore: cast_nullable_to_non_nullable\nas AccessControlProps,\n  ));\n}\n\n/// Create a copy of PackageListSelectorState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$AccessControlPropsCopyWith<$Res> get accessControlProps {\n  \n  return $AccessControlPropsCopyWith<$Res>(_self.accessControlProps, (value) {\n    return _then(_self.copyWith(accessControlProps: value));\n  });\n}\n}\n\n/// @nodoc\nmixin _$ProxiesListHeaderSelectorState {\n\n double get offset; int get currentIndex;\n/// Create a copy of ProxiesListHeaderSelectorState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ProxiesListHeaderSelectorStateCopyWith<ProxiesListHeaderSelectorState> get copyWith => _$ProxiesListHeaderSelectorStateCopyWithImpl<ProxiesListHeaderSelectorState>(this as ProxiesListHeaderSelectorState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ProxiesListHeaderSelectorState&&(identical(other.offset, offset) || other.offset == offset)&&(identical(other.currentIndex, currentIndex) || other.currentIndex == currentIndex));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,offset,currentIndex);\n\n@override\nString toString() {\n  return 'ProxiesListHeaderSelectorState(offset: $offset, currentIndex: $currentIndex)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ProxiesListHeaderSelectorStateCopyWith<$Res>  {\n  factory $ProxiesListHeaderSelectorStateCopyWith(ProxiesListHeaderSelectorState value, $Res Function(ProxiesListHeaderSelectorState) _then) = _$ProxiesListHeaderSelectorStateCopyWithImpl;\n@useResult\n$Res call({\n double offset, int currentIndex\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ProxiesListHeaderSelectorStateCopyWithImpl<$Res>\n    implements $ProxiesListHeaderSelectorStateCopyWith<$Res> {\n  _$ProxiesListHeaderSelectorStateCopyWithImpl(this._self, this._then);\n\n  final ProxiesListHeaderSelectorState _self;\n  final $Res Function(ProxiesListHeaderSelectorState) _then;\n\n/// Create a copy of ProxiesListHeaderSelectorState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? offset = null,Object? currentIndex = null,}) {\n  return _then(_self.copyWith(\noffset: null == offset ? _self.offset : offset // ignore: cast_nullable_to_non_nullable\nas double,currentIndex: null == currentIndex ? _self.currentIndex : currentIndex // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [ProxiesListHeaderSelectorState].\nextension ProxiesListHeaderSelectorStatePatterns on ProxiesListHeaderSelectorState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ProxiesListHeaderSelectorState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ProxiesListHeaderSelectorState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ProxiesListHeaderSelectorState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProxiesListHeaderSelectorState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ProxiesListHeaderSelectorState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProxiesListHeaderSelectorState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( double offset,  int currentIndex)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ProxiesListHeaderSelectorState() when $default != null:\nreturn $default(_that.offset,_that.currentIndex);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( double offset,  int currentIndex)  $default,) {final _that = this;\nswitch (_that) {\ncase _ProxiesListHeaderSelectorState():\nreturn $default(_that.offset,_that.currentIndex);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( double offset,  int currentIndex)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ProxiesListHeaderSelectorState() when $default != null:\nreturn $default(_that.offset,_that.currentIndex);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _ProxiesListHeaderSelectorState implements ProxiesListHeaderSelectorState {\n  const _ProxiesListHeaderSelectorState({required this.offset, required this.currentIndex});\n  \n\n@override final  double offset;\n@override final  int currentIndex;\n\n/// Create a copy of ProxiesListHeaderSelectorState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ProxiesListHeaderSelectorStateCopyWith<_ProxiesListHeaderSelectorState> get copyWith => __$ProxiesListHeaderSelectorStateCopyWithImpl<_ProxiesListHeaderSelectorState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProxiesListHeaderSelectorState&&(identical(other.offset, offset) || other.offset == offset)&&(identical(other.currentIndex, currentIndex) || other.currentIndex == currentIndex));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,offset,currentIndex);\n\n@override\nString toString() {\n  return 'ProxiesListHeaderSelectorState(offset: $offset, currentIndex: $currentIndex)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ProxiesListHeaderSelectorStateCopyWith<$Res> implements $ProxiesListHeaderSelectorStateCopyWith<$Res> {\n  factory _$ProxiesListHeaderSelectorStateCopyWith(_ProxiesListHeaderSelectorState value, $Res Function(_ProxiesListHeaderSelectorState) _then) = __$ProxiesListHeaderSelectorStateCopyWithImpl;\n@override @useResult\n$Res call({\n double offset, int currentIndex\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ProxiesListHeaderSelectorStateCopyWithImpl<$Res>\n    implements _$ProxiesListHeaderSelectorStateCopyWith<$Res> {\n  __$ProxiesListHeaderSelectorStateCopyWithImpl(this._self, this._then);\n\n  final _ProxiesListHeaderSelectorState _self;\n  final $Res Function(_ProxiesListHeaderSelectorState) _then;\n\n/// Create a copy of ProxiesListHeaderSelectorState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? offset = null,Object? currentIndex = null,}) {\n  return _then(_ProxiesListHeaderSelectorState(\noffset: null == offset ? _self.offset : offset // ignore: cast_nullable_to_non_nullable\nas double,currentIndex: null == currentIndex ? _self.currentIndex : currentIndex // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$ProxiesActionsState {\n\n PageLabel get pageLabel; ProxiesType get type; bool get hasProviders;\n/// Create a copy of ProxiesActionsState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ProxiesActionsStateCopyWith<ProxiesActionsState> get copyWith => _$ProxiesActionsStateCopyWithImpl<ProxiesActionsState>(this as ProxiesActionsState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ProxiesActionsState&&(identical(other.pageLabel, pageLabel) || other.pageLabel == pageLabel)&&(identical(other.type, type) || other.type == type)&&(identical(other.hasProviders, hasProviders) || other.hasProviders == hasProviders));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,pageLabel,type,hasProviders);\n\n@override\nString toString() {\n  return 'ProxiesActionsState(pageLabel: $pageLabel, type: $type, hasProviders: $hasProviders)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ProxiesActionsStateCopyWith<$Res>  {\n  factory $ProxiesActionsStateCopyWith(ProxiesActionsState value, $Res Function(ProxiesActionsState) _then) = _$ProxiesActionsStateCopyWithImpl;\n@useResult\n$Res call({\n PageLabel pageLabel, ProxiesType type, bool hasProviders\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ProxiesActionsStateCopyWithImpl<$Res>\n    implements $ProxiesActionsStateCopyWith<$Res> {\n  _$ProxiesActionsStateCopyWithImpl(this._self, this._then);\n\n  final ProxiesActionsState _self;\n  final $Res Function(ProxiesActionsState) _then;\n\n/// Create a copy of ProxiesActionsState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? pageLabel = null,Object? type = null,Object? hasProviders = null,}) {\n  return _then(_self.copyWith(\npageLabel: null == pageLabel ? _self.pageLabel : pageLabel // ignore: cast_nullable_to_non_nullable\nas PageLabel,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable\nas ProxiesType,hasProviders: null == hasProviders ? _self.hasProviders : hasProviders // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [ProxiesActionsState].\nextension ProxiesActionsStatePatterns on ProxiesActionsState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ProxiesActionsState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ProxiesActionsState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ProxiesActionsState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProxiesActionsState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ProxiesActionsState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProxiesActionsState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( PageLabel pageLabel,  ProxiesType type,  bool hasProviders)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ProxiesActionsState() when $default != null:\nreturn $default(_that.pageLabel,_that.type,_that.hasProviders);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( PageLabel pageLabel,  ProxiesType type,  bool hasProviders)  $default,) {final _that = this;\nswitch (_that) {\ncase _ProxiesActionsState():\nreturn $default(_that.pageLabel,_that.type,_that.hasProviders);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( PageLabel pageLabel,  ProxiesType type,  bool hasProviders)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ProxiesActionsState() when $default != null:\nreturn $default(_that.pageLabel,_that.type,_that.hasProviders);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _ProxiesActionsState implements ProxiesActionsState {\n  const _ProxiesActionsState({required this.pageLabel, required this.type, required this.hasProviders});\n  \n\n@override final  PageLabel pageLabel;\n@override final  ProxiesType type;\n@override final  bool hasProviders;\n\n/// Create a copy of ProxiesActionsState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ProxiesActionsStateCopyWith<_ProxiesActionsState> get copyWith => __$ProxiesActionsStateCopyWithImpl<_ProxiesActionsState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProxiesActionsState&&(identical(other.pageLabel, pageLabel) || other.pageLabel == pageLabel)&&(identical(other.type, type) || other.type == type)&&(identical(other.hasProviders, hasProviders) || other.hasProviders == hasProviders));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,pageLabel,type,hasProviders);\n\n@override\nString toString() {\n  return 'ProxiesActionsState(pageLabel: $pageLabel, type: $type, hasProviders: $hasProviders)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ProxiesActionsStateCopyWith<$Res> implements $ProxiesActionsStateCopyWith<$Res> {\n  factory _$ProxiesActionsStateCopyWith(_ProxiesActionsState value, $Res Function(_ProxiesActionsState) _then) = __$ProxiesActionsStateCopyWithImpl;\n@override @useResult\n$Res call({\n PageLabel pageLabel, ProxiesType type, bool hasProviders\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ProxiesActionsStateCopyWithImpl<$Res>\n    implements _$ProxiesActionsStateCopyWith<$Res> {\n  __$ProxiesActionsStateCopyWithImpl(this._self, this._then);\n\n  final _ProxiesActionsState _self;\n  final $Res Function(_ProxiesActionsState) _then;\n\n/// Create a copy of ProxiesActionsState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? pageLabel = null,Object? type = null,Object? hasProviders = null,}) {\n  return _then(_ProxiesActionsState(\npageLabel: null == pageLabel ? _self.pageLabel : pageLabel // ignore: cast_nullable_to_non_nullable\nas PageLabel,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable\nas ProxiesType,hasProviders: null == hasProviders ? _self.hasProviders : hasProviders // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$ProxyState {\n\n bool get isStart; bool get systemProxy; List<String> get bassDomain; int get port;\n/// Create a copy of ProxyState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ProxyStateCopyWith<ProxyState> get copyWith => _$ProxyStateCopyWithImpl<ProxyState>(this as ProxyState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ProxyState&&(identical(other.isStart, isStart) || other.isStart == isStart)&&(identical(other.systemProxy, systemProxy) || other.systemProxy == systemProxy)&&const DeepCollectionEquality().equals(other.bassDomain, bassDomain)&&(identical(other.port, port) || other.port == port));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,isStart,systemProxy,const DeepCollectionEquality().hash(bassDomain),port);\n\n@override\nString toString() {\n  return 'ProxyState(isStart: $isStart, systemProxy: $systemProxy, bassDomain: $bassDomain, port: $port)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ProxyStateCopyWith<$Res>  {\n  factory $ProxyStateCopyWith(ProxyState value, $Res Function(ProxyState) _then) = _$ProxyStateCopyWithImpl;\n@useResult\n$Res call({\n bool isStart, bool systemProxy, List<String> bassDomain, int port\n});\n\n\n\n\n}\n/// @nodoc\nclass _$ProxyStateCopyWithImpl<$Res>\n    implements $ProxyStateCopyWith<$Res> {\n  _$ProxyStateCopyWithImpl(this._self, this._then);\n\n  final ProxyState _self;\n  final $Res Function(ProxyState) _then;\n\n/// Create a copy of ProxyState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? isStart = null,Object? systemProxy = null,Object? bassDomain = null,Object? port = null,}) {\n  return _then(_self.copyWith(\nisStart: null == isStart ? _self.isStart : isStart // ignore: cast_nullable_to_non_nullable\nas bool,systemProxy: null == systemProxy ? _self.systemProxy : systemProxy // ignore: cast_nullable_to_non_nullable\nas bool,bassDomain: null == bassDomain ? _self.bassDomain : bassDomain // ignore: cast_nullable_to_non_nullable\nas List<String>,port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [ProxyState].\nextension ProxyStatePatterns on ProxyState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ProxyState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ProxyState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ProxyState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProxyState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ProxyState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ProxyState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isStart,  bool systemProxy,  List<String> bassDomain,  int port)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ProxyState() when $default != null:\nreturn $default(_that.isStart,_that.systemProxy,_that.bassDomain,_that.port);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isStart,  bool systemProxy,  List<String> bassDomain,  int port)  $default,) {final _that = this;\nswitch (_that) {\ncase _ProxyState():\nreturn $default(_that.isStart,_that.systemProxy,_that.bassDomain,_that.port);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isStart,  bool systemProxy,  List<String> bassDomain,  int port)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ProxyState() when $default != null:\nreturn $default(_that.isStart,_that.systemProxy,_that.bassDomain,_that.port);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _ProxyState implements ProxyState {\n  const _ProxyState({required this.isStart, required this.systemProxy, required final  List<String> bassDomain, required this.port}): _bassDomain = bassDomain;\n  \n\n@override final  bool isStart;\n@override final  bool systemProxy;\n final  List<String> _bassDomain;\n@override List<String> get bassDomain {\n  if (_bassDomain is EqualUnmodifiableListView) return _bassDomain;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_bassDomain);\n}\n\n@override final  int port;\n\n/// Create a copy of ProxyState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ProxyStateCopyWith<_ProxyState> get copyWith => __$ProxyStateCopyWithImpl<_ProxyState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProxyState&&(identical(other.isStart, isStart) || other.isStart == isStart)&&(identical(other.systemProxy, systemProxy) || other.systemProxy == systemProxy)&&const DeepCollectionEquality().equals(other._bassDomain, _bassDomain)&&(identical(other.port, port) || other.port == port));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,isStart,systemProxy,const DeepCollectionEquality().hash(_bassDomain),port);\n\n@override\nString toString() {\n  return 'ProxyState(isStart: $isStart, systemProxy: $systemProxy, bassDomain: $bassDomain, port: $port)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ProxyStateCopyWith<$Res> implements $ProxyStateCopyWith<$Res> {\n  factory _$ProxyStateCopyWith(_ProxyState value, $Res Function(_ProxyState) _then) = __$ProxyStateCopyWithImpl;\n@override @useResult\n$Res call({\n bool isStart, bool systemProxy, List<String> bassDomain, int port\n});\n\n\n\n\n}\n/// @nodoc\nclass __$ProxyStateCopyWithImpl<$Res>\n    implements _$ProxyStateCopyWith<$Res> {\n  __$ProxyStateCopyWithImpl(this._self, this._then);\n\n  final _ProxyState _self;\n  final $Res Function(_ProxyState) _then;\n\n/// Create a copy of ProxyState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? isStart = null,Object? systemProxy = null,Object? bassDomain = null,Object? port = null,}) {\n  return _then(_ProxyState(\nisStart: null == isStart ? _self.isStart : isStart // ignore: cast_nullable_to_non_nullable\nas bool,systemProxy: null == systemProxy ? _self.systemProxy : systemProxy // ignore: cast_nullable_to_non_nullable\nas bool,bassDomain: null == bassDomain ? _self._bassDomain : bassDomain // ignore: cast_nullable_to_non_nullable\nas List<String>,port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable\nas int,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$ClashConfigState {\n\n bool get overrideDns; ClashConfig get clashConfig; RouteMode get routeMode;\n/// Create a copy of ClashConfigState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ClashConfigStateCopyWith<ClashConfigState> get copyWith => _$ClashConfigStateCopyWithImpl<ClashConfigState>(this as ClashConfigState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ClashConfigState&&(identical(other.overrideDns, overrideDns) || other.overrideDns == overrideDns)&&(identical(other.clashConfig, clashConfig) || other.clashConfig == clashConfig)&&(identical(other.routeMode, routeMode) || other.routeMode == routeMode));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,overrideDns,clashConfig,routeMode);\n\n@override\nString toString() {\n  return 'ClashConfigState(overrideDns: $overrideDns, clashConfig: $clashConfig, routeMode: $routeMode)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ClashConfigStateCopyWith<$Res>  {\n  factory $ClashConfigStateCopyWith(ClashConfigState value, $Res Function(ClashConfigState) _then) = _$ClashConfigStateCopyWithImpl;\n@useResult\n$Res call({\n bool overrideDns, ClashConfig clashConfig, RouteMode routeMode\n});\n\n\n$ClashConfigCopyWith<$Res> get clashConfig;\n\n}\n/// @nodoc\nclass _$ClashConfigStateCopyWithImpl<$Res>\n    implements $ClashConfigStateCopyWith<$Res> {\n  _$ClashConfigStateCopyWithImpl(this._self, this._then);\n\n  final ClashConfigState _self;\n  final $Res Function(ClashConfigState) _then;\n\n/// Create a copy of ClashConfigState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? overrideDns = null,Object? clashConfig = null,Object? routeMode = null,}) {\n  return _then(_self.copyWith(\noverrideDns: null == overrideDns ? _self.overrideDns : overrideDns // ignore: cast_nullable_to_non_nullable\nas bool,clashConfig: null == clashConfig ? _self.clashConfig : clashConfig // ignore: cast_nullable_to_non_nullable\nas ClashConfig,routeMode: null == routeMode ? _self.routeMode : routeMode // ignore: cast_nullable_to_non_nullable\nas RouteMode,\n  ));\n}\n/// Create a copy of ClashConfigState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$ClashConfigCopyWith<$Res> get clashConfig {\n  \n  return $ClashConfigCopyWith<$Res>(_self.clashConfig, (value) {\n    return _then(_self.copyWith(clashConfig: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [ClashConfigState].\nextension ClashConfigStatePatterns on ClashConfigState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ClashConfigState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ClashConfigState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ClashConfigState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ClashConfigState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ClashConfigState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ClashConfigState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool overrideDns,  ClashConfig clashConfig,  RouteMode routeMode)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ClashConfigState() when $default != null:\nreturn $default(_that.overrideDns,_that.clashConfig,_that.routeMode);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool overrideDns,  ClashConfig clashConfig,  RouteMode routeMode)  $default,) {final _that = this;\nswitch (_that) {\ncase _ClashConfigState():\nreturn $default(_that.overrideDns,_that.clashConfig,_that.routeMode);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool overrideDns,  ClashConfig clashConfig,  RouteMode routeMode)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ClashConfigState() when $default != null:\nreturn $default(_that.overrideDns,_that.clashConfig,_that.routeMode);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _ClashConfigState implements ClashConfigState {\n  const _ClashConfigState({required this.overrideDns, required this.clashConfig, required this.routeMode});\n  \n\n@override final  bool overrideDns;\n@override final  ClashConfig clashConfig;\n@override final  RouteMode routeMode;\n\n/// Create a copy of ClashConfigState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ClashConfigStateCopyWith<_ClashConfigState> get copyWith => __$ClashConfigStateCopyWithImpl<_ClashConfigState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ClashConfigState&&(identical(other.overrideDns, overrideDns) || other.overrideDns == overrideDns)&&(identical(other.clashConfig, clashConfig) || other.clashConfig == clashConfig)&&(identical(other.routeMode, routeMode) || other.routeMode == routeMode));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,overrideDns,clashConfig,routeMode);\n\n@override\nString toString() {\n  return 'ClashConfigState(overrideDns: $overrideDns, clashConfig: $clashConfig, routeMode: $routeMode)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ClashConfigStateCopyWith<$Res> implements $ClashConfigStateCopyWith<$Res> {\n  factory _$ClashConfigStateCopyWith(_ClashConfigState value, $Res Function(_ClashConfigState) _then) = __$ClashConfigStateCopyWithImpl;\n@override @useResult\n$Res call({\n bool overrideDns, ClashConfig clashConfig, RouteMode routeMode\n});\n\n\n@override $ClashConfigCopyWith<$Res> get clashConfig;\n\n}\n/// @nodoc\nclass __$ClashConfigStateCopyWithImpl<$Res>\n    implements _$ClashConfigStateCopyWith<$Res> {\n  __$ClashConfigStateCopyWithImpl(this._self, this._then);\n\n  final _ClashConfigState _self;\n  final $Res Function(_ClashConfigState) _then;\n\n/// Create a copy of ClashConfigState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? overrideDns = null,Object? clashConfig = null,Object? routeMode = null,}) {\n  return _then(_ClashConfigState(\noverrideDns: null == overrideDns ? _self.overrideDns : overrideDns // ignore: cast_nullable_to_non_nullable\nas bool,clashConfig: null == clashConfig ? _self.clashConfig : clashConfig // ignore: cast_nullable_to_non_nullable\nas ClashConfig,routeMode: null == routeMode ? _self.routeMode : routeMode // ignore: cast_nullable_to_non_nullable\nas RouteMode,\n  ));\n}\n\n/// Create a copy of ClashConfigState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$ClashConfigCopyWith<$Res> get clashConfig {\n  \n  return $ClashConfigCopyWith<$Res>(_self.clashConfig, (value) {\n    return _then(_self.copyWith(clashConfig: value));\n  });\n}\n}\n\n/// @nodoc\nmixin _$DashboardState {\n\n List<DashboardWidget> get dashboardWidgets; double get contentWidth;\n/// Create a copy of DashboardState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$DashboardStateCopyWith<DashboardState> get copyWith => _$DashboardStateCopyWithImpl<DashboardState>(this as DashboardState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is DashboardState&&const DeepCollectionEquality().equals(other.dashboardWidgets, dashboardWidgets)&&(identical(other.contentWidth, contentWidth) || other.contentWidth == contentWidth));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(dashboardWidgets),contentWidth);\n\n@override\nString toString() {\n  return 'DashboardState(dashboardWidgets: $dashboardWidgets, contentWidth: $contentWidth)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $DashboardStateCopyWith<$Res>  {\n  factory $DashboardStateCopyWith(DashboardState value, $Res Function(DashboardState) _then) = _$DashboardStateCopyWithImpl;\n@useResult\n$Res call({\n List<DashboardWidget> dashboardWidgets, double contentWidth\n});\n\n\n\n\n}\n/// @nodoc\nclass _$DashboardStateCopyWithImpl<$Res>\n    implements $DashboardStateCopyWith<$Res> {\n  _$DashboardStateCopyWithImpl(this._self, this._then);\n\n  final DashboardState _self;\n  final $Res Function(DashboardState) _then;\n\n/// Create a copy of DashboardState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? dashboardWidgets = null,Object? contentWidth = null,}) {\n  return _then(_self.copyWith(\ndashboardWidgets: null == dashboardWidgets ? _self.dashboardWidgets : dashboardWidgets // ignore: cast_nullable_to_non_nullable\nas List<DashboardWidget>,contentWidth: null == contentWidth ? _self.contentWidth : contentWidth // ignore: cast_nullable_to_non_nullable\nas double,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [DashboardState].\nextension DashboardStatePatterns on DashboardState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _DashboardState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _DashboardState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _DashboardState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _DashboardState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _DashboardState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _DashboardState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( List<DashboardWidget> dashboardWidgets,  double contentWidth)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _DashboardState() when $default != null:\nreturn $default(_that.dashboardWidgets,_that.contentWidth);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( List<DashboardWidget> dashboardWidgets,  double contentWidth)  $default,) {final _that = this;\nswitch (_that) {\ncase _DashboardState():\nreturn $default(_that.dashboardWidgets,_that.contentWidth);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( List<DashboardWidget> dashboardWidgets,  double contentWidth)?  $default,) {final _that = this;\nswitch (_that) {\ncase _DashboardState() when $default != null:\nreturn $default(_that.dashboardWidgets,_that.contentWidth);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _DashboardState implements DashboardState {\n  const _DashboardState({required final  List<DashboardWidget> dashboardWidgets, required this.contentWidth}): _dashboardWidgets = dashboardWidgets;\n  \n\n final  List<DashboardWidget> _dashboardWidgets;\n@override List<DashboardWidget> get dashboardWidgets {\n  if (_dashboardWidgets is EqualUnmodifiableListView) return _dashboardWidgets;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_dashboardWidgets);\n}\n\n@override final  double contentWidth;\n\n/// Create a copy of DashboardState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$DashboardStateCopyWith<_DashboardState> get copyWith => __$DashboardStateCopyWithImpl<_DashboardState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _DashboardState&&const DeepCollectionEquality().equals(other._dashboardWidgets, _dashboardWidgets)&&(identical(other.contentWidth, contentWidth) || other.contentWidth == contentWidth));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_dashboardWidgets),contentWidth);\n\n@override\nString toString() {\n  return 'DashboardState(dashboardWidgets: $dashboardWidgets, contentWidth: $contentWidth)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$DashboardStateCopyWith<$Res> implements $DashboardStateCopyWith<$Res> {\n  factory _$DashboardStateCopyWith(_DashboardState value, $Res Function(_DashboardState) _then) = __$DashboardStateCopyWithImpl;\n@override @useResult\n$Res call({\n List<DashboardWidget> dashboardWidgets, double contentWidth\n});\n\n\n\n\n}\n/// @nodoc\nclass __$DashboardStateCopyWithImpl<$Res>\n    implements _$DashboardStateCopyWith<$Res> {\n  __$DashboardStateCopyWithImpl(this._self, this._then);\n\n  final _DashboardState _self;\n  final $Res Function(_DashboardState) _then;\n\n/// Create a copy of DashboardState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? dashboardWidgets = null,Object? contentWidth = null,}) {\n  return _then(_DashboardState(\ndashboardWidgets: null == dashboardWidgets ? _self._dashboardWidgets : dashboardWidgets // ignore: cast_nullable_to_non_nullable\nas List<DashboardWidget>,contentWidth: null == contentWidth ? _self.contentWidth : contentWidth // ignore: cast_nullable_to_non_nullable\nas double,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$SelectedProxyState {\n\n String get proxyName; bool get group; String? get testUrl;\n/// Create a copy of SelectedProxyState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$SelectedProxyStateCopyWith<SelectedProxyState> get copyWith => _$SelectedProxyStateCopyWithImpl<SelectedProxyState>(this as SelectedProxyState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is SelectedProxyState&&(identical(other.proxyName, proxyName) || other.proxyName == proxyName)&&(identical(other.group, group) || other.group == group)&&(identical(other.testUrl, testUrl) || other.testUrl == testUrl));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,proxyName,group,testUrl);\n\n@override\nString toString() {\n  return 'SelectedProxyState(proxyName: $proxyName, group: $group, testUrl: $testUrl)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $SelectedProxyStateCopyWith<$Res>  {\n  factory $SelectedProxyStateCopyWith(SelectedProxyState value, $Res Function(SelectedProxyState) _then) = _$SelectedProxyStateCopyWithImpl;\n@useResult\n$Res call({\n String proxyName, bool group, String? testUrl\n});\n\n\n\n\n}\n/// @nodoc\nclass _$SelectedProxyStateCopyWithImpl<$Res>\n    implements $SelectedProxyStateCopyWith<$Res> {\n  _$SelectedProxyStateCopyWithImpl(this._self, this._then);\n\n  final SelectedProxyState _self;\n  final $Res Function(SelectedProxyState) _then;\n\n/// Create a copy of SelectedProxyState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? proxyName = null,Object? group = null,Object? testUrl = freezed,}) {\n  return _then(_self.copyWith(\nproxyName: null == proxyName ? _self.proxyName : proxyName // ignore: cast_nullable_to_non_nullable\nas String,group: null == group ? _self.group : group // ignore: cast_nullable_to_non_nullable\nas bool,testUrl: freezed == testUrl ? _self.testUrl : testUrl // ignore: cast_nullable_to_non_nullable\nas String?,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [SelectedProxyState].\nextension SelectedProxyStatePatterns on SelectedProxyState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SelectedProxyState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _SelectedProxyState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SelectedProxyState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _SelectedProxyState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SelectedProxyState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _SelectedProxyState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String proxyName,  bool group,  String? testUrl)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _SelectedProxyState() when $default != null:\nreturn $default(_that.proxyName,_that.group,_that.testUrl);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String proxyName,  bool group,  String? testUrl)  $default,) {final _that = this;\nswitch (_that) {\ncase _SelectedProxyState():\nreturn $default(_that.proxyName,_that.group,_that.testUrl);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String proxyName,  bool group,  String? testUrl)?  $default,) {final _that = this;\nswitch (_that) {\ncase _SelectedProxyState() when $default != null:\nreturn $default(_that.proxyName,_that.group,_that.testUrl);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _SelectedProxyState implements SelectedProxyState {\n  const _SelectedProxyState({required this.proxyName, this.group = false, this.testUrl});\n  \n\n@override final  String proxyName;\n@override@JsonKey() final  bool group;\n@override final  String? testUrl;\n\n/// Create a copy of SelectedProxyState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$SelectedProxyStateCopyWith<_SelectedProxyState> get copyWith => __$SelectedProxyStateCopyWithImpl<_SelectedProxyState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _SelectedProxyState&&(identical(other.proxyName, proxyName) || other.proxyName == proxyName)&&(identical(other.group, group) || other.group == group)&&(identical(other.testUrl, testUrl) || other.testUrl == testUrl));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,proxyName,group,testUrl);\n\n@override\nString toString() {\n  return 'SelectedProxyState(proxyName: $proxyName, group: $group, testUrl: $testUrl)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$SelectedProxyStateCopyWith<$Res> implements $SelectedProxyStateCopyWith<$Res> {\n  factory _$SelectedProxyStateCopyWith(_SelectedProxyState value, $Res Function(_SelectedProxyState) _then) = __$SelectedProxyStateCopyWithImpl;\n@override @useResult\n$Res call({\n String proxyName, bool group, String? testUrl\n});\n\n\n\n\n}\n/// @nodoc\nclass __$SelectedProxyStateCopyWithImpl<$Res>\n    implements _$SelectedProxyStateCopyWith<$Res> {\n  __$SelectedProxyStateCopyWithImpl(this._self, this._then);\n\n  final _SelectedProxyState _self;\n  final $Res Function(_SelectedProxyState) _then;\n\n/// Create a copy of SelectedProxyState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? proxyName = null,Object? group = null,Object? testUrl = freezed,}) {\n  return _then(_SelectedProxyState(\nproxyName: null == proxyName ? _self.proxyName : proxyName // ignore: cast_nullable_to_non_nullable\nas String,group: null == group ? _self.group : group // ignore: cast_nullable_to_non_nullable\nas bool,testUrl: freezed == testUrl ? _self.testUrl : testUrl // ignore: cast_nullable_to_non_nullable\nas String?,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$VpnState {\n\n TunStack get stack; VpnProps get vpnProps;\n/// Create a copy of VpnState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$VpnStateCopyWith<VpnState> get copyWith => _$VpnStateCopyWithImpl<VpnState>(this as VpnState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is VpnState&&(identical(other.stack, stack) || other.stack == stack)&&(identical(other.vpnProps, vpnProps) || other.vpnProps == vpnProps));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,stack,vpnProps);\n\n@override\nString toString() {\n  return 'VpnState(stack: $stack, vpnProps: $vpnProps)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $VpnStateCopyWith<$Res>  {\n  factory $VpnStateCopyWith(VpnState value, $Res Function(VpnState) _then) = _$VpnStateCopyWithImpl;\n@useResult\n$Res call({\n TunStack stack, VpnProps vpnProps\n});\n\n\n$VpnPropsCopyWith<$Res> get vpnProps;\n\n}\n/// @nodoc\nclass _$VpnStateCopyWithImpl<$Res>\n    implements $VpnStateCopyWith<$Res> {\n  _$VpnStateCopyWithImpl(this._self, this._then);\n\n  final VpnState _self;\n  final $Res Function(VpnState) _then;\n\n/// Create a copy of VpnState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? stack = null,Object? vpnProps = null,}) {\n  return _then(_self.copyWith(\nstack: null == stack ? _self.stack : stack // ignore: cast_nullable_to_non_nullable\nas TunStack,vpnProps: null == vpnProps ? _self.vpnProps : vpnProps // ignore: cast_nullable_to_non_nullable\nas VpnProps,\n  ));\n}\n/// Create a copy of VpnState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$VpnPropsCopyWith<$Res> get vpnProps {\n  \n  return $VpnPropsCopyWith<$Res>(_self.vpnProps, (value) {\n    return _then(_self.copyWith(vpnProps: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [VpnState].\nextension VpnStatePatterns on VpnState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _VpnState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _VpnState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _VpnState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _VpnState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _VpnState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _VpnState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( TunStack stack,  VpnProps vpnProps)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _VpnState() when $default != null:\nreturn $default(_that.stack,_that.vpnProps);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( TunStack stack,  VpnProps vpnProps)  $default,) {final _that = this;\nswitch (_that) {\ncase _VpnState():\nreturn $default(_that.stack,_that.vpnProps);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( TunStack stack,  VpnProps vpnProps)?  $default,) {final _that = this;\nswitch (_that) {\ncase _VpnState() when $default != null:\nreturn $default(_that.stack,_that.vpnProps);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _VpnState implements VpnState {\n  const _VpnState({required this.stack, required this.vpnProps});\n  \n\n@override final  TunStack stack;\n@override final  VpnProps vpnProps;\n\n/// Create a copy of VpnState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$VpnStateCopyWith<_VpnState> get copyWith => __$VpnStateCopyWithImpl<_VpnState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _VpnState&&(identical(other.stack, stack) || other.stack == stack)&&(identical(other.vpnProps, vpnProps) || other.vpnProps == vpnProps));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,stack,vpnProps);\n\n@override\nString toString() {\n  return 'VpnState(stack: $stack, vpnProps: $vpnProps)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$VpnStateCopyWith<$Res> implements $VpnStateCopyWith<$Res> {\n  factory _$VpnStateCopyWith(_VpnState value, $Res Function(_VpnState) _then) = __$VpnStateCopyWithImpl;\n@override @useResult\n$Res call({\n TunStack stack, VpnProps vpnProps\n});\n\n\n@override $VpnPropsCopyWith<$Res> get vpnProps;\n\n}\n/// @nodoc\nclass __$VpnStateCopyWithImpl<$Res>\n    implements _$VpnStateCopyWith<$Res> {\n  __$VpnStateCopyWithImpl(this._self, this._then);\n\n  final _VpnState _self;\n  final $Res Function(_VpnState) _then;\n\n/// Create a copy of VpnState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? stack = null,Object? vpnProps = null,}) {\n  return _then(_VpnState(\nstack: null == stack ? _self.stack : stack // ignore: cast_nullable_to_non_nullable\nas TunStack,vpnProps: null == vpnProps ? _self.vpnProps : vpnProps // ignore: cast_nullable_to_non_nullable\nas VpnProps,\n  ));\n}\n\n/// Create a copy of VpnState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$VpnPropsCopyWith<$Res> get vpnProps {\n  \n  return $VpnPropsCopyWith<$Res>(_self.vpnProps, (value) {\n    return _then(_self.copyWith(vpnProps: value));\n  });\n}\n}\n\n\n/// @nodoc\nmixin _$SharedState {\n\n SetupParams? get setupParams; VpnOptions? get vpnOptions; String get stopTip; String get startTip; String get currentProfileName; String get stopText; bool get onlyStatisticsProxy; bool get crashlytics;\n/// Create a copy of SharedState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$SharedStateCopyWith<SharedState> get copyWith => _$SharedStateCopyWithImpl<SharedState>(this as SharedState, _$identity);\n\n  /// Serializes this SharedState to a JSON map.\n  Map<String, dynamic> toJson();\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is SharedState&&(identical(other.setupParams, setupParams) || other.setupParams == setupParams)&&(identical(other.vpnOptions, vpnOptions) || other.vpnOptions == vpnOptions)&&(identical(other.stopTip, stopTip) || other.stopTip == stopTip)&&(identical(other.startTip, startTip) || other.startTip == startTip)&&(identical(other.currentProfileName, currentProfileName) || other.currentProfileName == currentProfileName)&&(identical(other.stopText, stopText) || other.stopText == stopText)&&(identical(other.onlyStatisticsProxy, onlyStatisticsProxy) || other.onlyStatisticsProxy == onlyStatisticsProxy)&&(identical(other.crashlytics, crashlytics) || other.crashlytics == crashlytics));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,setupParams,vpnOptions,stopTip,startTip,currentProfileName,stopText,onlyStatisticsProxy,crashlytics);\n\n@override\nString toString() {\n  return 'SharedState(setupParams: $setupParams, vpnOptions: $vpnOptions, stopTip: $stopTip, startTip: $startTip, currentProfileName: $currentProfileName, stopText: $stopText, onlyStatisticsProxy: $onlyStatisticsProxy, crashlytics: $crashlytics)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $SharedStateCopyWith<$Res>  {\n  factory $SharedStateCopyWith(SharedState value, $Res Function(SharedState) _then) = _$SharedStateCopyWithImpl;\n@useResult\n$Res call({\n SetupParams? setupParams, VpnOptions? vpnOptions, String stopTip, String startTip, String currentProfileName, String stopText, bool onlyStatisticsProxy, bool crashlytics\n});\n\n\n$SetupParamsCopyWith<$Res>? get setupParams;$VpnOptionsCopyWith<$Res>? get vpnOptions;\n\n}\n/// @nodoc\nclass _$SharedStateCopyWithImpl<$Res>\n    implements $SharedStateCopyWith<$Res> {\n  _$SharedStateCopyWithImpl(this._self, this._then);\n\n  final SharedState _self;\n  final $Res Function(SharedState) _then;\n\n/// Create a copy of SharedState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? setupParams = freezed,Object? vpnOptions = freezed,Object? stopTip = null,Object? startTip = null,Object? currentProfileName = null,Object? stopText = null,Object? onlyStatisticsProxy = null,Object? crashlytics = null,}) {\n  return _then(_self.copyWith(\nsetupParams: freezed == setupParams ? _self.setupParams : setupParams // ignore: cast_nullable_to_non_nullable\nas SetupParams?,vpnOptions: freezed == vpnOptions ? _self.vpnOptions : vpnOptions // ignore: cast_nullable_to_non_nullable\nas VpnOptions?,stopTip: null == stopTip ? _self.stopTip : stopTip // ignore: cast_nullable_to_non_nullable\nas String,startTip: null == startTip ? _self.startTip : startTip // ignore: cast_nullable_to_non_nullable\nas String,currentProfileName: null == currentProfileName ? _self.currentProfileName : currentProfileName // ignore: cast_nullable_to_non_nullable\nas String,stopText: null == stopText ? _self.stopText : stopText // ignore: cast_nullable_to_non_nullable\nas String,onlyStatisticsProxy: null == onlyStatisticsProxy ? _self.onlyStatisticsProxy : onlyStatisticsProxy // ignore: cast_nullable_to_non_nullable\nas bool,crashlytics: null == crashlytics ? _self.crashlytics : crashlytics // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n/// Create a copy of SharedState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$SetupParamsCopyWith<$Res>? get setupParams {\n    if (_self.setupParams == null) {\n    return null;\n  }\n\n  return $SetupParamsCopyWith<$Res>(_self.setupParams!, (value) {\n    return _then(_self.copyWith(setupParams: value));\n  });\n}/// Create a copy of SharedState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$VpnOptionsCopyWith<$Res>? get vpnOptions {\n    if (_self.vpnOptions == null) {\n    return null;\n  }\n\n  return $VpnOptionsCopyWith<$Res>(_self.vpnOptions!, (value) {\n    return _then(_self.copyWith(vpnOptions: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [SharedState].\nextension SharedStatePatterns on SharedState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SharedState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _SharedState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SharedState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _SharedState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SharedState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _SharedState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( SetupParams? setupParams,  VpnOptions? vpnOptions,  String stopTip,  String startTip,  String currentProfileName,  String stopText,  bool onlyStatisticsProxy,  bool crashlytics)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _SharedState() when $default != null:\nreturn $default(_that.setupParams,_that.vpnOptions,_that.stopTip,_that.startTip,_that.currentProfileName,_that.stopText,_that.onlyStatisticsProxy,_that.crashlytics);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( SetupParams? setupParams,  VpnOptions? vpnOptions,  String stopTip,  String startTip,  String currentProfileName,  String stopText,  bool onlyStatisticsProxy,  bool crashlytics)  $default,) {final _that = this;\nswitch (_that) {\ncase _SharedState():\nreturn $default(_that.setupParams,_that.vpnOptions,_that.stopTip,_that.startTip,_that.currentProfileName,_that.stopText,_that.onlyStatisticsProxy,_that.crashlytics);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( SetupParams? setupParams,  VpnOptions? vpnOptions,  String stopTip,  String startTip,  String currentProfileName,  String stopText,  bool onlyStatisticsProxy,  bool crashlytics)?  $default,) {final _that = this;\nswitch (_that) {\ncase _SharedState() when $default != null:\nreturn $default(_that.setupParams,_that.vpnOptions,_that.stopTip,_that.startTip,_that.currentProfileName,_that.stopText,_that.onlyStatisticsProxy,_that.crashlytics);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n@JsonSerializable()\n\nclass _SharedState implements SharedState {\n  const _SharedState({this.setupParams, this.vpnOptions, required this.stopTip, required this.startTip, required this.currentProfileName, required this.stopText, required this.onlyStatisticsProxy, required this.crashlytics});\n  factory _SharedState.fromJson(Map<String, dynamic> json) => _$SharedStateFromJson(json);\n\n@override final  SetupParams? setupParams;\n@override final  VpnOptions? vpnOptions;\n@override final  String stopTip;\n@override final  String startTip;\n@override final  String currentProfileName;\n@override final  String stopText;\n@override final  bool onlyStatisticsProxy;\n@override final  bool crashlytics;\n\n/// Create a copy of SharedState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$SharedStateCopyWith<_SharedState> get copyWith => __$SharedStateCopyWithImpl<_SharedState>(this, _$identity);\n\n@override\nMap<String, dynamic> toJson() {\n  return _$SharedStateToJson(this, );\n}\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _SharedState&&(identical(other.setupParams, setupParams) || other.setupParams == setupParams)&&(identical(other.vpnOptions, vpnOptions) || other.vpnOptions == vpnOptions)&&(identical(other.stopTip, stopTip) || other.stopTip == stopTip)&&(identical(other.startTip, startTip) || other.startTip == startTip)&&(identical(other.currentProfileName, currentProfileName) || other.currentProfileName == currentProfileName)&&(identical(other.stopText, stopText) || other.stopText == stopText)&&(identical(other.onlyStatisticsProxy, onlyStatisticsProxy) || other.onlyStatisticsProxy == onlyStatisticsProxy)&&(identical(other.crashlytics, crashlytics) || other.crashlytics == crashlytics));\n}\n\n@JsonKey(includeFromJson: false, includeToJson: false)\n@override\nint get hashCode => Object.hash(runtimeType,setupParams,vpnOptions,stopTip,startTip,currentProfileName,stopText,onlyStatisticsProxy,crashlytics);\n\n@override\nString toString() {\n  return 'SharedState(setupParams: $setupParams, vpnOptions: $vpnOptions, stopTip: $stopTip, startTip: $startTip, currentProfileName: $currentProfileName, stopText: $stopText, onlyStatisticsProxy: $onlyStatisticsProxy, crashlytics: $crashlytics)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$SharedStateCopyWith<$Res> implements $SharedStateCopyWith<$Res> {\n  factory _$SharedStateCopyWith(_SharedState value, $Res Function(_SharedState) _then) = __$SharedStateCopyWithImpl;\n@override @useResult\n$Res call({\n SetupParams? setupParams, VpnOptions? vpnOptions, String stopTip, String startTip, String currentProfileName, String stopText, bool onlyStatisticsProxy, bool crashlytics\n});\n\n\n@override $SetupParamsCopyWith<$Res>? get setupParams;@override $VpnOptionsCopyWith<$Res>? get vpnOptions;\n\n}\n/// @nodoc\nclass __$SharedStateCopyWithImpl<$Res>\n    implements _$SharedStateCopyWith<$Res> {\n  __$SharedStateCopyWithImpl(this._self, this._then);\n\n  final _SharedState _self;\n  final $Res Function(_SharedState) _then;\n\n/// Create a copy of SharedState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? setupParams = freezed,Object? vpnOptions = freezed,Object? stopTip = null,Object? startTip = null,Object? currentProfileName = null,Object? stopText = null,Object? onlyStatisticsProxy = null,Object? crashlytics = null,}) {\n  return _then(_SharedState(\nsetupParams: freezed == setupParams ? _self.setupParams : setupParams // ignore: cast_nullable_to_non_nullable\nas SetupParams?,vpnOptions: freezed == vpnOptions ? _self.vpnOptions : vpnOptions // ignore: cast_nullable_to_non_nullable\nas VpnOptions?,stopTip: null == stopTip ? _self.stopTip : stopTip // ignore: cast_nullable_to_non_nullable\nas String,startTip: null == startTip ? _self.startTip : startTip // ignore: cast_nullable_to_non_nullable\nas String,currentProfileName: null == currentProfileName ? _self.currentProfileName : currentProfileName // ignore: cast_nullable_to_non_nullable\nas String,stopText: null == stopText ? _self.stopText : stopText // ignore: cast_nullable_to_non_nullable\nas String,onlyStatisticsProxy: null == onlyStatisticsProxy ? _self.onlyStatisticsProxy : onlyStatisticsProxy // ignore: cast_nullable_to_non_nullable\nas bool,crashlytics: null == crashlytics ? _self.crashlytics : crashlytics // ignore: cast_nullable_to_non_nullable\nas bool,\n  ));\n}\n\n/// Create a copy of SharedState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$SetupParamsCopyWith<$Res>? get setupParams {\n    if (_self.setupParams == null) {\n    return null;\n  }\n\n  return $SetupParamsCopyWith<$Res>(_self.setupParams!, (value) {\n    return _then(_self.copyWith(setupParams: value));\n  });\n}/// Create a copy of SharedState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$VpnOptionsCopyWith<$Res>? get vpnOptions {\n    if (_self.vpnOptions == null) {\n    return null;\n  }\n\n  return $VpnOptionsCopyWith<$Res>(_self.vpnOptions!, (value) {\n    return _then(_self.copyWith(vpnOptions: value));\n  });\n}\n}\n\n/// @nodoc\nmixin _$ComputeGroupsState {\n\n ProxiesData get proxiesData; ProxiesSortType get sortType; DelayMap get delayMap; Map<String, String> get selectedMap; String get defaultTestUrl;\n/// Create a copy of ComputeGroupsState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$ComputeGroupsStateCopyWith<ComputeGroupsState> get copyWith => _$ComputeGroupsStateCopyWithImpl<ComputeGroupsState>(this as ComputeGroupsState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is ComputeGroupsState&&(identical(other.proxiesData, proxiesData) || other.proxiesData == proxiesData)&&(identical(other.sortType, sortType) || other.sortType == sortType)&&const DeepCollectionEquality().equals(other.delayMap, delayMap)&&const DeepCollectionEquality().equals(other.selectedMap, selectedMap)&&(identical(other.defaultTestUrl, defaultTestUrl) || other.defaultTestUrl == defaultTestUrl));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,proxiesData,sortType,const DeepCollectionEquality().hash(delayMap),const DeepCollectionEquality().hash(selectedMap),defaultTestUrl);\n\n@override\nString toString() {\n  return 'ComputeGroupsState(proxiesData: $proxiesData, sortType: $sortType, delayMap: $delayMap, selectedMap: $selectedMap, defaultTestUrl: $defaultTestUrl)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $ComputeGroupsStateCopyWith<$Res>  {\n  factory $ComputeGroupsStateCopyWith(ComputeGroupsState value, $Res Function(ComputeGroupsState) _then) = _$ComputeGroupsStateCopyWithImpl;\n@useResult\n$Res call({\n ProxiesData proxiesData, ProxiesSortType sortType, DelayMap delayMap, Map<String, String> selectedMap, String defaultTestUrl\n});\n\n\n$ProxiesDataCopyWith<$Res> get proxiesData;\n\n}\n/// @nodoc\nclass _$ComputeGroupsStateCopyWithImpl<$Res>\n    implements $ComputeGroupsStateCopyWith<$Res> {\n  _$ComputeGroupsStateCopyWithImpl(this._self, this._then);\n\n  final ComputeGroupsState _self;\n  final $Res Function(ComputeGroupsState) _then;\n\n/// Create a copy of ComputeGroupsState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? proxiesData = null,Object? sortType = null,Object? delayMap = null,Object? selectedMap = null,Object? defaultTestUrl = null,}) {\n  return _then(_self.copyWith(\nproxiesData: null == proxiesData ? _self.proxiesData : proxiesData // ignore: cast_nullable_to_non_nullable\nas ProxiesData,sortType: null == sortType ? _self.sortType : sortType // ignore: cast_nullable_to_non_nullable\nas ProxiesSortType,delayMap: null == delayMap ? _self.delayMap : delayMap // ignore: cast_nullable_to_non_nullable\nas DelayMap,selectedMap: null == selectedMap ? _self.selectedMap : selectedMap // ignore: cast_nullable_to_non_nullable\nas Map<String, String>,defaultTestUrl: null == defaultTestUrl ? _self.defaultTestUrl : defaultTestUrl // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n/// Create a copy of ComputeGroupsState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$ProxiesDataCopyWith<$Res> get proxiesData {\n  \n  return $ProxiesDataCopyWith<$Res>(_self.proxiesData, (value) {\n    return _then(_self.copyWith(proxiesData: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [ComputeGroupsState].\nextension ComputeGroupsStatePatterns on ComputeGroupsState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ComputeGroupsState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _ComputeGroupsState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ComputeGroupsState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ComputeGroupsState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ComputeGroupsState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _ComputeGroupsState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( ProxiesData proxiesData,  ProxiesSortType sortType,  DelayMap delayMap,  Map<String, String> selectedMap,  String defaultTestUrl)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _ComputeGroupsState() when $default != null:\nreturn $default(_that.proxiesData,_that.sortType,_that.delayMap,_that.selectedMap,_that.defaultTestUrl);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( ProxiesData proxiesData,  ProxiesSortType sortType,  DelayMap delayMap,  Map<String, String> selectedMap,  String defaultTestUrl)  $default,) {final _that = this;\nswitch (_that) {\ncase _ComputeGroupsState():\nreturn $default(_that.proxiesData,_that.sortType,_that.delayMap,_that.selectedMap,_that.defaultTestUrl);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( ProxiesData proxiesData,  ProxiesSortType sortType,  DelayMap delayMap,  Map<String, String> selectedMap,  String defaultTestUrl)?  $default,) {final _that = this;\nswitch (_that) {\ncase _ComputeGroupsState() when $default != null:\nreturn $default(_that.proxiesData,_that.sortType,_that.delayMap,_that.selectedMap,_that.defaultTestUrl);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _ComputeGroupsState implements ComputeGroupsState {\n  const _ComputeGroupsState({required this.proxiesData, required this.sortType, required final  DelayMap delayMap, required final  Map<String, String> selectedMap, required this.defaultTestUrl}): _delayMap = delayMap,_selectedMap = selectedMap;\n  \n\n@override final  ProxiesData proxiesData;\n@override final  ProxiesSortType sortType;\n final  DelayMap _delayMap;\n@override DelayMap get delayMap {\n  if (_delayMap is EqualUnmodifiableMapView) return _delayMap;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableMapView(_delayMap);\n}\n\n final  Map<String, String> _selectedMap;\n@override Map<String, String> get selectedMap {\n  if (_selectedMap is EqualUnmodifiableMapView) return _selectedMap;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableMapView(_selectedMap);\n}\n\n@override final  String defaultTestUrl;\n\n/// Create a copy of ComputeGroupsState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$ComputeGroupsStateCopyWith<_ComputeGroupsState> get copyWith => __$ComputeGroupsStateCopyWithImpl<_ComputeGroupsState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _ComputeGroupsState&&(identical(other.proxiesData, proxiesData) || other.proxiesData == proxiesData)&&(identical(other.sortType, sortType) || other.sortType == sortType)&&const DeepCollectionEquality().equals(other._delayMap, _delayMap)&&const DeepCollectionEquality().equals(other._selectedMap, _selectedMap)&&(identical(other.defaultTestUrl, defaultTestUrl) || other.defaultTestUrl == defaultTestUrl));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,proxiesData,sortType,const DeepCollectionEquality().hash(_delayMap),const DeepCollectionEquality().hash(_selectedMap),defaultTestUrl);\n\n@override\nString toString() {\n  return 'ComputeGroupsState(proxiesData: $proxiesData, sortType: $sortType, delayMap: $delayMap, selectedMap: $selectedMap, defaultTestUrl: $defaultTestUrl)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$ComputeGroupsStateCopyWith<$Res> implements $ComputeGroupsStateCopyWith<$Res> {\n  factory _$ComputeGroupsStateCopyWith(_ComputeGroupsState value, $Res Function(_ComputeGroupsState) _then) = __$ComputeGroupsStateCopyWithImpl;\n@override @useResult\n$Res call({\n ProxiesData proxiesData, ProxiesSortType sortType, DelayMap delayMap, Map<String, String> selectedMap, String defaultTestUrl\n});\n\n\n@override $ProxiesDataCopyWith<$Res> get proxiesData;\n\n}\n/// @nodoc\nclass __$ComputeGroupsStateCopyWithImpl<$Res>\n    implements _$ComputeGroupsStateCopyWith<$Res> {\n  __$ComputeGroupsStateCopyWithImpl(this._self, this._then);\n\n  final _ComputeGroupsState _self;\n  final $Res Function(_ComputeGroupsState) _then;\n\n/// Create a copy of ComputeGroupsState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? proxiesData = null,Object? sortType = null,Object? delayMap = null,Object? selectedMap = null,Object? defaultTestUrl = null,}) {\n  return _then(_ComputeGroupsState(\nproxiesData: null == proxiesData ? _self.proxiesData : proxiesData // ignore: cast_nullable_to_non_nullable\nas ProxiesData,sortType: null == sortType ? _self.sortType : sortType // ignore: cast_nullable_to_non_nullable\nas ProxiesSortType,delayMap: null == delayMap ? _self._delayMap : delayMap // ignore: cast_nullable_to_non_nullable\nas DelayMap,selectedMap: null == selectedMap ? _self._selectedMap : selectedMap // ignore: cast_nullable_to_non_nullable\nas Map<String, String>,defaultTestUrl: null == defaultTestUrl ? _self.defaultTestUrl : defaultTestUrl // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n/// Create a copy of ComputeGroupsState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$ProxiesDataCopyWith<$Res> get proxiesData {\n  \n  return $ProxiesDataCopyWith<$Res>(_self.proxiesData, (value) {\n    return _then(_self.copyWith(proxiesData: value));\n  });\n}\n}\n\n/// @nodoc\nmixin _$MakeRealProfileState {\n\n String get profilesPath; int get profileId; Map<String, dynamic> get rawConfig; ClashConfig get realPatchConfig; bool get overrideDns; bool get appendSystemDns; List<Rule> get addedRules; String get defaultUA;\n/// Create a copy of MakeRealProfileState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$MakeRealProfileStateCopyWith<MakeRealProfileState> get copyWith => _$MakeRealProfileStateCopyWithImpl<MakeRealProfileState>(this as MakeRealProfileState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is MakeRealProfileState&&(identical(other.profilesPath, profilesPath) || other.profilesPath == profilesPath)&&(identical(other.profileId, profileId) || other.profileId == profileId)&&const DeepCollectionEquality().equals(other.rawConfig, rawConfig)&&(identical(other.realPatchConfig, realPatchConfig) || other.realPatchConfig == realPatchConfig)&&(identical(other.overrideDns, overrideDns) || other.overrideDns == overrideDns)&&(identical(other.appendSystemDns, appendSystemDns) || other.appendSystemDns == appendSystemDns)&&const DeepCollectionEquality().equals(other.addedRules, addedRules)&&(identical(other.defaultUA, defaultUA) || other.defaultUA == defaultUA));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,profilesPath,profileId,const DeepCollectionEquality().hash(rawConfig),realPatchConfig,overrideDns,appendSystemDns,const DeepCollectionEquality().hash(addedRules),defaultUA);\n\n@override\nString toString() {\n  return 'MakeRealProfileState(profilesPath: $profilesPath, profileId: $profileId, rawConfig: $rawConfig, realPatchConfig: $realPatchConfig, overrideDns: $overrideDns, appendSystemDns: $appendSystemDns, addedRules: $addedRules, defaultUA: $defaultUA)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $MakeRealProfileStateCopyWith<$Res>  {\n  factory $MakeRealProfileStateCopyWith(MakeRealProfileState value, $Res Function(MakeRealProfileState) _then) = _$MakeRealProfileStateCopyWithImpl;\n@useResult\n$Res call({\n String profilesPath, int profileId, Map<String, dynamic> rawConfig, ClashConfig realPatchConfig, bool overrideDns, bool appendSystemDns, List<Rule> addedRules, String defaultUA\n});\n\n\n$ClashConfigCopyWith<$Res> get realPatchConfig;\n\n}\n/// @nodoc\nclass _$MakeRealProfileStateCopyWithImpl<$Res>\n    implements $MakeRealProfileStateCopyWith<$Res> {\n  _$MakeRealProfileStateCopyWithImpl(this._self, this._then);\n\n  final MakeRealProfileState _self;\n  final $Res Function(MakeRealProfileState) _then;\n\n/// Create a copy of MakeRealProfileState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? profilesPath = null,Object? profileId = null,Object? rawConfig = null,Object? realPatchConfig = null,Object? overrideDns = null,Object? appendSystemDns = null,Object? addedRules = null,Object? defaultUA = null,}) {\n  return _then(_self.copyWith(\nprofilesPath: null == profilesPath ? _self.profilesPath : profilesPath // ignore: cast_nullable_to_non_nullable\nas String,profileId: null == profileId ? _self.profileId : profileId // ignore: cast_nullable_to_non_nullable\nas int,rawConfig: null == rawConfig ? _self.rawConfig : rawConfig // ignore: cast_nullable_to_non_nullable\nas Map<String, dynamic>,realPatchConfig: null == realPatchConfig ? _self.realPatchConfig : realPatchConfig // ignore: cast_nullable_to_non_nullable\nas ClashConfig,overrideDns: null == overrideDns ? _self.overrideDns : overrideDns // ignore: cast_nullable_to_non_nullable\nas bool,appendSystemDns: null == appendSystemDns ? _self.appendSystemDns : appendSystemDns // ignore: cast_nullable_to_non_nullable\nas bool,addedRules: null == addedRules ? _self.addedRules : addedRules // ignore: cast_nullable_to_non_nullable\nas List<Rule>,defaultUA: null == defaultUA ? _self.defaultUA : defaultUA // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n/// Create a copy of MakeRealProfileState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$ClashConfigCopyWith<$Res> get realPatchConfig {\n  \n  return $ClashConfigCopyWith<$Res>(_self.realPatchConfig, (value) {\n    return _then(_self.copyWith(realPatchConfig: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [MakeRealProfileState].\nextension MakeRealProfileStatePatterns on MakeRealProfileState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _MakeRealProfileState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _MakeRealProfileState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _MakeRealProfileState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _MakeRealProfileState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _MakeRealProfileState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _MakeRealProfileState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String profilesPath,  int profileId,  Map<String, dynamic> rawConfig,  ClashConfig realPatchConfig,  bool overrideDns,  bool appendSystemDns,  List<Rule> addedRules,  String defaultUA)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _MakeRealProfileState() when $default != null:\nreturn $default(_that.profilesPath,_that.profileId,_that.rawConfig,_that.realPatchConfig,_that.overrideDns,_that.appendSystemDns,_that.addedRules,_that.defaultUA);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String profilesPath,  int profileId,  Map<String, dynamic> rawConfig,  ClashConfig realPatchConfig,  bool overrideDns,  bool appendSystemDns,  List<Rule> addedRules,  String defaultUA)  $default,) {final _that = this;\nswitch (_that) {\ncase _MakeRealProfileState():\nreturn $default(_that.profilesPath,_that.profileId,_that.rawConfig,_that.realPatchConfig,_that.overrideDns,_that.appendSystemDns,_that.addedRules,_that.defaultUA);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String profilesPath,  int profileId,  Map<String, dynamic> rawConfig,  ClashConfig realPatchConfig,  bool overrideDns,  bool appendSystemDns,  List<Rule> addedRules,  String defaultUA)?  $default,) {final _that = this;\nswitch (_that) {\ncase _MakeRealProfileState() when $default != null:\nreturn $default(_that.profilesPath,_that.profileId,_that.rawConfig,_that.realPatchConfig,_that.overrideDns,_that.appendSystemDns,_that.addedRules,_that.defaultUA);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _MakeRealProfileState implements MakeRealProfileState {\n  const _MakeRealProfileState({required this.profilesPath, required this.profileId, required final  Map<String, dynamic> rawConfig, required this.realPatchConfig, required this.overrideDns, required this.appendSystemDns, required final  List<Rule> addedRules, required this.defaultUA}): _rawConfig = rawConfig,_addedRules = addedRules;\n  \n\n@override final  String profilesPath;\n@override final  int profileId;\n final  Map<String, dynamic> _rawConfig;\n@override Map<String, dynamic> get rawConfig {\n  if (_rawConfig is EqualUnmodifiableMapView) return _rawConfig;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableMapView(_rawConfig);\n}\n\n@override final  ClashConfig realPatchConfig;\n@override final  bool overrideDns;\n@override final  bool appendSystemDns;\n final  List<Rule> _addedRules;\n@override List<Rule> get addedRules {\n  if (_addedRules is EqualUnmodifiableListView) return _addedRules;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_addedRules);\n}\n\n@override final  String defaultUA;\n\n/// Create a copy of MakeRealProfileState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$MakeRealProfileStateCopyWith<_MakeRealProfileState> get copyWith => __$MakeRealProfileStateCopyWithImpl<_MakeRealProfileState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _MakeRealProfileState&&(identical(other.profilesPath, profilesPath) || other.profilesPath == profilesPath)&&(identical(other.profileId, profileId) || other.profileId == profileId)&&const DeepCollectionEquality().equals(other._rawConfig, _rawConfig)&&(identical(other.realPatchConfig, realPatchConfig) || other.realPatchConfig == realPatchConfig)&&(identical(other.overrideDns, overrideDns) || other.overrideDns == overrideDns)&&(identical(other.appendSystemDns, appendSystemDns) || other.appendSystemDns == appendSystemDns)&&const DeepCollectionEquality().equals(other._addedRules, _addedRules)&&(identical(other.defaultUA, defaultUA) || other.defaultUA == defaultUA));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,profilesPath,profileId,const DeepCollectionEquality().hash(_rawConfig),realPatchConfig,overrideDns,appendSystemDns,const DeepCollectionEquality().hash(_addedRules),defaultUA);\n\n@override\nString toString() {\n  return 'MakeRealProfileState(profilesPath: $profilesPath, profileId: $profileId, rawConfig: $rawConfig, realPatchConfig: $realPatchConfig, overrideDns: $overrideDns, appendSystemDns: $appendSystemDns, addedRules: $addedRules, defaultUA: $defaultUA)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$MakeRealProfileStateCopyWith<$Res> implements $MakeRealProfileStateCopyWith<$Res> {\n  factory _$MakeRealProfileStateCopyWith(_MakeRealProfileState value, $Res Function(_MakeRealProfileState) _then) = __$MakeRealProfileStateCopyWithImpl;\n@override @useResult\n$Res call({\n String profilesPath, int profileId, Map<String, dynamic> rawConfig, ClashConfig realPatchConfig, bool overrideDns, bool appendSystemDns, List<Rule> addedRules, String defaultUA\n});\n\n\n@override $ClashConfigCopyWith<$Res> get realPatchConfig;\n\n}\n/// @nodoc\nclass __$MakeRealProfileStateCopyWithImpl<$Res>\n    implements _$MakeRealProfileStateCopyWith<$Res> {\n  __$MakeRealProfileStateCopyWithImpl(this._self, this._then);\n\n  final _MakeRealProfileState _self;\n  final $Res Function(_MakeRealProfileState) _then;\n\n/// Create a copy of MakeRealProfileState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? profilesPath = null,Object? profileId = null,Object? rawConfig = null,Object? realPatchConfig = null,Object? overrideDns = null,Object? appendSystemDns = null,Object? addedRules = null,Object? defaultUA = null,}) {\n  return _then(_MakeRealProfileState(\nprofilesPath: null == profilesPath ? _self.profilesPath : profilesPath // ignore: cast_nullable_to_non_nullable\nas String,profileId: null == profileId ? _self.profileId : profileId // ignore: cast_nullable_to_non_nullable\nas int,rawConfig: null == rawConfig ? _self._rawConfig : rawConfig // ignore: cast_nullable_to_non_nullable\nas Map<String, dynamic>,realPatchConfig: null == realPatchConfig ? _self.realPatchConfig : realPatchConfig // ignore: cast_nullable_to_non_nullable\nas ClashConfig,overrideDns: null == overrideDns ? _self.overrideDns : overrideDns // ignore: cast_nullable_to_non_nullable\nas bool,appendSystemDns: null == appendSystemDns ? _self.appendSystemDns : appendSystemDns // ignore: cast_nullable_to_non_nullable\nas bool,addedRules: null == addedRules ? _self._addedRules : addedRules // ignore: cast_nullable_to_non_nullable\nas List<Rule>,defaultUA: null == defaultUA ? _self.defaultUA : defaultUA // ignore: cast_nullable_to_non_nullable\nas String,\n  ));\n}\n\n/// Create a copy of MakeRealProfileState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$ClashConfigCopyWith<$Res> get realPatchConfig {\n  \n  return $ClashConfigCopyWith<$Res>(_self.realPatchConfig, (value) {\n    return _then(_self.copyWith(realPatchConfig: value));\n  });\n}\n}\n\n/// @nodoc\nmixin _$MigrationData {\n\n Map<String, Object?>? get configMap; List<Rule> get rules; List<Script> get scripts; List<Profile> get profiles; List<ProfileRuleLink> get links;\n/// Create a copy of MigrationData\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$MigrationDataCopyWith<MigrationData> get copyWith => _$MigrationDataCopyWithImpl<MigrationData>(this as MigrationData, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is MigrationData&&const DeepCollectionEquality().equals(other.configMap, configMap)&&const DeepCollectionEquality().equals(other.rules, rules)&&const DeepCollectionEquality().equals(other.scripts, scripts)&&const DeepCollectionEquality().equals(other.profiles, profiles)&&const DeepCollectionEquality().equals(other.links, links));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(configMap),const DeepCollectionEquality().hash(rules),const DeepCollectionEquality().hash(scripts),const DeepCollectionEquality().hash(profiles),const DeepCollectionEquality().hash(links));\n\n@override\nString toString() {\n  return 'MigrationData(configMap: $configMap, rules: $rules, scripts: $scripts, profiles: $profiles, links: $links)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $MigrationDataCopyWith<$Res>  {\n  factory $MigrationDataCopyWith(MigrationData value, $Res Function(MigrationData) _then) = _$MigrationDataCopyWithImpl;\n@useResult\n$Res call({\n Map<String, Object?>? configMap, List<Rule> rules, List<Script> scripts, List<Profile> profiles, List<ProfileRuleLink> links\n});\n\n\n\n\n}\n/// @nodoc\nclass _$MigrationDataCopyWithImpl<$Res>\n    implements $MigrationDataCopyWith<$Res> {\n  _$MigrationDataCopyWithImpl(this._self, this._then);\n\n  final MigrationData _self;\n  final $Res Function(MigrationData) _then;\n\n/// Create a copy of MigrationData\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? configMap = freezed,Object? rules = null,Object? scripts = null,Object? profiles = null,Object? links = null,}) {\n  return _then(_self.copyWith(\nconfigMap: freezed == configMap ? _self.configMap : configMap // ignore: cast_nullable_to_non_nullable\nas Map<String, Object?>?,rules: null == rules ? _self.rules : rules // ignore: cast_nullable_to_non_nullable\nas List<Rule>,scripts: null == scripts ? _self.scripts : scripts // ignore: cast_nullable_to_non_nullable\nas List<Script>,profiles: null == profiles ? _self.profiles : profiles // ignore: cast_nullable_to_non_nullable\nas List<Profile>,links: null == links ? _self.links : links // ignore: cast_nullable_to_non_nullable\nas List<ProfileRuleLink>,\n  ));\n}\n\n}\n\n\n/// Adds pattern-matching-related methods to [MigrationData].\nextension MigrationDataPatterns on MigrationData {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _MigrationData value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _MigrationData() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _MigrationData value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _MigrationData():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _MigrationData value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _MigrationData() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( Map<String, Object?>? configMap,  List<Rule> rules,  List<Script> scripts,  List<Profile> profiles,  List<ProfileRuleLink> links)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _MigrationData() when $default != null:\nreturn $default(_that.configMap,_that.rules,_that.scripts,_that.profiles,_that.links);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( Map<String, Object?>? configMap,  List<Rule> rules,  List<Script> scripts,  List<Profile> profiles,  List<ProfileRuleLink> links)  $default,) {final _that = this;\nswitch (_that) {\ncase _MigrationData():\nreturn $default(_that.configMap,_that.rules,_that.scripts,_that.profiles,_that.links);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( Map<String, Object?>? configMap,  List<Rule> rules,  List<Script> scripts,  List<Profile> profiles,  List<ProfileRuleLink> links)?  $default,) {final _that = this;\nswitch (_that) {\ncase _MigrationData() when $default != null:\nreturn $default(_that.configMap,_that.rules,_that.scripts,_that.profiles,_that.links);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _MigrationData implements MigrationData {\n  const _MigrationData({final  Map<String, Object?>? configMap, final  List<Rule> rules = const [], final  List<Script> scripts = const [], final  List<Profile> profiles = const [], final  List<ProfileRuleLink> links = const []}): _configMap = configMap,_rules = rules,_scripts = scripts,_profiles = profiles,_links = links;\n  \n\n final  Map<String, Object?>? _configMap;\n@override Map<String, Object?>? get configMap {\n  final value = _configMap;\n  if (value == null) return null;\n  if (_configMap is EqualUnmodifiableMapView) return _configMap;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableMapView(value);\n}\n\n final  List<Rule> _rules;\n@override@JsonKey() List<Rule> get rules {\n  if (_rules is EqualUnmodifiableListView) return _rules;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_rules);\n}\n\n final  List<Script> _scripts;\n@override@JsonKey() List<Script> get scripts {\n  if (_scripts is EqualUnmodifiableListView) return _scripts;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_scripts);\n}\n\n final  List<Profile> _profiles;\n@override@JsonKey() List<Profile> get profiles {\n  if (_profiles is EqualUnmodifiableListView) return _profiles;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_profiles);\n}\n\n final  List<ProfileRuleLink> _links;\n@override@JsonKey() List<ProfileRuleLink> get links {\n  if (_links is EqualUnmodifiableListView) return _links;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_links);\n}\n\n\n/// Create a copy of MigrationData\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$MigrationDataCopyWith<_MigrationData> get copyWith => __$MigrationDataCopyWithImpl<_MigrationData>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _MigrationData&&const DeepCollectionEquality().equals(other._configMap, _configMap)&&const DeepCollectionEquality().equals(other._rules, _rules)&&const DeepCollectionEquality().equals(other._scripts, _scripts)&&const DeepCollectionEquality().equals(other._profiles, _profiles)&&const DeepCollectionEquality().equals(other._links, _links));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_configMap),const DeepCollectionEquality().hash(_rules),const DeepCollectionEquality().hash(_scripts),const DeepCollectionEquality().hash(_profiles),const DeepCollectionEquality().hash(_links));\n\n@override\nString toString() {\n  return 'MigrationData(configMap: $configMap, rules: $rules, scripts: $scripts, profiles: $profiles, links: $links)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$MigrationDataCopyWith<$Res> implements $MigrationDataCopyWith<$Res> {\n  factory _$MigrationDataCopyWith(_MigrationData value, $Res Function(_MigrationData) _then) = __$MigrationDataCopyWithImpl;\n@override @useResult\n$Res call({\n Map<String, Object?>? configMap, List<Rule> rules, List<Script> scripts, List<Profile> profiles, List<ProfileRuleLink> links\n});\n\n\n\n\n}\n/// @nodoc\nclass __$MigrationDataCopyWithImpl<$Res>\n    implements _$MigrationDataCopyWith<$Res> {\n  __$MigrationDataCopyWithImpl(this._self, this._then);\n\n  final _MigrationData _self;\n  final $Res Function(_MigrationData) _then;\n\n/// Create a copy of MigrationData\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? configMap = freezed,Object? rules = null,Object? scripts = null,Object? profiles = null,Object? links = null,}) {\n  return _then(_MigrationData(\nconfigMap: freezed == configMap ? _self._configMap : configMap // ignore: cast_nullable_to_non_nullable\nas Map<String, Object?>?,rules: null == rules ? _self._rules : rules // ignore: cast_nullable_to_non_nullable\nas List<Rule>,scripts: null == scripts ? _self._scripts : scripts // ignore: cast_nullable_to_non_nullable\nas List<Script>,profiles: null == profiles ? _self._profiles : profiles // ignore: cast_nullable_to_non_nullable\nas List<Profile>,links: null == links ? _self._links : links // ignore: cast_nullable_to_non_nullable\nas List<ProfileRuleLink>,\n  ));\n}\n\n\n}\n\n/// @nodoc\nmixin _$SetupState {\n\n int? get profileId; int? get profileLastUpdateDate; OverwriteType get overwriteType; List<Rule> get addedRules; Script? get script; bool get overrideDns; Dns get dns;\n/// Create a copy of SetupState\n/// with the given fields replaced by the non-null parameter values.\n@JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n$SetupStateCopyWith<SetupState> get copyWith => _$SetupStateCopyWithImpl<SetupState>(this as SetupState, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is SetupState&&(identical(other.profileId, profileId) || other.profileId == profileId)&&(identical(other.profileLastUpdateDate, profileLastUpdateDate) || other.profileLastUpdateDate == profileLastUpdateDate)&&(identical(other.overwriteType, overwriteType) || other.overwriteType == overwriteType)&&const DeepCollectionEquality().equals(other.addedRules, addedRules)&&(identical(other.script, script) || other.script == script)&&(identical(other.overrideDns, overrideDns) || other.overrideDns == overrideDns)&&(identical(other.dns, dns) || other.dns == dns));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,profileId,profileLastUpdateDate,overwriteType,const DeepCollectionEquality().hash(addedRules),script,overrideDns,dns);\n\n@override\nString toString() {\n  return 'SetupState(profileId: $profileId, profileLastUpdateDate: $profileLastUpdateDate, overwriteType: $overwriteType, addedRules: $addedRules, script: $script, overrideDns: $overrideDns, dns: $dns)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class $SetupStateCopyWith<$Res>  {\n  factory $SetupStateCopyWith(SetupState value, $Res Function(SetupState) _then) = _$SetupStateCopyWithImpl;\n@useResult\n$Res call({\n int? profileId, int? profileLastUpdateDate, OverwriteType overwriteType, List<Rule> addedRules, Script? script, bool overrideDns, Dns dns\n});\n\n\n$ScriptCopyWith<$Res>? get script;$DnsCopyWith<$Res> get dns;\n\n}\n/// @nodoc\nclass _$SetupStateCopyWithImpl<$Res>\n    implements $SetupStateCopyWith<$Res> {\n  _$SetupStateCopyWithImpl(this._self, this._then);\n\n  final SetupState _self;\n  final $Res Function(SetupState) _then;\n\n/// Create a copy of SetupState\n/// with the given fields replaced by the non-null parameter values.\n@pragma('vm:prefer-inline') @override $Res call({Object? profileId = freezed,Object? profileLastUpdateDate = freezed,Object? overwriteType = null,Object? addedRules = null,Object? script = freezed,Object? overrideDns = null,Object? dns = null,}) {\n  return _then(_self.copyWith(\nprofileId: freezed == profileId ? _self.profileId : profileId // ignore: cast_nullable_to_non_nullable\nas int?,profileLastUpdateDate: freezed == profileLastUpdateDate ? _self.profileLastUpdateDate : profileLastUpdateDate // ignore: cast_nullable_to_non_nullable\nas int?,overwriteType: null == overwriteType ? _self.overwriteType : overwriteType // ignore: cast_nullable_to_non_nullable\nas OverwriteType,addedRules: null == addedRules ? _self.addedRules : addedRules // ignore: cast_nullable_to_non_nullable\nas List<Rule>,script: freezed == script ? _self.script : script // ignore: cast_nullable_to_non_nullable\nas Script?,overrideDns: null == overrideDns ? _self.overrideDns : overrideDns // ignore: cast_nullable_to_non_nullable\nas bool,dns: null == dns ? _self.dns : dns // ignore: cast_nullable_to_non_nullable\nas Dns,\n  ));\n}\n/// Create a copy of SetupState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$ScriptCopyWith<$Res>? get script {\n    if (_self.script == null) {\n    return null;\n  }\n\n  return $ScriptCopyWith<$Res>(_self.script!, (value) {\n    return _then(_self.copyWith(script: value));\n  });\n}/// Create a copy of SetupState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$DnsCopyWith<$Res> get dns {\n  \n  return $DnsCopyWith<$Res>(_self.dns, (value) {\n    return _then(_self.copyWith(dns: value));\n  });\n}\n}\n\n\n/// Adds pattern-matching-related methods to [SetupState].\nextension SetupStatePatterns on SetupState {\n/// A variant of `map` that fallback to returning `orElse`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SetupState value)?  $default,{required TResult orElse(),}){\nfinal _that = this;\nswitch (_that) {\ncase _SetupState() when $default != null:\nreturn $default(_that);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// Callbacks receives the raw object, upcasted.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case final Subclass2 value:\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SetupState value)  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _SetupState():\nreturn $default(_that);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `map` that fallback to returning `null`.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case final Subclass value:\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SetupState value)?  $default,){\nfinal _that = this;\nswitch (_that) {\ncase _SetupState() when $default != null:\nreturn $default(_that);case _:\n  return null;\n\n}\n}\n/// A variant of `when` that fallback to an `orElse` callback.\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return orElse();\n/// }\n/// ```\n\n@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int? profileId,  int? profileLastUpdateDate,  OverwriteType overwriteType,  List<Rule> addedRules,  Script? script,  bool overrideDns,  Dns dns)?  $default,{required TResult orElse(),}) {final _that = this;\nswitch (_that) {\ncase _SetupState() when $default != null:\nreturn $default(_that.profileId,_that.profileLastUpdateDate,_that.overwriteType,_that.addedRules,_that.script,_that.overrideDns,_that.dns);case _:\n  return orElse();\n\n}\n}\n/// A `switch`-like method, using callbacks.\n///\n/// As opposed to `map`, this offers destructuring.\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case Subclass2(:final field2):\n///     return ...;\n/// }\n/// ```\n\n@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int? profileId,  int? profileLastUpdateDate,  OverwriteType overwriteType,  List<Rule> addedRules,  Script? script,  bool overrideDns,  Dns dns)  $default,) {final _that = this;\nswitch (_that) {\ncase _SetupState():\nreturn $default(_that.profileId,_that.profileLastUpdateDate,_that.overwriteType,_that.addedRules,_that.script,_that.overrideDns,_that.dns);case _:\n  throw StateError('Unexpected subclass');\n\n}\n}\n/// A variant of `when` that fallback to returning `null`\n///\n/// It is equivalent to doing:\n/// ```dart\n/// switch (sealedClass) {\n///   case Subclass(:final field):\n///     return ...;\n///   case _:\n///     return null;\n/// }\n/// ```\n\n@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int? profileId,  int? profileLastUpdateDate,  OverwriteType overwriteType,  List<Rule> addedRules,  Script? script,  bool overrideDns,  Dns dns)?  $default,) {final _that = this;\nswitch (_that) {\ncase _SetupState() when $default != null:\nreturn $default(_that.profileId,_that.profileLastUpdateDate,_that.overwriteType,_that.addedRules,_that.script,_that.overrideDns,_that.dns);case _:\n  return null;\n\n}\n}\n\n}\n\n/// @nodoc\n\n\nclass _SetupState implements SetupState {\n  const _SetupState({required this.profileId, required this.profileLastUpdateDate, required this.overwriteType, required final  List<Rule> addedRules, required this.script, required this.overrideDns, required this.dns}): _addedRules = addedRules;\n  \n\n@override final  int? profileId;\n@override final  int? profileLastUpdateDate;\n@override final  OverwriteType overwriteType;\n final  List<Rule> _addedRules;\n@override List<Rule> get addedRules {\n  if (_addedRules is EqualUnmodifiableListView) return _addedRules;\n  // ignore: implicit_dynamic_type\n  return EqualUnmodifiableListView(_addedRules);\n}\n\n@override final  Script? script;\n@override final  bool overrideDns;\n@override final  Dns dns;\n\n/// Create a copy of SetupState\n/// with the given fields replaced by the non-null parameter values.\n@override @JsonKey(includeFromJson: false, includeToJson: false)\n@pragma('vm:prefer-inline')\n_$SetupStateCopyWith<_SetupState> get copyWith => __$SetupStateCopyWithImpl<_SetupState>(this, _$identity);\n\n\n\n@override\nbool operator ==(Object other) {\n  return identical(this, other) || (other.runtimeType == runtimeType&&other is _SetupState&&(identical(other.profileId, profileId) || other.profileId == profileId)&&(identical(other.profileLastUpdateDate, profileLastUpdateDate) || other.profileLastUpdateDate == profileLastUpdateDate)&&(identical(other.overwriteType, overwriteType) || other.overwriteType == overwriteType)&&const DeepCollectionEquality().equals(other._addedRules, _addedRules)&&(identical(other.script, script) || other.script == script)&&(identical(other.overrideDns, overrideDns) || other.overrideDns == overrideDns)&&(identical(other.dns, dns) || other.dns == dns));\n}\n\n\n@override\nint get hashCode => Object.hash(runtimeType,profileId,profileLastUpdateDate,overwriteType,const DeepCollectionEquality().hash(_addedRules),script,overrideDns,dns);\n\n@override\nString toString() {\n  return 'SetupState(profileId: $profileId, profileLastUpdateDate: $profileLastUpdateDate, overwriteType: $overwriteType, addedRules: $addedRules, script: $script, overrideDns: $overrideDns, dns: $dns)';\n}\n\n\n}\n\n/// @nodoc\nabstract mixin class _$SetupStateCopyWith<$Res> implements $SetupStateCopyWith<$Res> {\n  factory _$SetupStateCopyWith(_SetupState value, $Res Function(_SetupState) _then) = __$SetupStateCopyWithImpl;\n@override @useResult\n$Res call({\n int? profileId, int? profileLastUpdateDate, OverwriteType overwriteType, List<Rule> addedRules, Script? script, bool overrideDns, Dns dns\n});\n\n\n@override $ScriptCopyWith<$Res>? get script;@override $DnsCopyWith<$Res> get dns;\n\n}\n/// @nodoc\nclass __$SetupStateCopyWithImpl<$Res>\n    implements _$SetupStateCopyWith<$Res> {\n  __$SetupStateCopyWithImpl(this._self, this._then);\n\n  final _SetupState _self;\n  final $Res Function(_SetupState) _then;\n\n/// Create a copy of SetupState\n/// with the given fields replaced by the non-null parameter values.\n@override @pragma('vm:prefer-inline') $Res call({Object? profileId = freezed,Object? profileLastUpdateDate = freezed,Object? overwriteType = null,Object? addedRules = null,Object? script = freezed,Object? overrideDns = null,Object? dns = null,}) {\n  return _then(_SetupState(\nprofileId: freezed == profileId ? _self.profileId : profileId // ignore: cast_nullable_to_non_nullable\nas int?,profileLastUpdateDate: freezed == profileLastUpdateDate ? _self.profileLastUpdateDate : profileLastUpdateDate // ignore: cast_nullable_to_non_nullable\nas int?,overwriteType: null == overwriteType ? _self.overwriteType : overwriteType // ignore: cast_nullable_to_non_nullable\nas OverwriteType,addedRules: null == addedRules ? _self._addedRules : addedRules // ignore: cast_nullable_to_non_nullable\nas List<Rule>,script: freezed == script ? _self.script : script // ignore: cast_nullable_to_non_nullable\nas Script?,overrideDns: null == overrideDns ? _self.overrideDns : overrideDns // ignore: cast_nullable_to_non_nullable\nas bool,dns: null == dns ? _self.dns : dns // ignore: cast_nullable_to_non_nullable\nas Dns,\n  ));\n}\n\n/// Create a copy of SetupState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$ScriptCopyWith<$Res>? get script {\n    if (_self.script == null) {\n    return null;\n  }\n\n  return $ScriptCopyWith<$Res>(_self.script!, (value) {\n    return _then(_self.copyWith(script: value));\n  });\n}/// Create a copy of SetupState\n/// with the given fields replaced by the non-null parameter values.\n@override\n@pragma('vm:prefer-inline')\n$DnsCopyWith<$Res> get dns {\n  \n  return $DnsCopyWith<$Res>(_self.dns, (value) {\n    return _then(_self.copyWith(dns: value));\n  });\n}\n}\n\n// dart format on\n"
  },
  {
    "path": "lib/models/generated/state.g.dart",
    "content": "// GENERATED CODE - DO NOT MODIFY BY HAND\n\npart of '../state.dart';\n\n// **************************************************************************\n// JsonSerializableGenerator\n// **************************************************************************\n\n_SharedState _$SharedStateFromJson(Map<String, dynamic> json) => _SharedState(\n  setupParams: json['setupParams'] == null\n      ? null\n      : SetupParams.fromJson(json['setupParams'] as Map<String, dynamic>),\n  vpnOptions: json['vpnOptions'] == null\n      ? null\n      : VpnOptions.fromJson(json['vpnOptions'] as Map<String, dynamic>),\n  stopTip: json['stopTip'] as String,\n  startTip: json['startTip'] as String,\n  currentProfileName: json['currentProfileName'] as String,\n  stopText: json['stopText'] as String,\n  onlyStatisticsProxy: json['onlyStatisticsProxy'] as bool,\n  crashlytics: json['crashlytics'] as bool,\n);\n\nMap<String, dynamic> _$SharedStateToJson(_SharedState instance) =>\n    <String, dynamic>{\n      'setupParams': instance.setupParams,\n      'vpnOptions': instance.vpnOptions,\n      'stopTip': instance.stopTip,\n      'startTip': instance.startTip,\n      'currentProfileName': instance.currentProfileName,\n      'stopText': instance.stopText,\n      'onlyStatisticsProxy': instance.onlyStatisticsProxy,\n      'crashlytics': instance.crashlytics,\n    };\n"
  },
  {
    "path": "lib/models/models.dart",
    "content": "export 'app.dart';\nexport 'clash_config.dart';\nexport 'common.dart';\nexport 'config.dart';\nexport 'core.dart';\nexport 'profile.dart';\nexport 'state.dart';\n"
  },
  {
    "path": "lib/models/profile.dart",
    "content": "import 'dart:io';\nimport 'dart:typed_data';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/core/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:freezed_annotation/freezed_annotation.dart';\n\nimport 'clash_config.dart';\nimport 'state.dart';\n\npart 'generated/profile.freezed.dart';\npart 'generated/profile.g.dart';\n\n@freezed\nabstract class SubscriptionInfo with _$SubscriptionInfo {\n  const factory SubscriptionInfo({\n    @Default(0) int upload,\n    @Default(0) int download,\n    @Default(0) int total,\n    @Default(0) int expire,\n  }) = _SubscriptionInfo;\n\n  factory SubscriptionInfo.fromJson(Map<String, Object?> json) =>\n      _$SubscriptionInfoFromJson(json);\n\n  factory SubscriptionInfo.formHString(String? info) {\n    if (info == null) return const SubscriptionInfo();\n    final list = info.split(';');\n    Map<String, int?> map = {};\n    for (final i in list) {\n      final keyValue = i.trim().split('=');\n      map[keyValue[0]] = int.tryParse(keyValue[1]);\n    }\n    return SubscriptionInfo(\n      upload: map['upload'] ?? 0,\n      download: map['download'] ?? 0,\n      total: map['total'] ?? 0,\n      expire: map['expire'] ?? 0,\n    );\n  }\n}\n\n@freezed\nabstract class Profile with _$Profile {\n  const factory Profile({\n    required int id,\n    @Default('') String label,\n    String? currentGroupName,\n    @Default('') String url,\n    DateTime? lastUpdateDate,\n    required Duration autoUpdateDuration,\n    SubscriptionInfo? subscriptionInfo,\n    @Default(true) bool autoUpdate,\n    @Default({}) Map<String, String> selectedMap,\n    @Default({}) Set<String> unfoldSet,\n    @Default(OverwriteType.standard) OverwriteType overwriteType,\n    int? scriptId,\n    int? order,\n  }) = _Profile;\n\n  factory Profile.fromJson(Map<String, Object?> json) =>\n      _$ProfileFromJson(json);\n\n  factory Profile.normal({String? label, String url = ''}) {\n    final id = snowflake.id;\n    return Profile(\n      label: label ?? '',\n      url: url,\n      id: id,\n      autoUpdateDuration: defaultUpdateDuration,\n    );\n  }\n}\n\n@freezed\nabstract class ProfileRuleLink with _$ProfileRuleLink {\n  const factory ProfileRuleLink({\n    int? profileId,\n    required int ruleId,\n    RuleScene? scene,\n    String? order,\n  }) = _ProfileRuleLink;\n}\n\nextension ProfileRuleLinkExt on ProfileRuleLink {\n  String get key {\n    final splits = <String?>[\n      profileId?.toString(),\n      ruleId.toString(),\n      scene?.name,\n    ];\n    return splits.where((item) => item != null).join('_');\n  }\n}\n\n// @freezed\n// abstract class Overwrite with _$Overwrite {\n//   const factory Overwrite({\n//     @Default(OverwriteType.standard) OverwriteType type,\n//     @Default(StandardOverwrite()) StandardOverwrite standardOverwrite,\n//     @Default(ScriptOverwrite()) ScriptOverwrite scriptOverwrite,\n//   }) = _Overwrite;\n//\n//   factory Overwrite.fromJson(Map<String, Object?> json) =>\n//       _$OverwriteFromJson(json);\n// }\n\n@freezed\nabstract class StandardOverwrite with _$StandardOverwrite {\n  const factory StandardOverwrite({\n    @Default([]) List<Rule> addedRules,\n    @Default([]) List<int> disabledRuleIds,\n  }) = _StandardOverwrite;\n\n  factory StandardOverwrite.fromJson(Map<String, Object?> json) =>\n      _$StandardOverwriteFromJson(json);\n}\n\n@freezed\nabstract class ScriptOverwrite with _$ScriptOverwrite {\n  const factory ScriptOverwrite({int? scriptId}) = _ScriptOverwrite;\n\n  factory ScriptOverwrite.fromJson(Map<String, Object?> json) =>\n      _$ScriptOverwriteFromJson(json);\n}\n\nextension ProfilesExt on List<Profile> {\n  Profile? getProfile(int? profileId) {\n    final index = indexWhere((profile) => profile.id == profileId);\n    return index == -1 ? null : this[index];\n  }\n\n  String _getLabel(String label, int id) {\n    final realLabel = label.takeFirstValid([id.toString()]);\n    final hasDup =\n        indexWhere(\n          (element) => element.label == realLabel && element.id != id,\n        ) !=\n        -1;\n    if (hasDup) {\n      return _getLabel(utils.getOverwriteLabel(realLabel), id);\n    } else {\n      return label;\n    }\n  }\n\n  VM2<List<Profile>, Profile> copyAndAddProfile(Profile profile) {\n    final List<Profile> profilesTemp = List.from(this);\n    final index = profilesTemp.indexWhere(\n      (element) => element.id == profile.id,\n    );\n    final updateProfile = profile.copyWith(\n      label: _getLabel(profile.label, profile.id),\n    );\n    if (index == -1) {\n      profilesTemp.add(updateProfile);\n    } else {\n      profilesTemp[index] = updateProfile;\n    }\n    return VM2(profilesTemp, updateProfile);\n  }\n}\n\nextension ProfileExtension on Profile {\n  ProfileType get type =>\n      url.isEmpty == true ? ProfileType.file : ProfileType.url;\n\n  bool get realAutoUpdate => url.isEmpty == true ? false : autoUpdate;\n\n  String get realLabel => label.takeFirstValid([id.toString()]);\n\n  String get fileName => '$id.yaml';\n\n  String get updatingKey => 'profile_$id';\n\n  Future<Profile?> checkAndUpdateAndCopy() async {\n    final mFile = await _getFile(false);\n    final isExists = await mFile.exists();\n    if (isExists || url.isEmpty) {\n      return null;\n    }\n    return update();\n  }\n\n  Future<File> _getFile([bool autoCreate = true]) async {\n    final path = await appPath.getProfilePath(id.toString());\n    final file = File(path);\n    final isExists = await file.exists();\n    if (!isExists && autoCreate) {\n      return await file.create(recursive: true);\n    }\n    return file;\n    // final oldPath = await appPath.getProfilePath(id);\n    // final newPath = await appPath.getProfilePath(fileName);\n    // final oldFile = oldPath == newPath ? null : File(oldPath);\n    // final oldIsExists = await oldFile?.exists() ?? false;\n    // if (oldIsExists) {\n    //   return await oldFile!.rename(newPath);\n    // }\n    // final file = File(newPath);\n    // final isExists = await file.exists();\n    // if (!isExists && autoCreate) {\n    //   return await file.create(recursive: true);\n    // }\n    // return file;\n  }\n\n  Future<File> get file async {\n    return _getFile();\n  }\n\n  Future<Profile> update() async {\n    final response = await request.getFileResponseForUrl(url);\n    final disposition = response.headers.value('content-disposition');\n    final userinfo = response.headers.value('subscription-userinfo');\n    return await copyWith(\n      label: label.takeFirstValid([\n        utils.getFileNameForDisposition(disposition),\n        id.toString(),\n      ]),\n      subscriptionInfo: SubscriptionInfo.formHString(userinfo),\n    ).saveFile(response.data ?? Uint8List.fromList([]));\n  }\n\n  Future<Profile> saveFile(Uint8List bytes) async {\n    final path = await appPath.tempFilePath;\n    final tempFile = File(path);\n    await tempFile.safeWriteAsBytes(bytes);\n    final message = await coreController.validateConfig(path);\n    if (message.isNotEmpty) {\n      throw message;\n    }\n    final mFile = await file;\n    await tempFile.copy(mFile.path);\n    await tempFile.safeDelete();\n    return copyWith(lastUpdateDate: DateTime.now());\n  }\n\n  Future<Profile> saveFileWithPath(String path) async {\n    final message = await coreController.validateConfig(path);\n    if (message.isNotEmpty) {\n      throw message;\n    }\n    final mFile = await file;\n    await File(path).copy(mFile.path);\n    return copyWith(lastUpdateDate: DateTime.now());\n  }\n}\n"
  },
  {
    "path": "lib/models/state.dart",
    "content": "import 'package:collection/collection.dart';\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:flutter/material.dart';\nimport 'package:freezed_annotation/freezed_annotation.dart';\n\nimport 'app.dart';\nimport 'clash_config.dart';\nimport 'common.dart';\nimport 'config.dart';\nimport 'core.dart';\nimport 'profile.dart';\n\npart 'generated/state.freezed.dart';\npart 'generated/state.g.dart';\n\n@freezed\nabstract class VM2<A, B> with _$VM2<A, B> {\n  const factory VM2(A a, B b) = _VM2;\n}\n\n@freezed\nabstract class VM3<A, B, C> with _$VM3<A, B, C> {\n  const factory VM3(A a, B b, C c) = _VM3;\n}\n\n@freezed\nabstract class VM4<A, B, C, D> with _$VM4<A, B, C, D> {\n  const factory VM4(A a, B b, C c, D d) = _VM4;\n}\n\n@freezed\nabstract class VM5<A, B, C, D, E> with _$VM5<A, B, C, D, E> {\n  const factory VM5(A a, B b, C c, D d, E e) = _VM5;\n}\n\n@freezed\nabstract class ActivateState with _$ActivateState {\n  const factory ActivateState({required bool active}) = _ActivateState;\n}\n\n@freezed\nabstract class InitState with _$InitState {\n  const factory InitState({\n    required Config config,\n    required List<Profile> profiles,\n  }) = _InitState;\n}\n\n@freezed\nabstract class CommonMessage with _$CommonMessage {\n  const factory CommonMessage({\n    required String id,\n    required String text,\n    @Default(Duration(seconds: 3)) Duration duration,\n    MessageActionState? actionState,\n  }) = _CommonMessage;\n}\n\n@freezed\nabstract class MessageActionState with _$MessageActionState {\n  const factory MessageActionState({\n    required String actionText,\n    required VoidCallback action,\n  }) = _MessageActionState;\n}\n\n@freezed\nabstract class AppBarState with _$AppBarState {\n  const factory AppBarState({\n    @Default([]) List<Widget> actions,\n    AppBarSearchState? searchState,\n    AppBarEditState? editState,\n  }) = _AppBarState;\n}\n\n@freezed\nabstract class AppBarSearchState with _$AppBarSearchState {\n  const factory AppBarSearchState({\n    required Function(String) onSearch,\n    @Default(true) bool autoAddSearch,\n    @Default(null) String? query,\n  }) = _AppBarSearchState;\n}\n\n@freezed\nabstract class AppBarEditState with _$AppBarEditState {\n  const factory AppBarEditState({\n    @Default(0) int editCount,\n    required Function() onExit,\n  }) = _AppBarEditState;\n}\n\n@freezed\nabstract class StartButtonState with _$StartButtonState {\n  const factory StartButtonState({\n    required bool isPreload,\n    required bool hasProfile,\n  }) = _StartButtonState;\n}\n\n@freezed\nabstract class ProfilesState with _$ProfilesState {\n  const factory ProfilesState({\n    required List<Profile> profiles,\n    required int? currentProfileId,\n    required int columns,\n  }) = _ProfilesState;\n}\n\n@freezed\nabstract class NetworkDetectionState with _$NetworkDetectionState {\n  const factory NetworkDetectionState({\n    required bool isLoading,\n    required IpInfo? ipInfo,\n  }) = _NetworkDetectionState;\n}\n\n@freezed\nabstract class TrayState with _$TrayState {\n  const factory TrayState({\n    required Mode mode,\n    required int port,\n    required bool autoLaunch,\n    required bool systemProxy,\n    required bool tunEnable,\n    required bool isStart,\n    required String? locale,\n    required Brightness? brightness,\n    required List<Group> groups,\n    required Map<String, String> selectedMap,\n    required bool showTrayTitle,\n  }) = _TrayState;\n}\n\n@freezed\nabstract class TrayTitleState with _$TrayTitleState {\n  const factory TrayTitleState({\n    required Traffic traffic,\n    required bool showTrayTitle,\n  }) = _TrayTitleState;\n}\n\n@freezed\nabstract class NavigationState with _$NavigationState {\n  const factory NavigationState({\n    required PageLabel pageLabel,\n    required List<NavigationItem> navigationItems,\n    required ViewMode viewMode,\n    required String? locale,\n    required int currentIndex,\n  }) = _NavigationState;\n}\n\n@freezed\nabstract class GroupsState with _$GroupsState {\n  const factory GroupsState({required List<Group> value}) = _GroupsState;\n}\n\n@freezed\nabstract class NavigationItemsState with _$NavigationItemsState {\n  const factory NavigationItemsState({required List<NavigationItem> value}) =\n      _NavigationItemsState;\n}\n\n@freezed\nabstract class ProxiesListState with _$ProxiesListState {\n  const factory ProxiesListState({\n    required List<Group> groups,\n    required Set<String> currentUnfoldSet,\n    required ProxyCardType proxyCardType,\n    required int columns,\n  }) = _ProxiesListState;\n}\n\n@freezed\nabstract class ProxiesTabState with _$ProxiesTabState {\n  const factory ProxiesTabState({\n    required List<Group> groups,\n    required String? currentGroupName,\n    required ProxyCardType proxyCardType,\n    required int columns,\n  }) = _ProxiesTabState;\n}\n\n@freezed\nabstract class ProxyGroupSelectorState with _$ProxyGroupSelectorState {\n  const factory ProxyGroupSelectorState({\n    required String? testUrl,\n    required ProxiesSortType proxiesSortType,\n    required ProxyCardType proxyCardType,\n    required num sortNum,\n    required GroupType groupType,\n    required List<Proxy> proxies,\n    required int columns,\n  }) = _ProxyGroupSelectorState;\n}\n\n@freezed\nabstract class MoreToolsSelectorState with _$MoreToolsSelectorState {\n  const factory MoreToolsSelectorState({\n    required List<NavigationItem> navigationItems,\n  }) = _MoreToolsSelectorState;\n}\n\n@freezed\nabstract class PackageListSelectorState with _$PackageListSelectorState {\n  const factory PackageListSelectorState({\n    required List<Package> packages,\n    required AccessControlProps accessControlProps,\n  }) = _PackageListSelectorState;\n}\n\nextension PackageListSelectorStateExt on PackageListSelectorState {\n  List<Package> get list {\n    final isFilterSystemApp = accessControlProps.isFilterSystemApp;\n    final isFilterNonInternetApp = accessControlProps.isFilterNonInternetApp;\n    return packages\n        .where(\n          (item) =>\n              (isFilterSystemApp ? item.system == false : true) &&\n              (isFilterNonInternetApp ? item.internet == true : true),\n        )\n        .toList();\n  }\n\n  List<Package> getSortList(List<String> selectedList) {\n    final sort = accessControlProps.sort;\n\n    return list.sorted((a, b) {\n      final isSelectA = selectedList.contains(a.packageName);\n      final isSelectB = selectedList.contains(b.packageName);\n\n      if (isSelectA != isSelectB) {\n        return isSelectA ? -1 : 1;\n      }\n      return switch (sort) {\n        AccessSortType.none => 0,\n        AccessSortType.name => a.label.compareTo(b.label),\n        AccessSortType.time => b.lastUpdateTime.compareTo(a.lastUpdateTime),\n      };\n    });\n  }\n}\n\n@freezed\nabstract class ProxiesListHeaderSelectorState\n    with _$ProxiesListHeaderSelectorState {\n  const factory ProxiesListHeaderSelectorState({\n    required double offset,\n    required int currentIndex,\n  }) = _ProxiesListHeaderSelectorState;\n}\n\n@freezed\nabstract class ProxiesActionsState with _$ProxiesActionsState {\n  const factory ProxiesActionsState({\n    required PageLabel pageLabel,\n    required ProxiesType type,\n    required bool hasProviders,\n  }) = _ProxiesActionsState;\n}\n\n@freezed\nabstract class ProxyState with _$ProxyState {\n  const factory ProxyState({\n    required bool isStart,\n    required bool systemProxy,\n    required List<String> bassDomain,\n    required int port,\n  }) = _ProxyState;\n}\n\n@freezed\nabstract class ClashConfigState with _$ClashConfigState {\n  const factory ClashConfigState({\n    required bool overrideDns,\n    required ClashConfig clashConfig,\n    required RouteMode routeMode,\n  }) = _ClashConfigState;\n}\n\n@freezed\nabstract class DashboardState with _$DashboardState {\n  const factory DashboardState({\n    required List<DashboardWidget> dashboardWidgets,\n    required double contentWidth,\n  }) = _DashboardState;\n}\n\n@freezed\nabstract class SelectedProxyState with _$SelectedProxyState {\n  const factory SelectedProxyState({\n    required String proxyName,\n    @Default(false) bool group,\n    String? testUrl,\n  }) = _SelectedProxyState;\n}\n\n@freezed\nabstract class VpnState with _$VpnState {\n  const factory VpnState({\n    required TunStack stack,\n    required VpnProps vpnProps,\n  }) = _VpnState;\n}\n\n@freezed\nabstract class SharedState with _$SharedState {\n  const factory SharedState({\n    SetupParams? setupParams,\n    VpnOptions? vpnOptions,\n    required String stopTip,\n    required String startTip,\n    required String currentProfileName,\n    required String stopText,\n    required bool onlyStatisticsProxy,\n    required bool crashlytics,\n  }) = _SharedState;\n\n  factory SharedState.fromJson(Map<String, Object?> json) =>\n      _$SharedStateFromJson(json);\n}\n\nextension SharedStateExt on SharedState {\n  SharedState get needSyncSharedState => copyWith(setupParams: null);\n}\n\n@freezed\nabstract class ComputeGroupsState with _$ComputeGroupsState {\n  const factory ComputeGroupsState({\n    required ProxiesData proxiesData,\n    required ProxiesSortType sortType,\n    required DelayMap delayMap,\n    required Map<String, String> selectedMap,\n    required String defaultTestUrl,\n  }) = _ComputeGroupsState;\n}\n\n@freezed\nabstract class MakeRealProfileState with _$MakeRealProfileState {\n  const factory MakeRealProfileState({\n    required String profilesPath,\n    required int profileId,\n    required Map<String, dynamic> rawConfig,\n    required ClashConfig realPatchConfig,\n    required bool overrideDns,\n    required bool appendSystemDns,\n    required List<Rule> addedRules,\n    required String defaultUA,\n  }) = _MakeRealProfileState;\n}\n\n@freezed\nabstract class MigrationData with _$MigrationData {\n  const factory MigrationData({\n    Map<String, Object?>? configMap,\n    @Default([]) List<Rule> rules,\n    @Default([]) List<Script> scripts,\n    @Default([]) List<Profile> profiles,\n    @Default([]) List<ProfileRuleLink> links,\n  }) = _MigrationData;\n}\n\n@freezed\nabstract class SetupState with _$SetupState {\n  const factory SetupState({\n    required int? profileId,\n    required int? profileLastUpdateDate,\n    required OverwriteType overwriteType,\n    required List<Rule> addedRules,\n    required Script? script,\n    required bool overrideDns,\n    required Dns dns,\n  }) = _SetupState;\n}\n\nextension SetupStateExt on SetupState {\n  bool needSetup(SetupState? lastSetupState) {\n    if (lastSetupState == null) {\n      return false;\n    }\n    if (profileId != lastSetupState.profileId) {\n      return true;\n    }\n    if (profileLastUpdateDate != lastSetupState.profileLastUpdateDate) {\n      return true;\n    }\n    final scriptIsChange = script != lastSetupState.script;\n    if (overwriteType != lastSetupState.overwriteType) {\n      if (!ruleListEquality.equals(addedRules, lastSetupState.addedRules) ||\n          scriptIsChange) {\n        return true;\n      }\n    } else {\n      if (overwriteType == OverwriteType.script) {\n        if (scriptIsChange) {\n          return true;\n        }\n      }\n      if (overwriteType == OverwriteType.standard) {\n        if (!ruleListEquality.equals(addedRules, lastSetupState.addedRules)) {\n          return true;\n        }\n      }\n    }\n    if (overrideDns != lastSetupState.overrideDns) {\n      return true;\n    }\n    if (overrideDns == true && dns != lastSetupState.dns) {\n      return true;\n    }\n    return false;\n  }\n}\n"
  },
  {
    "path": "lib/pages/editor.dart",
    "content": "import 'dart:convert';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/common.dart';\nimport 'package:fl_clash/providers/app.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/services.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:re_editor/re_editor.dart';\nimport 'package:re_highlight/languages/javascript.dart';\nimport 'package:re_highlight/languages/json.dart';\nimport 'package:re_highlight/languages/yaml.dart';\nimport 'package:re_highlight/styles/atom-one-light.dart';\n\ntypedef EditingValueChangeBuilder = Widget Function(CodeLineEditingValue value);\ntypedef TextEditingValueChangeBuilder = Widget Function(TextEditingValue value);\n\nclass EditorPage extends ConsumerStatefulWidget {\n  final String title;\n  final String content;\n  final List<Language> languages;\n  final bool supportRemoteDownload;\n  final bool titleEditable;\n  final Function(BuildContext context, String title, String content)? onSave;\n  final Future<bool> Function(\n    BuildContext context,\n    String title,\n    String content,\n  )?\n  onPop;\n\n  const EditorPage({\n    super.key,\n    required this.title,\n    required this.content,\n    this.titleEditable = false,\n    this.onSave,\n    this.onPop,\n    this.supportRemoteDownload = false,\n    this.languages = const [Language.yaml],\n  });\n\n  @override\n  ConsumerState<EditorPage> createState() => _EditorPageState();\n}\n\nclass _EditorPageState extends ConsumerState<EditorPage> {\n  late CodeLineEditingController _controller;\n  late CodeFindController _findController;\n  late TextEditingController _titleController;\n  late FocusNode _focusNode;\n  late bool readOnly = false;\n  late final SelectionToolbarController _toolbarController;\n\n  @override\n  void initState() {\n    super.initState();\n    readOnly = widget.onSave == null;\n    _toolbarController = ContextMenuControllerImpl(readOnly);\n    _focusNode = FocusNode(canRequestFocus: !readOnly);\n    _controller = CodeLineEditingController.fromText(widget.content);\n    _findController = CodeFindController(_controller);\n    _titleController = TextEditingController(text: widget.title);\n    if (system.isDesktop) {\n      return;\n    }\n    _focusNode.onKeyEvent = ((_, event) {\n      final keys = HardwareKeyboard.instance.logicalKeysPressed;\n      final key = event.logicalKey;\n      if (!keys.contains(key)) {\n        return KeyEventResult.ignored;\n      }\n      if (key == LogicalKeyboardKey.arrowUp) {\n        _controller.moveCursor(AxisDirection.up);\n        return KeyEventResult.handled;\n      } else if (key == LogicalKeyboardKey.arrowDown) {\n        _controller.moveCursor(AxisDirection.down);\n        return KeyEventResult.handled;\n      } else if (key == LogicalKeyboardKey.arrowLeft) {\n        _controller.selection.endIndex;\n        _controller.moveCursor(AxisDirection.left);\n        return KeyEventResult.handled;\n      } else if (key == LogicalKeyboardKey.arrowRight) {\n        _controller.moveCursor(AxisDirection.right);\n        return KeyEventResult.handled;\n      }\n      return KeyEventResult.ignored;\n    });\n  }\n\n  @override\n  void dispose() {\n    _toolbarController.hide(context);\n    _findController.dispose();\n    _controller.dispose();\n    _focusNode.dispose();\n    super.dispose();\n  }\n\n  Widget _wrapController(EditingValueChangeBuilder builder) {\n    return ValueListenableBuilder(\n      valueListenable: _controller,\n      builder: (_, value, _) {\n        return builder(value);\n      },\n    );\n  }\n\n  Widget _wrapTitleController(TextEditingValueChangeBuilder builder) {\n    return ValueListenableBuilder(\n      valueListenable: _titleController,\n      builder: (_, value, _) {\n        return builder(value);\n      },\n    );\n  }\n\n  void _handleSearch() {\n    _findController.findMode();\n  }\n\n  Future<void> _handleImportFormFile() async {\n    final file = await picker.pickerFile();\n    if (file == null) {\n      return;\n    }\n    final res = utf8.decode(file.bytes?.toList() ?? []);\n    _controller.text = res;\n  }\n\n  Future<void> _handleImportFormUrl() async {\n    final url = await globalState.showCommonDialog(\n      child: InputDialog(\n        title: appLocalizations.import,\n        value: '',\n        labelText: appLocalizations.url,\n        validator: (value) {\n          if (value == null || value.isEmpty) {\n            return appLocalizations.emptyTip(appLocalizations.value);\n          }\n          if (!value.isUrl) {\n            return appLocalizations.urlTip(appLocalizations.value);\n          }\n          return null;\n        },\n      ),\n    );\n    if (url == null) {\n      return;\n    }\n    final res = await request.getTextResponseForUrl(url);\n    _controller.text = res.data ?? '';\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final isMobileView = ref.watch(isMobileViewProvider);\n    return CommonPopScope(\n      onPop: (context) async {\n        if (widget.onPop == null) {\n          return true;\n        }\n        final res = await widget.onPop!(\n          context,\n          _titleController.text,\n          _controller.text,\n        );\n        if (res && context.mounted) {\n          return true;\n        }\n        return false;\n      },\n      child: CommonScaffold(\n        appBar: AppBar(\n          title: TextField(\n            maxLength: 20,\n            enabled: widget.titleEditable,\n            controller: _titleController,\n            decoration: InputDecoration(\n              border: _NoInputBorder(),\n              counter: SizedBox(),\n              hintText: appLocalizations.unnamed,\n            ),\n            style: context.textTheme.titleLarge,\n            autofocus: false,\n          ),\n          actions: genActions([\n            if (!readOnly)\n              _wrapController(\n                (value) => _wrapTitleController(\n                  (value) => IconButton(\n                    onPressed:\n                        _controller.text != widget.content ||\n                            _titleController.text != widget.title\n                        ? () {\n                            widget.onSave!(\n                              context,\n                              _titleController.text,\n                              _controller.text,\n                            );\n                          }\n                        : null,\n                    icon: const Icon(Icons.save),\n                  ),\n                ),\n              ),\n            _wrapController(\n              (value) => CommonPopupBox(\n                targetBuilder: (open) {\n                  return IconButton(\n                    onPressed: () {\n                      final isMobile = ref.read(isMobileViewProvider);\n                      open(offset: Offset(0, isMobile ? 0 : 20));\n                    },\n                    icon: const Icon(Icons.more_vert),\n                  );\n                },\n                popup: CommonPopupMenu(\n                  items: [\n                    PopupMenuItemData(\n                      icon: Icons.search,\n                      label: appLocalizations.search,\n                      onPressed: _handleSearch,\n                    ),\n                    PopupMenuItemData(\n                      icon: Icons.undo,\n                      label: appLocalizations.undo,\n                      onPressed: _controller.canUndo ? _controller.undo : null,\n                    ),\n                    PopupMenuItemData(\n                      icon: Icons.redo,\n                      label: appLocalizations.redo,\n                      onPressed: _controller.canRedo ? _controller.redo : null,\n                    ),\n                    if (widget.supportRemoteDownload && !readOnly)\n                      PopupMenuItemData(\n                        icon: Icons.arrow_downward,\n                        label: appLocalizations.externalFetch,\n                        subItems: [\n                          PopupMenuItemData(\n                            label: appLocalizations.importUrl,\n                            onPressed: _handleImportFormUrl,\n                          ),\n                          PopupMenuItemData(\n                            label: appLocalizations.importFile,\n                            onPressed: _handleImportFormFile,\n                          ),\n                        ],\n                      ),\n                  ],\n                ),\n              ),\n            ),\n          ]),\n        ),\n        body: CodeEditor(\n          readOnly: readOnly,\n          autofocus: false,\n          findController: _findController,\n          findBuilder: (context, controller, readOnly) => FindPanel(\n            controller: controller,\n            readOnly: readOnly,\n            isMobileView: isMobileView,\n          ),\n          padding: EdgeInsets.only(right: 16),\n          autocompleteSymbols: true,\n          focusNode: _focusNode,\n          scrollbarBuilder: (context, child, details) {\n            return CommonScrollBar(\n              controller: details.controller,\n              child: child,\n            );\n          },\n          toolbarController: _toolbarController,\n          indicatorBuilder:\n              (context, editingController, chunkController, notifier) {\n                return Row(\n                  children: [\n                    DefaultCodeLineNumber(\n                      controller: editingController,\n                      notifier: notifier,\n                    ),\n                    DefaultCodeChunkIndicator(\n                      width: 20,\n                      controller: chunkController,\n                      notifier: notifier,\n                    ),\n                  ],\n                );\n              },\n          shortcutsActivatorsBuilder: DefaultCodeShortcutsActivatorsBuilder(),\n          controller: _controller,\n          style: CodeEditorStyle(\n            fontSize: context.textTheme.bodyLarge?.fontSize?.ap,\n            fontFamily: FontFamily.jetBrainsMono.value,\n            codeTheme: CodeHighlightTheme(\n              languages: {\n                if (widget.languages.contains(Language.yaml))\n                  'yaml': CodeHighlightThemeMode(mode: langYaml),\n                if (widget.languages.contains(Language.javaScript))\n                  'javascript': CodeHighlightThemeMode(mode: langJavascript),\n                if (widget.languages.contains(Language.json))\n                  'json': CodeHighlightThemeMode(mode: langJson),\n              },\n              theme: atomOneLightTheme,\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n\nconst double _kDefaultFindPanelHeight = 52;\n\nclass FindPanel extends StatelessWidget implements PreferredSizeWidget {\n  final CodeFindController controller;\n  final bool readOnly;\n  final bool isMobileView;\n  final double height;\n\n  const FindPanel({\n    super.key,\n    required this.controller,\n    required this.readOnly,\n    required this.isMobileView,\n  }) : height =\n           (isMobileView\n               ? _kDefaultFindPanelHeight * 2\n               : _kDefaultFindPanelHeight) +\n           8;\n\n  @override\n  Size get preferredSize =>\n      Size(double.infinity, controller.value == null ? 0 : height);\n\n  @override\n  Widget build(BuildContext context) {\n    if (controller.value == null) {\n      return const SizedBox(width: 0, height: 0);\n    }\n    return Container(\n      padding: EdgeInsets.symmetric(vertical: 12, horizontal: 16),\n      margin: EdgeInsets.only(bottom: 8),\n      color: context.colorScheme.surface,\n      alignment: Alignment.centerLeft,\n      height: height,\n      child: _buildFindInputView(context),\n    );\n  }\n\n  Widget _buildFindInputView(BuildContext context) {\n    final CodeFindValue value = controller.value!;\n    final String result;\n    if (value.result == null) {\n      result = appLocalizations.none;\n    } else {\n      result = '${value.result!.index + 1}/${value.result!.matches.length}';\n    }\n    final bar = CommonMinIconButtonTheme(\n      child: Row(\n        crossAxisAlignment: CrossAxisAlignment.center,\n        children: [\n          if (!isMobileView) ...[\n            ConstrainedBox(\n              constraints: BoxConstraints(maxWidth: 360),\n              child: _buildFindInput(context, value),\n            ),\n            SizedBox(width: 12),\n          ],\n          Text(result, style: context.textTheme.bodyMedium),\n          Expanded(\n            child: Row(\n              mainAxisAlignment: MainAxisAlignment.end,\n              spacing: 2,\n              children: [\n                _buildIconButton(\n                  onPressed: value.result == null\n                      ? null\n                      : () {\n                          controller.previousMatch();\n                        },\n                  icon: Icons.arrow_upward,\n                ),\n                _buildIconButton(\n                  onPressed: value.result == null\n                      ? null\n                      : () {\n                          controller.nextMatch();\n                        },\n                  icon: Icons.arrow_downward,\n                ),\n                SizedBox(width: 2),\n                IconButton.filledTonal(\n                  onPressed: controller.close,\n                  icon: Icon(Icons.close, size: 16),\n                ),\n              ],\n            ),\n          ),\n        ],\n      ),\n    );\n    if (isMobileView) {\n      return Column(\n        mainAxisSize: MainAxisSize.min,\n        mainAxisAlignment: MainAxisAlignment.spaceBetween,\n        children: [bar, SizedBox(height: 4), _buildFindInput(context, value)],\n      );\n    }\n    return bar;\n  }\n\n  Widget _buildFindInput(BuildContext context, CodeFindValue value) {\n    return Row(\n      mainAxisAlignment: MainAxisAlignment.end,\n      spacing: 8,\n      children: [\n        Flexible(\n          child: _buildTextField(\n            context: context,\n            onSubmitted: () {\n              if (value.result == null) {\n                return;\n              }\n              controller.nextMatch();\n              controller.findInputFocusNode.requestFocus();\n            },\n            controller: controller.findInputController,\n            focusNode: controller.findInputFocusNode,\n          ),\n        ),\n        _buildCheckText(\n          context: context,\n          text: 'Aa',\n          isSelected: value.option.caseSensitive,\n          onPressed: () {\n            controller.toggleCaseSensitive();\n          },\n        ),\n        _buildCheckText(\n          context: context,\n          text: '.*',\n          isSelected: value.option.regex,\n          onPressed: () {\n            controller.toggleRegex();\n          },\n        ),\n        SizedBox(width: 4),\n      ],\n    );\n  }\n\n  Widget _buildTextField({\n    required BuildContext context,\n    required TextEditingController controller,\n    required FocusNode focusNode,\n    required VoidCallback onSubmitted,\n  }) {\n    return SizedBox(\n      height: globalState.measure.bodyMediumHeight + 8 * 2,\n      child: TextField(\n        maxLines: 1,\n        focusNode: focusNode,\n        style: context.textTheme.bodyMedium,\n        decoration: InputDecoration(\n          border: OutlineInputBorder(),\n          contentPadding: EdgeInsets.symmetric(horizontal: 12),\n        ),\n        onSubmitted: (_) {\n          onSubmitted();\n        },\n        controller: controller,\n      ),\n    );\n  }\n\n  Widget _buildCheckText({\n    required BuildContext context,\n    required String text,\n    required bool isSelected,\n    required VoidCallback onPressed,\n  }) {\n    return SizedBox(\n      width: 28,\n      height: 28,\n      child: MouseRegion(\n        cursor: SystemMouseCursors.click,\n        child: isSelected\n            ? IconButton.filledTonal(\n                onPressed: onPressed,\n                padding: EdgeInsets.all(2),\n                icon: Text(text, style: context.textTheme.bodySmall),\n              )\n            : IconButton(\n                onPressed: onPressed,\n                padding: EdgeInsets.all(2),\n                icon: Text(text, style: context.textTheme.bodySmall),\n              ),\n      ),\n    );\n  }\n\n  Widget _buildIconButton({required IconData icon, VoidCallback? onPressed}) {\n    return IconButton(onPressed: onPressed, icon: Icon(icon, size: 16));\n  }\n}\n\nclass ContextMenuControllerImpl implements SelectionToolbarController {\n  OverlayEntry? _overlayEntry;\n  bool _isFirstRender = true;\n  bool readOnly = false;\n\n  ContextMenuControllerImpl(this.readOnly);\n\n  void _removeOverLayEntry() {\n    _overlayEntry?.remove();\n    _overlayEntry = null;\n    _isFirstRender = true;\n  }\n\n  @override\n  void hide(BuildContext context) {\n    _removeOverLayEntry();\n  }\n\n  @override\n  void show({\n    required context,\n    required controller,\n    required anchors,\n    renderRect,\n    required layerLink,\n    required ValueNotifier<bool> visibility,\n  }) {\n    _removeOverLayEntry();\n    _overlayEntry ??= OverlayEntry(\n      builder: (context) => CodeEditorTapRegion(\n        child: ValueListenableBuilder(\n          valueListenable: controller,\n          builder: (_, _, child) {\n            final isNotEmpty = controller.selectedText.isNotEmpty;\n            final isAllSelected = controller.isAllSelected;\n            final hasSelected = controller.selectedText.isNotEmpty;\n            List<PopupMenuItemData> menus = [\n              if (isNotEmpty)\n                PopupMenuItemData(\n                  label: appLocalizations.copy,\n                  onPressed: controller.copy,\n                ),\n              if (!readOnly)\n                PopupMenuItemData(\n                  label: appLocalizations.paste,\n                  onPressed: controller.paste,\n                ),\n              if (isNotEmpty && !readOnly)\n                PopupMenuItemData(\n                  label: appLocalizations.cut,\n                  onPressed: controller.cut,\n                ),\n              if (hasSelected && !isAllSelected)\n                PopupMenuItemData(\n                  label: appLocalizations.selectAll,\n                  onPressed: controller.selectAll,\n                ),\n            ];\n            if (_isFirstRender) {\n              _isFirstRender = false;\n            } else if (controller.selectedText.isEmpty) {\n              _removeOverLayEntry();\n            }\n            if (menus.isEmpty) {\n              _removeOverLayEntry();\n              return SizedBox();\n            }\n            return TextSelectionToolbar(\n              anchorAbove: anchors.primaryAnchor,\n              anchorBelow: anchors.secondaryAnchor ?? Offset.zero,\n              children: menus.asMap().entries.map((\n                MapEntry<int, PopupMenuItemData> entry,\n              ) {\n                return TextSelectionToolbarTextButton(\n                  padding: TextSelectionToolbarTextButton.getPadding(\n                    entry.key,\n                    menus.length,\n                  ),\n                  alignment: AlignmentDirectional.centerStart,\n                  onPressed: () {\n                    if (entry.value.onPressed == null) {\n                      return;\n                    }\n                    entry.value.onPressed!();\n                    _removeOverLayEntry();\n                  },\n                  child: Text(entry.value.label),\n                );\n              }).toList(),\n            );\n          },\n        ),\n      ),\n    );\n    Overlay.of(context).insert(_overlayEntry!);\n  }\n}\n\nclass _NoInputBorder extends InputBorder {\n  const _NoInputBorder() : super(borderSide: BorderSide.none);\n\n  @override\n  _NoInputBorder copyWith({BorderSide? borderSide}) => const _NoInputBorder();\n\n  @override\n  bool get isOutline => false;\n\n  @override\n  EdgeInsetsGeometry get dimensions => EdgeInsets.zero;\n\n  @override\n  _NoInputBorder scale(double t) => const _NoInputBorder();\n\n  @override\n  Path getInnerPath(Rect rect, {TextDirection? textDirection}) {\n    return Path()..addRect(rect);\n  }\n\n  @override\n  Path getOuterPath(Rect rect, {TextDirection? textDirection}) {\n    return Path()..addRect(rect);\n  }\n\n  @override\n  void paintInterior(\n    Canvas canvas,\n    Rect rect,\n    Paint paint, {\n    TextDirection? textDirection,\n  }) {\n    canvas.drawRect(rect, paint);\n  }\n\n  @override\n  bool get preferPaintInterior => true;\n\n  @override\n  void paint(\n    Canvas canvas,\n    Rect rect, {\n    double? gapStart,\n    double gapExtent = 0.0,\n    double gapPercentage = 0.0,\n    TextDirection? textDirection,\n  }) {}\n}\n\nclass _ImportOptionsDialog extends StatefulWidget {\n  const _ImportOptionsDialog();\n\n  @override\n  State<_ImportOptionsDialog> createState() => _ImportOptionsDialogState();\n}\n\nclass _ImportOptionsDialogState extends State<_ImportOptionsDialog> {\n  void _handleOnTab(ImportOption value) {\n    Navigator.of(context).pop(value);\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonDialog(\n      title: appLocalizations.import,\n      padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 16),\n      child: Wrap(\n        children: [\n          ListItem(\n            onTap: () {\n              _handleOnTab(ImportOption.url);\n            },\n            title: Text(appLocalizations.importUrl),\n          ),\n          ListItem(\n            onTap: () {\n              _handleOnTab(ImportOption.file);\n            },\n            title: Text(appLocalizations.importFile),\n          ),\n        ],\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/pages/error.dart",
    "content": "import 'package:fl_clash/common/color.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/services.dart';\n\nclass InitErrorScreen extends StatelessWidget {\n  final Object error;\n  final StackTrace stack;\n\n  const InitErrorScreen({super.key, required this.error, required this.stack});\n\n  @override\n  Widget build(BuildContext context) {\n    final colorScheme = Theme.of(context).colorScheme;\n\n    return Scaffold(\n      appBar: AppBar(\n        title: const Text('Init Failed'),\n        backgroundColor: colorScheme.error,\n        foregroundColor: colorScheme.onError,\n        elevation: 0,\n      ),\n      body: SafeArea(\n        child: SingleChildScrollView(\n          padding: const EdgeInsets.all(16.0),\n          child: Column(\n            crossAxisAlignment: CrossAxisAlignment.start,\n            children: [\n              Row(\n                children: [\n                  Icon(\n                    Icons.report_problem,\n                    color: colorScheme.error,\n                    size: 32,\n                  ),\n                  const SizedBox(width: 12),\n                  const Expanded(\n                    child: Text(\n                      'The application encountered a critical error during startup and cannot continue.',\n                      style: TextStyle(\n                        fontWeight: FontWeight.bold,\n                        fontSize: 16,\n                      ),\n                    ),\n                  ),\n                ],\n              ),\n              const SizedBox(height: 24),\n              _buildSectionLabel('Error Details:'),\n              Container(\n                width: double.infinity,\n                padding: const EdgeInsets.all(12),\n                decoration: BoxDecoration(\n                  color: colorScheme.errorContainer.opacity50,\n                  borderRadius: BorderRadius.circular(8),\n                  border: Border.all(color: colorScheme.error.opacity50),\n                ),\n                child: SelectableText(\n                  error.toString(),\n                  style: TextStyle(\n                    color: colorScheme.onErrorContainer,\n                    fontWeight: FontWeight.w600,\n                  ),\n                ),\n              ),\n              const SizedBox(height: 24),\n              _buildSectionLabel('Stack Trace:'),\n              Container(\n                width: double.infinity,\n                padding: const EdgeInsets.all(12),\n                decoration: BoxDecoration(\n                  color: Theme.of(context).brightness == Brightness.dark\n                      ? Colors.grey[900]\n                      : Colors.grey[200],\n                  borderRadius: BorderRadius.circular(8),\n                  border: Border.all(color: Colors.grey.opacity50),\n                ),\n                child: SelectableText(\n                  stack.toString(),\n                  style: const TextStyle(\n                    fontFamily: 'monospace', // Makes code easier to read\n                    fontSize: 12,\n                  ),\n                ),\n              ),\n              const SizedBox(height: 80),\n            ],\n          ),\n        ),\n      ),\n      floatingActionButton: FloatingActionButton.extended(\n        onPressed: () => _copyToClipboard(context),\n        label: const Text('Copy Details'),\n        icon: const Icon(Icons.copy),\n        backgroundColor: colorScheme.error,\n        foregroundColor: colorScheme.onError,\n      ),\n    );\n  }\n\n  Widget _buildSectionLabel(String text) {\n    return Padding(\n      padding: const EdgeInsets.only(bottom: 8.0),\n      child: Text(\n        text,\n        style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 15),\n      ),\n    );\n  }\n\n  void _copyToClipboard(BuildContext context) {\n    final text = '=== ERROR ===\\n$error\\n\\n=== STACK TRACE ===\\n$stack';\n    Clipboard.setData(ClipboardData(text: text));\n\n    ScaffoldMessenger.of(context).showSnackBar(\n      const SnackBar(\n        content: Text('Error details copied to clipboard'),\n        duration: Duration(seconds: 2),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/pages/home.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/manager/app_manager.dart';\nimport 'package:fl_clash/models/common.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/services.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:intl/intl.dart';\n\ntypedef OnSelected = void Function(int index);\n\nclass HomePage extends StatelessWidget {\n  const HomePage({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return HomeBackScopeContainer(\n      child: AppSidebarContainer(\n        child: Material(\n          color: context.colorScheme.surface,\n          child: Consumer(\n            builder: (context, ref, child) {\n              final state = ref.watch(navigationStateProvider);\n              final systemUiOverlayStyle = ref.read(\n                systemUiOverlayStyleStateProvider,\n              );\n              final isMobile = state.viewMode == ViewMode.mobile;\n              final navigationItems = state.navigationItems;\n              final currentIndex = state.currentIndex;\n              final bottomNavigationBar = NavigationBarTheme(\n                data: _NavigationBarDefaultsM3(context),\n                child: NavigationBar(\n                  destinations: navigationItems\n                      .map(\n                        (e) => NavigationDestination(\n                          icon: e.icon,\n                          label: Intl.message(e.label.name),\n                        ),\n                      )\n                      .toList(),\n                  onDestinationSelected: (index) {\n                    appController.toPage(navigationItems[index].label);\n                  },\n                  selectedIndex: currentIndex,\n                ),\n              );\n              if (isMobile) {\n                return AnnotatedRegion<SystemUiOverlayStyle>(\n                  value: systemUiOverlayStyle.copyWith(\n                    systemNavigationBarColor:\n                        context.colorScheme.surfaceContainer,\n                  ),\n                  child: Column(\n                    children: [\n                      Flexible(\n                        flex: 1,\n                        child: MediaQuery.removePadding(\n                          removeTop: false,\n                          removeBottom: true,\n                          removeLeft: true,\n                          removeRight: true,\n                          context: context,\n                          child: child!,\n                        ),\n                      ),\n                      MediaQuery.removePadding(\n                        removeTop: true,\n                        removeBottom: false,\n                        removeLeft: true,\n                        removeRight: true,\n                        context: context,\n                        child: bottomNavigationBar,\n                      ),\n                    ],\n                  ),\n                );\n              } else {\n                return child!;\n              }\n            },\n            child: Consumer(\n              builder: (_, ref, _) {\n                final navigationItems = ref\n                    .watch(currentNavigationItemsStateProvider)\n                    .value;\n                final isMobile = ref.watch(isMobileViewProvider);\n                return _HomePageView(\n                  navigationItems: navigationItems,\n                  pageBuilder: (_, index) {\n                    final navigationItem = navigationItems[index];\n                    final navigationView = navigationItem.builder(context);\n                    final view = KeepScope(\n                      keep: navigationItem.keep,\n                      child: isMobile\n                          ? navigationView\n                          : Navigator(\n                              pages: [MaterialPage(child: navigationView)],\n                              onDidRemovePage: (_) {},\n                            ),\n                    );\n                    return view;\n                  },\n                );\n              },\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n\nclass _HomePageView extends ConsumerStatefulWidget {\n  final IndexedWidgetBuilder pageBuilder;\n  final List<NavigationItem> navigationItems;\n\n  const _HomePageView({\n    required this.pageBuilder,\n    required this.navigationItems,\n  });\n\n  @override\n  ConsumerState createState() => _HomePageViewState();\n}\n\nclass _HomePageViewState extends ConsumerState<_HomePageView> {\n  late PageController _pageController;\n\n  @override\n  initState() {\n    super.initState();\n    _pageController = PageController(initialPage: _pageIndex);\n    ref.listenManual(currentPageLabelProvider, (prev, next) {\n      if (prev != next) {\n        _toPage(next);\n      }\n    });\n  }\n\n  @override\n  void didUpdateWidget(covariant _HomePageView oldWidget) {\n    super.didUpdateWidget(oldWidget);\n    if (oldWidget.navigationItems.length != widget.navigationItems.length) {\n      _updatePageController();\n    }\n  }\n\n  int get _pageIndex {\n    final pageLabel = ref.read(currentPageLabelProvider);\n    return widget.navigationItems.indexWhere((item) => item.label == pageLabel);\n  }\n\n  Future<void> _toPage(\n    PageLabel pageLabel, [\n    bool ignoreAnimateTo = false,\n  ]) async {\n    if (!mounted) {\n      return;\n    }\n    final index = widget.navigationItems.indexWhere(\n      (item) => item.label == pageLabel,\n    );\n    if (index == -1) {\n      return;\n    }\n    final isAnimateToPage = ref.read(appSettingProvider).isAnimateToPage;\n    final isMobile = ref.read(isMobileViewProvider);\n    if (isAnimateToPage && isMobile && !ignoreAnimateTo) {\n      await _pageController.animateToPage(\n        index,\n        duration: kTabScrollDuration,\n        curve: Curves.easeOut,\n      );\n    } else {\n      _pageController.jumpToPage(index);\n    }\n  }\n\n  void _updatePageController() {\n    final pageLabel = ref.read(currentPageLabelProvider);\n    _toPage(pageLabel, true);\n  }\n\n  @override\n  void dispose() {\n    _pageController.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final itemCount = ref.watch(\n      currentNavigationItemsStateProvider.select((state) => state.value.length),\n    );\n    return PageView.builder(\n      controller: _pageController,\n      physics: const NeverScrollableScrollPhysics(),\n      itemCount: itemCount,\n      itemBuilder: (context, index) {\n        return widget.pageBuilder(context, index);\n      },\n    );\n  }\n}\n\nclass _NavigationBarDefaultsM3 extends NavigationBarThemeData {\n  _NavigationBarDefaultsM3(this.context)\n    : super(\n        height: 80.0,\n        elevation: 3.0,\n        labelBehavior: NavigationDestinationLabelBehavior.alwaysShow,\n      );\n\n  final BuildContext context;\n  late final ColorScheme _colors = Theme.of(context).colorScheme;\n  late final TextTheme _textTheme = Theme.of(context).textTheme;\n\n  @override\n  Color? get backgroundColor => _colors.surfaceContainer;\n\n  @override\n  Color? get shadowColor => Colors.transparent;\n\n  @override\n  Color? get surfaceTintColor => Colors.transparent;\n\n  @override\n  WidgetStateProperty<IconThemeData?>? get iconTheme {\n    return WidgetStateProperty.resolveWith((Set<WidgetState> states) {\n      return IconThemeData(\n        size: 24.0,\n        color: states.contains(WidgetState.disabled)\n            ? _colors.onSurfaceVariant.opacity38\n            : states.contains(WidgetState.selected)\n            ? _colors.onSecondaryContainer\n            : _colors.onSurfaceVariant,\n      );\n    });\n  }\n\n  @override\n  Color? get indicatorColor => _colors.secondaryContainer;\n\n  @override\n  ShapeBorder? get indicatorShape => const StadiumBorder();\n\n  @override\n  WidgetStateProperty<TextStyle?>? get labelTextStyle {\n    return WidgetStateProperty.resolveWith((Set<WidgetState> states) {\n      final TextStyle style = _textTheme.labelMedium!;\n      return style.apply(\n        overflow: TextOverflow.ellipsis,\n        color: states.contains(WidgetState.disabled)\n            ? _colors.onSurfaceVariant.opacity38\n            : states.contains(WidgetState.selected)\n            ? _colors.onSurface\n            : _colors.onSurfaceVariant,\n      );\n    });\n  }\n}\n\nclass HomeBackScopeContainer extends ConsumerWidget {\n  final Widget child;\n\n  const HomeBackScopeContainer({super.key, required this.child});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    return CommonPopScope(\n      onPop: (context) async {\n        final pageLabel = ref.read(currentPageLabelProvider);\n        final realContext =\n            GlobalObjectKey(pageLabel).currentContext ?? context;\n        final canPop = Navigator.canPop(realContext);\n        if (canPop) {\n          Navigator.of(realContext).pop();\n        } else {\n          await appController.handleBackOrExit();\n        }\n        return false;\n      },\n      child: child,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/pages/pages.dart",
    "content": "export 'editor.dart';\nexport 'error.dart';\nexport 'home.dart';\nexport 'scan.dart';\n"
  },
  {
    "path": "lib/pages/scan.dart",
    "content": "import 'dart:async';\nimport 'dart:math';\n\nimport 'package:fl_clash/common/color.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/widgets/activate_box.dart';\nimport 'package:flutter/material.dart';\nimport 'package:mobile_scanner/mobile_scanner.dart';\n\nclass ScanPage extends StatefulWidget {\n  const ScanPage({super.key});\n\n  @override\n  State<ScanPage> createState() => _ScanPageState();\n}\n\nclass _ScanPageState extends State<ScanPage> with WidgetsBindingObserver {\n  MobileScannerController controller = MobileScannerController(\n    detectionSpeed: DetectionSpeed.noDuplicates,\n    formats: const [BarcodeFormat.qrCode],\n  );\n\n  StreamSubscription<Object?>? _subscription;\n\n  @override\n  void initState() {\n    super.initState();\n    WidgetsBinding.instance.addObserver(this);\n    _subscription = controller.barcodes.listen(_handleBarcode);\n    unawaited(controller.start());\n  }\n\n  void _handleBarcode(BarcodeCapture barcodeCapture) {\n    final barcode = barcodeCapture.barcodes.first;\n    if (barcode.type == BarcodeType.url) {\n      Navigator.pop<String>(context, barcode.rawValue);\n    } else {\n      Navigator.pop(context);\n    }\n  }\n\n  @override\n  void didChangeAppLifecycleState(AppLifecycleState state) {\n    super.didChangeAppLifecycleState(state);\n    switch (state) {\n      case AppLifecycleState.detached:\n      case AppLifecycleState.hidden:\n      case AppLifecycleState.paused:\n        return;\n      case AppLifecycleState.resumed:\n        _subscription = controller.barcodes.listen(_handleBarcode);\n\n        unawaited(controller.start());\n      case AppLifecycleState.inactive:\n        unawaited(_subscription?.cancel());\n        _subscription = null;\n        unawaited(controller.stop());\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    double sideLength = min(400, MediaQuery.of(context).size.width * 0.67);\n    final scanWindow = Rect.fromCenter(\n      center: MediaQuery.sizeOf(context).center(Offset.zero),\n      width: sideLength,\n      height: sideLength,\n    );\n    return Scaffold(\n      body: Stack(\n        children: [\n          Center(\n            child: MobileScanner(\n              controller: controller,\n              scanWindow: scanWindow,\n            ),\n          ),\n          CustomPaint(painter: ScannerOverlay(scanWindow: scanWindow)),\n          AppBar(\n            backgroundColor: Colors.transparent,\n            automaticallyImplyLeading: false,\n            leading: IconButton(\n              style: IconButton.styleFrom(\n                iconSize: 32,\n                foregroundColor: Colors.white,\n              ),\n              onPressed: () {\n                Navigator.of(context).pop();\n              },\n              icon: const Icon(Icons.close),\n            ),\n            actions: [\n              ValueListenableBuilder<MobileScannerState>(\n                valueListenable: controller,\n                builder: (context, state, _) {\n                  var icon = const Icon(Icons.flash_off);\n                  var backgroundColor = Colors.black12;\n                  switch (state.torchState) {\n                    case TorchState.off:\n                      icon = const Icon(Icons.flash_off);\n                      backgroundColor = Colors.black12;\n                    case TorchState.on:\n                      icon = const Icon(Icons.flash_on);\n                      backgroundColor = Colors.orange;\n                    case TorchState.unavailable:\n                      icon = const Icon(Icons.flash_off);\n                      backgroundColor = Colors.transparent;\n                    case TorchState.auto:\n                      icon = const Icon(Icons.flash_auto);\n                      backgroundColor = Colors.orange;\n                  }\n                  return Container(\n                    margin: const EdgeInsets.symmetric(horizontal: 8),\n                    child: ActivateBox(\n                      active: state.torchState != TorchState.unavailable,\n                      child: IconButton(\n                        color: Colors.white,\n                        icon: icon,\n                        style: IconButton.styleFrom(\n                          foregroundColor: Colors.white,\n                          backgroundColor: backgroundColor,\n                        ),\n                        onPressed: () => controller.toggleTorch(),\n                      ),\n                    ),\n                  );\n                },\n              ),\n            ],\n          ),\n          Container(\n            margin: const EdgeInsets.only(bottom: 32),\n            alignment: Alignment.bottomCenter,\n            child: IconButton(\n              color: Colors.white,\n              style: IconButton.styleFrom(\n                foregroundColor: Colors.white,\n                backgroundColor: Colors.grey,\n              ),\n              padding: const EdgeInsets.all(16),\n              iconSize: 32.0,\n              onPressed: appController.addProfileFormQrCode,\n              icon: const Icon(Icons.photo_camera_back),\n            ),\n          ),\n        ],\n      ),\n    );\n  }\n\n  @override\n  Future<void> dispose() async {\n    WidgetsBinding.instance.removeObserver(this);\n    unawaited(_subscription?.cancel());\n    _subscription = null;\n    await controller.dispose();\n    super.dispose();\n  }\n}\n\nclass ScannerOverlay extends CustomPainter {\n  const ScannerOverlay({required this.scanWindow, this.borderRadius = 12.0});\n\n  final Rect scanWindow;\n  final double borderRadius;\n\n  @override\n  void paint(Canvas canvas, Size size) {\n    final backgroundPath = Path()..addRect(Rect.largest);\n\n    final cutoutPath = Path()\n      ..addRSuperellipse(\n        RSuperellipse.fromRectAndCorners(\n          scanWindow,\n          topLeft: Radius.circular(borderRadius),\n          topRight: Radius.circular(borderRadius),\n          bottomLeft: Radius.circular(borderRadius),\n          bottomRight: Radius.circular(borderRadius),\n        ),\n      );\n\n    final backgroundPaint = Paint()\n      ..color = Colors.black.opacity50\n      ..style = PaintingStyle.fill\n      ..blendMode = BlendMode.dstOut;\n\n    final backgroundWithCutout = Path.combine(\n      PathOperation.difference,\n      backgroundPath,\n      cutoutPath,\n    );\n\n    final borderPaint = Paint()\n      ..color = Colors.white\n      ..style = PaintingStyle.stroke\n      ..strokeWidth = 4.0;\n\n    final border = RSuperellipse.fromRectAndCorners(\n      scanWindow,\n      topLeft: Radius.circular(borderRadius),\n      topRight: Radius.circular(borderRadius),\n      bottomLeft: Radius.circular(borderRadius),\n      bottomRight: Radius.circular(borderRadius),\n    );\n\n    canvas.drawPath(backgroundWithCutout, backgroundPaint);\n    canvas.drawRSuperellipse(border, borderPaint);\n  }\n\n  @override\n  bool shouldRepaint(ScannerOverlay oldDelegate) {\n    return scanWindow != oldDelegate.scanWindow ||\n        borderRadius != oldDelegate.borderRadius;\n  }\n}\n"
  },
  {
    "path": "lib/plugins/app.dart",
    "content": "import 'dart:async';\nimport 'dart:io';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/services.dart';\n\nclass App {\n  static App? _instance;\n  late MethodChannel methodChannel;\n  Function()? onExit;\n\n  App._internal() {\n    methodChannel = const MethodChannel('$packageName/app');\n    methodChannel.setMethodCallHandler((call) async {\n      switch (call.method) {\n        case 'exit':\n          if (onExit != null) {\n            await onExit!();\n          }\n        default:\n          throw MissingPluginException();\n      }\n    });\n  }\n\n  factory App() {\n    _instance ??= App._internal();\n    return _instance!;\n  }\n\n  Future<bool?> moveTaskToBack() async {\n    return await methodChannel.invokeMethod<bool>('moveTaskToBack');\n  }\n\n  Future<List<Package>> getPackages() async {\n    final packagesString = await methodChannel.invokeMethod<String>(\n      'getPackages',\n    );\n    List<dynamic> packagesRaw =\n        (await packagesString?.commonToJSON<List<dynamic>>()) ?? [];\n    return packagesRaw.map((e) => Package.fromJson(e)).toSet().toList();\n  }\n\n  Future<List<String>> getChinaPackageNames() async {\n    final packageNamesString = await methodChannel.invokeMethod<String>(\n      'getChinaPackageNames',\n    );\n    List<dynamic> packageNamesRaw =\n        await packageNamesString?.commonToJSON<List<dynamic>>() ?? [];\n    return packageNamesRaw.map((e) => e.toString()).toList();\n  }\n\n  Future<bool?> requestNotificationsPermission() async {\n    return await methodChannel.invokeMethod<bool>(\n      'requestNotificationsPermission',\n    );\n  }\n\n  Future<bool> openFile(String path) async {\n    return await methodChannel.invokeMethod<bool>('openFile', {'path': path}) ??\n        false;\n  }\n\n  Future<ImageProvider?> getPackageIcon(String packageName) async {\n    final path = await methodChannel.invokeMethod<String>('getPackageIcon', {\n      'packageName': packageName,\n    });\n    if (path == null) {\n      return null;\n    }\n    return FileImage(File(path));\n  }\n\n  Future<bool?> tip(String? message) async {\n    return await methodChannel.invokeMethod<bool>('tip', {\n      'message': '$message',\n    });\n  }\n\n  Future<bool?> initShortcuts() async {\n    return await methodChannel.invokeMethod<bool>(\n      'initShortcuts',\n      appLocalizations.toggle,\n    );\n  }\n\n  Future<bool?> updateExcludeFromRecents(bool value) async {\n    return await methodChannel.invokeMethod<bool>('updateExcludeFromRecents', {\n      'value': value,\n    });\n  }\n}\n\nfinal app = system.isAndroid ? App() : null;\n"
  },
  {
    "path": "lib/plugins/service.dart",
    "content": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:isolate';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/services.dart';\n\nabstract mixin class ServiceListener {\n  void onServiceEvent(CoreEvent event) {}\n\n  void onServiceCrash(String message) {}\n}\n\nclass Service {\n  static Service? _instance;\n  late MethodChannel methodChannel;\n  ReceivePort? receiver;\n\n  final ObserverList<ServiceListener> _listeners =\n      ObserverList<ServiceListener>();\n\n  factory Service() {\n    _instance ??= Service._internal();\n    return _instance!;\n  }\n\n  Service._internal() {\n    methodChannel = const MethodChannel('$packageName/service');\n    methodChannel.setMethodCallHandler((call) async {\n      switch (call.method) {\n        case 'event':\n          final data = call.arguments as String? ?? '';\n          final result = ActionResult.fromJson(json.decode(data));\n          for (final listener in _listeners) {\n            listener.onServiceEvent(CoreEvent.fromJson(result.data));\n          }\n          break;\n        case 'crash':\n          final message = call.arguments as String? ?? '';\n          for (final listener in _listeners) {\n            listener.onServiceCrash(message);\n          }\n          break;\n        default:\n          throw MissingPluginException();\n      }\n    });\n  }\n\n  Future<ActionResult?> invokeAction(Action action) async {\n    final data = await methodChannel.invokeMethod<String>(\n      'invokeAction',\n      json.encode(action),\n    );\n    if (data == null) {\n      return null;\n    }\n    final dataJson = await data.commonToJSON<dynamic>();\n    return ActionResult.fromJson(dataJson);\n  }\n\n  Future<bool> start() async {\n    return await methodChannel.invokeMethod<bool>('start') ?? false;\n  }\n\n  Future<bool> stop() async {\n    return await methodChannel.invokeMethod<bool>('stop') ?? false;\n  }\n\n  Future<String> init() async {\n    return await methodChannel.invokeMethod<String>('init') ?? '';\n  }\n\n  Future<String> syncState(SharedState state) async {\n    return await methodChannel.invokeMethod<String>(\n          'syncState',\n          json.encode(state),\n        ) ??\n        '';\n  }\n\n  Future<bool> shutdown() async {\n    return await methodChannel.invokeMethod<bool>('shutdown') ?? true;\n  }\n\n  Future<DateTime?> getRunTime() async {\n    final ms = await methodChannel.invokeMethod<int>('getRunTime') ?? 0;\n    if (ms == 0) {\n      return null;\n    }\n    return DateTime.fromMillisecondsSinceEpoch(ms);\n  }\n\n  bool get hasListeners {\n    return _listeners.isNotEmpty;\n  }\n\n  void addListener(ServiceListener listener) {\n    _listeners.add(listener);\n  }\n\n  void removeListener(ServiceListener listener) {\n    _listeners.remove(listener);\n  }\n}\n\nService? get service => system.isAndroid ? Service() : null;\n"
  },
  {
    "path": "lib/plugins/tile.dart",
    "content": "import 'dart:async';\n\nimport 'package:fl_clash/common/constant.dart';\nimport 'package:fl_clash/common/system.dart';\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/services.dart';\n\nabstract mixin class TileListener {\n  void onStart() {}\n\n  void onStop() {}\n\n  void onDetached() {}\n}\n\nclass Tile {\n  final MethodChannel _channel = const MethodChannel('$packageName/tile');\n\n  Tile._() {\n    _channel.setMethodCallHandler(_methodCallHandler);\n  }\n\n  static final Tile instance = Tile._();\n\n  final ObserverList<TileListener> _listeners = ObserverList<TileListener>();\n\n  Future<void> _methodCallHandler(MethodCall call) async {\n    for (final TileListener listener in _listeners) {\n      switch (call.method) {\n        case 'start':\n          listener.onStart();\n          break;\n        case 'stop':\n          listener.onStop();\n          break;\n        case 'detached':\n          listener.onDetached();\n          break;\n      }\n    }\n  }\n\n  bool get hasListeners {\n    return _listeners.isNotEmpty;\n  }\n\n  void addListener(TileListener listener) {\n    _listeners.add(listener);\n  }\n\n  void removeListener(TileListener listener) {\n    _listeners.remove(listener);\n  }\n}\n\nfinal tile = system.isAndroid ? Tile.instance : null;\n"
  },
  {
    "path": "lib/providers/app.dart",
    "content": "import 'dart:async';\n\nimport 'package:dio/dio.dart';\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:flutter/services.dart';\nimport 'package:riverpod_annotation/riverpod_annotation.dart';\n\npart 'generated/app.g.dart';\n\n@riverpod\nclass RealTunEnable extends _$RealTunEnable with AutoDisposeNotifierMixin {\n  @override\n  bool build() {\n    return false;\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass Logs extends _$Logs with AutoDisposeNotifierMixin {\n  @override\n  FixedList<Log> build() {\n    return FixedList(0);\n  }\n\n  void addLog(Log value) {\n    this.value = state.copyWith()..add(value);\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass Requests extends _$Requests with AutoDisposeNotifierMixin {\n  @override\n  FixedList<TrackerInfo> build() {\n    return FixedList(0);\n  }\n\n  void addRequest(TrackerInfo value) {\n    this.value = state.copyWith()..add(value);\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass Providers extends _$Providers with AutoDisposeNotifierMixin {\n  @override\n  List<ExternalProvider> build() {\n    return [];\n  }\n\n  void setProvider(ExternalProvider? provider) {\n    if (provider == null) return;\n    final index = value.indexWhere((item) => item.name == provider.name);\n    if (index == -1) return;\n    final newState = List<ExternalProvider>.from(value)..[index] = provider;\n    value = newState;\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass Packages extends _$Packages with AutoDisposeNotifierMixin {\n  @override\n  List<Package> build() {\n    return [];\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass SystemBrightness extends _$SystemBrightness\n    with AutoDisposeNotifierMixin {\n  @override\n  Brightness build() {\n    return Brightness.dark;\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass Traffics extends _$Traffics with AutoDisposeNotifierMixin {\n  @override\n  FixedList<Traffic> build() {\n    return FixedList(0);\n  }\n\n  void addTraffic(Traffic value) {\n    this.value = state.copyWith()..add(value);\n  }\n\n  void clear() {\n    value = state.copyWith()..clear();\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass TotalTraffic extends _$TotalTraffic with AutoDisposeNotifierMixin {\n  @override\n  Traffic build() {\n    return Traffic();\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass LocalIp extends _$LocalIp with AutoDisposeNotifierMixin {\n  @override\n  String? build() {\n    return null;\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass RunTime extends _$RunTime with AutoDisposeNotifierMixin {\n  @override\n  int? build() {\n    return null;\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass ViewSize extends _$ViewSize with AutoDisposeNotifierMixin {\n  @override\n  Size build() {\n    return Size.zero;\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass SideWidth extends _$SideWidth with AutoDisposeNotifierMixin {\n  @override\n  double build() {\n    return 0;\n  }\n}\n\n@Riverpod(keepAlive: true)\ndouble viewWidth(Ref ref) {\n  return ref.watch(viewSizeProvider).width;\n}\n\n@Riverpod(keepAlive: true)\nViewMode viewMode(Ref ref) {\n  return utils.getViewMode(ref.watch(viewWidthProvider));\n}\n\n@Riverpod(keepAlive: true)\nbool isMobileView(Ref ref) {\n  return ref.watch(viewModeProvider) == ViewMode.mobile;\n}\n\n@Riverpod(keepAlive: true)\ndouble viewHeight(Ref ref) {\n  return ref.watch(viewSizeProvider).height;\n}\n\n@Riverpod(keepAlive: true)\nclass Init extends _$Init with AutoDisposeNotifierMixin {\n  @override\n  bool build() {\n    return false;\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass CurrentPageLabel extends _$CurrentPageLabel\n    with AutoDisposeNotifierMixin {\n  @override\n  PageLabel build() {\n    return PageLabel.dashboard;\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass SortNum extends _$SortNum with AutoDisposeNotifierMixin {\n  @override\n  int build() {\n    return 0;\n  }\n\n  int add() => state++;\n}\n\n@Riverpod(keepAlive: true)\nclass CheckIpNum extends _$CheckIpNum with AutoDisposeNotifierMixin {\n  @override\n  int build() {\n    return 0;\n  }\n\n  int add() => state++;\n}\n\n@Riverpod(keepAlive: true)\nclass BackBlock extends _$BackBlock with AutoDisposeNotifierMixin {\n  @override\n  bool build() {\n    return false;\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass Version extends _$Version with AutoDisposeNotifierMixin {\n  @override\n  int build() {\n    return 0;\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass Groups extends _$Groups with AutoDisposeNotifierMixin {\n  @override\n  List<Group> build() {\n    return [];\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass DelayDataSource extends _$DelayDataSource with AutoDisposeNotifierMixin {\n  @override\n  DelayMap build() {\n    return {};\n  }\n\n  void setDelay(Delay delay) {\n    if (state[delay.url]?[delay.name] != delay.value) {\n      final DelayMap newDelayMap = Map.from(state);\n      if (newDelayMap[delay.url] == null) {\n        newDelayMap[delay.url] = {};\n      }\n      newDelayMap[delay.url]![delay.name] = delay.value;\n      value = newDelayMap;\n    }\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass SystemUiOverlayStyleState extends _$SystemUiOverlayStyleState\n    with AutoDisposeNotifierMixin {\n  @override\n  SystemUiOverlayStyle build() {\n    return SystemUiOverlayStyle();\n  }\n}\n\n@Riverpod(name: 'coreStatusProvider', keepAlive: true)\nclass _CoreStatus extends _$CoreStatus with AutoDisposeNotifierMixin {\n  @override\n  CoreStatus build() {\n    return CoreStatus.disconnected;\n  }\n}\n\n@riverpod\nclass Query extends _$Query with AutoDisposeNotifierMixin {\n  @override\n  String build(QueryTag tag) {\n    return '';\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass Loading extends _$Loading with AutoDisposeNotifierMixin {\n  DateTime? _start;\n  Timer? _timer;\n\n  @override\n  bool build(LoadingTag tag) {\n    return false;\n  }\n\n  void start() {\n    _timer?.cancel();\n    _timer = null;\n    _start = DateTime.now();\n    value = true;\n  }\n\n  Future<void> stop() async {\n    if (_start == null) {\n      value = false;\n      return;\n    }\n    final startedAt = _start!;\n    final elapsed = DateTime.now().difference(_start!).inMilliseconds;\n    const minDuration = 1000;\n    if (elapsed >= minDuration) {\n      value = false;\n      return;\n    }\n    _timer = Timer(Duration(milliseconds: minDuration - elapsed), () {\n      if (_start != startedAt) {\n        return;\n      }\n      value = false;\n    });\n  }\n}\n\n@riverpod\nclass SelectedItems extends _$SelectedItems with AutoDisposeNotifierMixin {\n  @override\n  Set<dynamic> build(String key) {\n    return {};\n  }\n}\n\n@riverpod\nclass SelectedItem extends _$SelectedItem with AutoDisposeNotifierMixin {\n  @override\n  dynamic build(String key) {\n    return null;\n  }\n}\n\n@riverpod\nclass IsUpdating extends _$IsUpdating with AutoDisposeNotifierMixin {\n  @override\n  bool build(String name) {\n    return false;\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass NetworkDetection extends _$NetworkDetection\n    with AutoDisposeNotifierMixin {\n  bool? _preIsStart;\n  CancelToken? _cancelToken;\n  int _startMillisecondsEpoch = 0;\n\n  @override\n  NetworkDetectionState build() {\n    return NetworkDetectionState(isLoading: true, ipInfo: null);\n  }\n\n  void startCheck() {\n    debouncer.call(FunctionTag.checkIp, () {\n      _checkIp();\n    }, duration: commonDuration);\n  }\n\n  Future<void> _checkIp() async {\n    final isInit = ref.read(initProvider);\n    if (!isInit) {\n      return;\n    }\n    final isStart = ref.read(isStartProvider);\n    if (!isStart && _preIsStart == false && state.ipInfo != null) {\n      return;\n    }\n    final millisecondsEpoch = DateTime.now().millisecondsSinceEpoch;\n    _startMillisecondsEpoch = millisecondsEpoch;\n    final runTime = millisecondsEpoch + 1;\n    _cancelToken?.cancel();\n    _cancelToken = CancelToken();\n    commonPrint.log('checkIp start');\n    state = state.copyWith(isLoading: true, ipInfo: null);\n    _preIsStart = isStart;\n    final res = await request.checkIp(cancelToken: _cancelToken);\n    commonPrint.log('checkIp res: $res');\n    if (res.isError && runTime > _startMillisecondsEpoch) {\n      state = state.copyWith(isLoading: true, ipInfo: null);\n      return;\n    }\n    final ipInfo = res.data;\n    if (ipInfo == null) {\n      return;\n    }\n    state = state.copyWith(isLoading: false, ipInfo: ipInfo);\n  }\n}\n\nList<Override> buildAppStateOverrides(AppState appState) {\n  return [\n    initProvider.overrideWithBuild((_, _) => appState.isInit),\n    backBlockProvider.overrideWithBuild((_, _) => appState.backBlock),\n    currentPageLabelProvider.overrideWithBuild((_, _) => appState.pageLabel),\n    packagesProvider.overrideWithBuild((_, _) => appState.packages),\n    sortNumProvider.overrideWithBuild((_, _) => appState.sortNum),\n    viewSizeProvider.overrideWithBuild((_, _) => appState.viewSize),\n    sideWidthProvider.overrideWithBuild((_, _) => appState.sideWidth),\n    delayDataSourceProvider.overrideWithBuild((_, _) => appState.delayMap),\n    groupsProvider.overrideWithBuild((_, _) => appState.groups),\n    checkIpNumProvider.overrideWithBuild((_, _) => appState.checkIpNum),\n    systemBrightnessProvider.overrideWithBuild((_, _) => appState.brightness),\n    runTimeProvider.overrideWithBuild((_, _) => appState.runTime),\n    providersProvider.overrideWithBuild((_, _) => appState.providers),\n    localIpProvider.overrideWithBuild((_, _) => appState.localIp),\n    requestsProvider.overrideWithBuild((_, _) => appState.requests),\n    versionProvider.overrideWithBuild((_, _) => appState.version),\n    logsProvider.overrideWithBuild((_, _) => appState.logs),\n    trafficsProvider.overrideWithBuild((_, _) => appState.traffics),\n    totalTrafficProvider.overrideWithBuild((_, _) => appState.totalTraffic),\n    realTunEnableProvider.overrideWithBuild((_, _) => appState.realTunEnable),\n    systemUiOverlayStyleStateProvider.overrideWithBuild(\n      (_, _) => appState.systemUiOverlayStyle,\n    ),\n    coreStatusProvider.overrideWithBuild((_, _) => appState.coreStatus),\n  ];\n}\n"
  },
  {
    "path": "lib/providers/config.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:riverpod_annotation/riverpod_annotation.dart';\n\npart 'generated/config.g.dart';\n\n@riverpod\nclass AppSetting extends _$AppSetting with AutoDisposeNotifierMixin {\n  @override\n  AppSettingProps build() {\n    return AppSettingProps();\n  }\n}\n\n@Riverpod(keepAlive: true)\nclass WindowSetting extends _$WindowSetting with AutoDisposeNotifierMixin {\n  @override\n  WindowProps build() {\n    return WindowProps();\n  }\n\n  void hello() {}\n}\n\n@riverpod\nclass VpnSetting extends _$VpnSetting with AutoDisposeNotifierMixin {\n  @override\n  VpnProps build() {\n    return VpnProps();\n  }\n}\n\n@riverpod\nclass NetworkSetting extends _$NetworkSetting with AutoDisposeNotifierMixin {\n  @override\n  NetworkProps build() {\n    return NetworkProps();\n  }\n}\n\n@riverpod\nclass ThemeSetting extends _$ThemeSetting with AutoDisposeNotifierMixin {\n  @override\n  ThemeProps build() {\n    return ThemeProps();\n  }\n}\n\n@riverpod\nclass CurrentProfileId extends _$CurrentProfileId\n    with AutoDisposeNotifierMixin {\n  @override\n  int? build() {\n    return null;\n  }\n}\n\n@riverpod\nclass DavSetting extends _$DavSetting with AutoDisposeNotifierMixin {\n  @override\n  DAVProps? build() {\n    return null;\n  }\n}\n\n@riverpod\nclass OverrideDns extends _$OverrideDns with AutoDisposeNotifierMixin {\n  @override\n  bool build() {\n    return false;\n  }\n}\n\n@riverpod\nclass HotKeyActions extends _$HotKeyActions with AutoDisposeNotifierMixin {\n  @override\n  List<HotKeyAction> build() {\n    return [];\n  }\n}\n\n@riverpod\nclass ProxiesStyleSetting extends _$ProxiesStyleSetting\n    with AutoDisposeNotifierMixin {\n  @override\n  ProxiesStyleProps build() {\n    return ProxiesStyleProps();\n  }\n}\n\n@riverpod\nclass PatchClashConfig extends _$PatchClashConfig\n    with AutoDisposeNotifierMixin {\n  @override\n  ClashConfig build() {\n    return ClashConfig();\n  }\n}\n\n@Riverpod(name: 'configProvider')\nConfig _config(Ref ref) {\n  final appSettingProps = ref.watch(appSettingProvider);\n  final windowProps = ref.watch(windowSettingProvider);\n  final vpnProps = ref.watch(vpnSettingProvider);\n  final networkProps = ref.watch(networkSettingProvider);\n  final themeProps = ref.watch(themeSettingProvider);\n  final currentProfileId = ref.watch(currentProfileIdProvider);\n  final davProps = ref.watch(davSettingProvider);\n  final overrideDns = ref.watch(overrideDnsProvider);\n  final hotKeyActions = ref.watch(hotKeyActionsProvider);\n  final proxiesStyleProps = ref.watch(proxiesStyleSettingProvider);\n  final patchClashConfig = ref.watch(patchClashConfigProvider);\n  return Config(\n    appSettingProps: appSettingProps,\n    windowProps: windowProps,\n    vpnProps: vpnProps,\n    networkProps: networkProps,\n    themeProps: themeProps,\n    currentProfileId: currentProfileId,\n    davProps: davProps,\n    overrideDns: overrideDns,\n    hotKeyActions: hotKeyActions,\n    proxiesStyleProps: proxiesStyleProps,\n    patchClashConfig: patchClashConfig,\n  );\n}\n\nList<Override> buildConfigOverrides(Config config) {\n  return [\n    appSettingProvider.overrideWithBuild((_, _) => config.appSettingProps),\n    windowSettingProvider.overrideWithBuild((_, _) => config.windowProps),\n    vpnSettingProvider.overrideWithBuild((_, _) => config.vpnProps),\n    networkSettingProvider.overrideWithBuild((_, _) => config.networkProps),\n    themeSettingProvider.overrideWithBuild((_, _) => config.themeProps),\n    currentProfileIdProvider.overrideWithBuild(\n      (_, _) => config.currentProfileId,\n    ),\n    davSettingProvider.overrideWithBuild((_, _) => config.davProps),\n    overrideDnsProvider.overrideWithBuild((_, _) => config.overrideDns),\n    hotKeyActionsProvider.overrideWithBuild((_, _) => config.hotKeyActions),\n    proxiesStyleSettingProvider.overrideWithBuild(\n      (_, _) => config.proxiesStyleProps,\n    ),\n    patchClashConfigProvider.overrideWithBuild(\n      (_, _) => config.patchClashConfig,\n    ),\n  ];\n}\n"
  },
  {
    "path": "lib/providers/database.dart",
    "content": "import 'package:collection/collection.dart';\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/database/database.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:riverpod_annotation/riverpod_annotation.dart';\n\npart 'generated/database.g.dart';\n\n@riverpod\nStream<List<Profile>> profilesStream(Ref ref) {\n  return database.profilesDao.all().watch();\n}\n\n@riverpod\nStream<List<Rule>> addedRuleStream(Ref ref, int profileId) {\n  return database.rulesDao.allAddedRules(profileId).watch();\n}\n\n@Riverpod(keepAlive: true)\nclass Profiles extends _$Profiles {\n  @override\n  List<Profile> build() {\n    return ref.watch(profilesStreamProvider).value ?? [];\n  }\n\n  void put(Profile profile) {\n    final vm2 = state.copyAndAddProfile(profile);\n    final nextProfiles = vm2.a;\n    final newProfile = vm2.b;\n    state = nextProfiles;\n    database.profiles.put(newProfile.toCompanion());\n  }\n\n  void del(int id) {\n    final newProfiles = state.where((element) => element.id != id).toList();\n    state = newProfiles;\n    database.profiles.remove((t) => t.id.equals(id));\n  }\n\n  void updateProfile(int profileId, Profile Function(Profile profile) builder) {\n    final index = state.indexWhere((element) => element.id == profileId);\n    if (index == -1) {\n      return;\n    }\n    final List<Profile> profilesTemp = List.from(state);\n    final newProfile = builder(profilesTemp[index]);\n    profilesTemp[index] = newProfile;\n    state = profilesTemp;\n    database.profiles.put(newProfile.toCompanion());\n  }\n\n  void setAndReorder(List<Profile> profiles) {\n    final newProfiles = List<Profile>.from(profiles);\n    state = newProfiles;\n    database.profilesDao.setAll(profiles);\n  }\n\n  void reorder(List<Profile> profiles) {\n    final newProfiles = List<Profile>.from(profiles);\n    state = newProfiles;\n    final List<ProfilesCompanion> needUpdateProfiles = [];\n    newProfiles.forEachIndexed((index, item) {\n      if (item.order != index) {\n        needUpdateProfiles.add(item.toCompanion(index));\n      }\n    });\n    database.profilesDao.putAll(needUpdateProfiles);\n  }\n\n  @override\n  bool updateShouldNotify(List<Profile> previous, List<Profile> next) {\n    return !profileListEquality.equals(previous, next);\n  }\n}\n\n@riverpod\nclass Scripts extends _$Scripts with AsyncNotifierMixin {\n  @override\n  Stream<List<Script>> build() {\n    return database.scriptsDao.all().watch();\n  }\n\n  @override\n  List<Script> get value => state.value ?? [];\n\n  void put(Script script) {\n    final list = List<Script>.from(value);\n    final index = value.indexWhere((item) => item.id == script.id);\n    if (index != -1) {\n      list[index] = script;\n    } else {\n      list.add(script);\n    }\n    value = list;\n    database.scripts.put(script.toCompanion());\n  }\n\n  void del(int id) {\n    final index = value.indexWhere((item) => item.id == id);\n    if (index == -1) {\n      return;\n    }\n    final list = List<Script>.from(value);\n    list.removeAt(index);\n    value = list;\n    database.scripts.remove((t) => t.id.equals(id));\n  }\n\n  bool isExits(String label) {\n    return value.indexWhere((item) => item.label == label) != -1;\n  }\n\n  @override\n  bool updateShouldNotify(\n    AsyncValue<List<Script>> previous,\n    AsyncValue<List<Script>> next,\n  ) {\n    return !scriptListEquality.equals(previous.value, next.value);\n  }\n}\n\n@riverpod\nclass GlobalRules extends _$GlobalRules with AsyncNotifierMixin {\n  @override\n  Stream<List<Rule>> build() {\n    return database.rulesDao.allGlobalAddedRules().watch();\n  }\n\n  @override\n  List<Rule> get value => state.value ?? [];\n\n  @override\n  bool updateShouldNotify(\n    AsyncValue<List<Rule>> previous,\n    AsyncValue<List<Rule>> next,\n  ) {\n    return !ruleListEquality.equals(previous.value, next.value);\n  }\n\n  void delAll(Iterable<int> ruleIds) {\n    value = List<Rule>.from(value.where((item) => !ruleIds.contains(item.id)));\n    database.rulesDao.delRules(ruleIds);\n  }\n\n  void put(Rule rule) {\n    value = value.copyAndPut(rule);\n    database.rulesDao.putGlobalRule(rule);\n  }\n\n  void order(int oldIndex, int newIndex) {\n    int insertIndex = newIndex;\n    if (oldIndex < newIndex) {\n      insertIndex -= 1;\n    }\n    final nextItems = List<Rule>.from(value);\n    final item = nextItems.removeAt(oldIndex);\n    nextItems.insert(insertIndex, item);\n    value = nextItems;\n    final preOrder = nextItems.safeGet(insertIndex - 1)?.order;\n    final nextOrder = nextItems.safeGet(insertIndex + 1)?.order;\n    final newOrder = indexing.generateKeyBetween(nextOrder, preOrder)!;\n    database.rulesDao.orderGlobalRule(ruleId: item.id, order: newOrder);\n  }\n}\n\n@riverpod\nclass ProfileAddedRules extends _$ProfileAddedRules with AsyncNotifierMixin {\n  @override\n  Stream<List<Rule>> build(int profileId) {\n    return database.rulesDao.allProfileAddedRules(profileId).watch();\n  }\n\n  @override\n  List<Rule> get value => state.value ?? [];\n\n  @override\n  bool updateShouldNotify(\n    AsyncValue<List<Rule>> previous,\n    AsyncValue<List<Rule>> next,\n  ) {\n    return !ruleListEquality.equals(previous.value, next.value);\n  }\n\n  void put(Rule rule) {\n    value = value.copyAndPut(rule);\n    database.rulesDao.putProfileAddedRule(profileId, rule);\n  }\n\n  void delAll(Iterable<int> ruleIds) {\n    value = List<Rule>.from(value.where((item) => !ruleIds.contains(item.id)));\n    database.rulesDao.delRules(ruleIds);\n  }\n\n  void order(int oldIndex, int newIndex) {\n    int insertIndex = newIndex;\n    if (oldIndex < newIndex) {\n      insertIndex -= 1;\n    }\n    final nextItems = List<Rule>.from(value);\n    final item = nextItems.removeAt(oldIndex);\n    nextItems.insert(insertIndex, item);\n    value = nextItems;\n    final preOrder = nextItems.safeGet(insertIndex - 1)?.order;\n    final nextOrder = nextItems.safeGet(insertIndex + 1)?.order;\n    final newOrder = indexing.generateKeyBetween(nextOrder, preOrder)!;\n    database.rulesDao.orderProfileAddedRule(\n      profileId,\n      ruleId: item.id,\n      order: newOrder,\n    );\n  }\n}\n\n@riverpod\nclass ProfileDisabledRuleIds extends _$ProfileDisabledRuleIds\n    with AsyncNotifierMixin {\n  @override\n  List<int> get value => state.value ?? [];\n\n  @override\n  Stream<List<int>> build(int profileId) {\n    return database.rulesDao\n        .allProfileDisabledRules(profileId)\n        .map((item) => item.id)\n        .watch();\n  }\n\n  void _put(int ruleId) {\n    var newList = List<int>.from(value);\n    final index = newList.indexWhere((item) => item == ruleId);\n    if (index != -1) {\n      newList[index] = ruleId;\n    } else {\n      newList.insert(0, ruleId);\n    }\n    value = newList;\n  }\n\n  void del(int ruleId) {\n    List<int> newList = List.from(value);\n    newList = newList.where((item) => item != ruleId).toList();\n    value = newList;\n    database.rulesDao.delDisabledLink(profileId, ruleId);\n  }\n\n  void put(int ruleId) {\n    _put(ruleId);\n    database.rulesDao.putDisabledLink(profileId, ruleId);\n  }\n}\n"
  },
  {
    "path": "lib/providers/generated/app.g.dart",
    "content": "// GENERATED CODE - DO NOT MODIFY BY HAND\n\npart of '../app.dart';\n\n// **************************************************************************\n// RiverpodGenerator\n// **************************************************************************\n\n// GENERATED CODE - DO NOT MODIFY BY HAND\n// ignore_for_file: type=lint, type=warning\n\n@ProviderFor(RealTunEnable)\nconst realTunEnableProvider = RealTunEnableProvider._();\n\nfinal class RealTunEnableProvider\n    extends $NotifierProvider<RealTunEnable, bool> {\n  const RealTunEnableProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'realTunEnableProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$realTunEnableHash();\n\n  @$internal\n  @override\n  RealTunEnable create() => RealTunEnable();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(bool value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<bool>(value),\n    );\n  }\n}\n\nString _$realTunEnableHash() => r'f2c88f5031d1f97665c10f70121082c4f6d6c99d';\n\nabstract class _$RealTunEnable extends $Notifier<bool> {\n  bool build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<bool, bool>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<bool, bool>,\n              bool,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(Logs)\nconst logsProvider = LogsProvider._();\n\nfinal class LogsProvider extends $NotifierProvider<Logs, FixedList<Log>> {\n  const LogsProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'logsProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$logsHash();\n\n  @$internal\n  @override\n  Logs create() => Logs();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(FixedList<Log> value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<FixedList<Log>>(value),\n    );\n  }\n}\n\nString _$logsHash() => r'f327fa8d05527172a647adf07771c797fb436bfd';\n\nabstract class _$Logs extends $Notifier<FixedList<Log>> {\n  FixedList<Log> build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<FixedList<Log>, FixedList<Log>>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<FixedList<Log>, FixedList<Log>>,\n              FixedList<Log>,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(Requests)\nconst requestsProvider = RequestsProvider._();\n\nfinal class RequestsProvider\n    extends $NotifierProvider<Requests, FixedList<TrackerInfo>> {\n  const RequestsProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'requestsProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$requestsHash();\n\n  @$internal\n  @override\n  Requests create() => Requests();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(FixedList<TrackerInfo> value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<FixedList<TrackerInfo>>(value),\n    );\n  }\n}\n\nString _$requestsHash() => r'32e4f0141a66b27732f8156a55a6fb23d74cfc07';\n\nabstract class _$Requests extends $Notifier<FixedList<TrackerInfo>> {\n  FixedList<TrackerInfo> build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref =\n        this.ref as $Ref<FixedList<TrackerInfo>, FixedList<TrackerInfo>>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<FixedList<TrackerInfo>, FixedList<TrackerInfo>>,\n              FixedList<TrackerInfo>,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(Providers)\nconst providersProvider = ProvidersProvider._();\n\nfinal class ProvidersProvider\n    extends $NotifierProvider<Providers, List<ExternalProvider>> {\n  const ProvidersProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'providersProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$providersHash();\n\n  @$internal\n  @override\n  Providers create() => Providers();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(List<ExternalProvider> value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<List<ExternalProvider>>(value),\n    );\n  }\n}\n\nString _$providersHash() => r'8752fd5059f1ff767a7dabd0a4ab92effe2f2651';\n\nabstract class _$Providers extends $Notifier<List<ExternalProvider>> {\n  List<ExternalProvider> build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref =\n        this.ref as $Ref<List<ExternalProvider>, List<ExternalProvider>>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<List<ExternalProvider>, List<ExternalProvider>>,\n              List<ExternalProvider>,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(Packages)\nconst packagesProvider = PackagesProvider._();\n\nfinal class PackagesProvider\n    extends $NotifierProvider<Packages, List<Package>> {\n  const PackagesProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'packagesProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$packagesHash();\n\n  @$internal\n  @override\n  Packages create() => Packages();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(List<Package> value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<List<Package>>(value),\n    );\n  }\n}\n\nString _$packagesHash() => r'93c92438ed777ec4c3017b90c22f4ddd1c02e931';\n\nabstract class _$Packages extends $Notifier<List<Package>> {\n  List<Package> build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<List<Package>, List<Package>>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<List<Package>, List<Package>>,\n              List<Package>,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(SystemBrightness)\nconst systemBrightnessProvider = SystemBrightnessProvider._();\n\nfinal class SystemBrightnessProvider\n    extends $NotifierProvider<SystemBrightness, Brightness> {\n  const SystemBrightnessProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'systemBrightnessProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$systemBrightnessHash();\n\n  @$internal\n  @override\n  SystemBrightness create() => SystemBrightness();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(Brightness value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<Brightness>(value),\n    );\n  }\n}\n\nString _$systemBrightnessHash() => r'5b8c93dc20f048b12cdad42b301afe8b9aa864cf';\n\nabstract class _$SystemBrightness extends $Notifier<Brightness> {\n  Brightness build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<Brightness, Brightness>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<Brightness, Brightness>,\n              Brightness,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(Traffics)\nconst trafficsProvider = TrafficsProvider._();\n\nfinal class TrafficsProvider\n    extends $NotifierProvider<Traffics, FixedList<Traffic>> {\n  const TrafficsProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'trafficsProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$trafficsHash();\n\n  @$internal\n  @override\n  Traffics create() => Traffics();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(FixedList<Traffic> value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<FixedList<Traffic>>(value),\n    );\n  }\n}\n\nString _$trafficsHash() => r'00b83d393175b51abcef277417fb3d9b70cc247f';\n\nabstract class _$Traffics extends $Notifier<FixedList<Traffic>> {\n  FixedList<Traffic> build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<FixedList<Traffic>, FixedList<Traffic>>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<FixedList<Traffic>, FixedList<Traffic>>,\n              FixedList<Traffic>,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(TotalTraffic)\nconst totalTrafficProvider = TotalTrafficProvider._();\n\nfinal class TotalTrafficProvider\n    extends $NotifierProvider<TotalTraffic, Traffic> {\n  const TotalTrafficProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'totalTrafficProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$totalTrafficHash();\n\n  @$internal\n  @override\n  TotalTraffic create() => TotalTraffic();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(Traffic value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<Traffic>(value),\n    );\n  }\n}\n\nString _$totalTrafficHash() => r'00c5b34834882c4db0eacf948121ddbe9921728a';\n\nabstract class _$TotalTraffic extends $Notifier<Traffic> {\n  Traffic build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<Traffic, Traffic>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<Traffic, Traffic>,\n              Traffic,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(LocalIp)\nconst localIpProvider = LocalIpProvider._();\n\nfinal class LocalIpProvider extends $NotifierProvider<LocalIp, String?> {\n  const LocalIpProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'localIpProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$localIpHash();\n\n  @$internal\n  @override\n  LocalIp create() => LocalIp();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(String? value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<String?>(value),\n    );\n  }\n}\n\nString _$localIpHash() => r'7daf4c498425db64db4e33b10c870d8fa10695d8';\n\nabstract class _$LocalIp extends $Notifier<String?> {\n  String? build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<String?, String?>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<String?, String?>,\n              String?,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(RunTime)\nconst runTimeProvider = RunTimeProvider._();\n\nfinal class RunTimeProvider extends $NotifierProvider<RunTime, int?> {\n  const RunTimeProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'runTimeProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$runTimeHash();\n\n  @$internal\n  @override\n  RunTime create() => RunTime();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(int? value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<int?>(value),\n    );\n  }\n}\n\nString _$runTimeHash() => r'665a3a58487bb59aa54c3f797db0627986aa878f';\n\nabstract class _$RunTime extends $Notifier<int?> {\n  int? build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<int?, int?>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<int?, int?>,\n              int?,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(ViewSize)\nconst viewSizeProvider = ViewSizeProvider._();\n\nfinal class ViewSizeProvider extends $NotifierProvider<ViewSize, Size> {\n  const ViewSizeProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'viewSizeProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$viewSizeHash();\n\n  @$internal\n  @override\n  ViewSize create() => ViewSize();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(Size value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<Size>(value),\n    );\n  }\n}\n\nString _$viewSizeHash() => r'3f355412237dc1234cca0d97972ac2eef1eb4792';\n\nabstract class _$ViewSize extends $Notifier<Size> {\n  Size build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<Size, Size>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<Size, Size>,\n              Size,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(SideWidth)\nconst sideWidthProvider = SideWidthProvider._();\n\nfinal class SideWidthProvider extends $NotifierProvider<SideWidth, double> {\n  const SideWidthProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'sideWidthProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$sideWidthHash();\n\n  @$internal\n  @override\n  SideWidth create() => SideWidth();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(double value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<double>(value),\n    );\n  }\n}\n\nString _$sideWidthHash() => r'2f849d52dab271831bad68b07c1f90b5c18c0cc4';\n\nabstract class _$SideWidth extends $Notifier<double> {\n  double build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<double, double>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<double, double>,\n              double,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(viewWidth)\nconst viewWidthProvider = ViewWidthProvider._();\n\nfinal class ViewWidthProvider\n    extends $FunctionalProvider<double, double, double>\n    with $Provider<double> {\n  const ViewWidthProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'viewWidthProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$viewWidthHash();\n\n  @$internal\n  @override\n  $ProviderElement<double> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  double create(Ref ref) {\n    return viewWidth(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(double value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<double>(value),\n    );\n  }\n}\n\nString _$viewWidthHash() => r'5ee8f1bdebe44760f7333f88127108f5ffd70214';\n\n@ProviderFor(viewMode)\nconst viewModeProvider = ViewModeProvider._();\n\nfinal class ViewModeProvider\n    extends $FunctionalProvider<ViewMode, ViewMode, ViewMode>\n    with $Provider<ViewMode> {\n  const ViewModeProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'viewModeProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$viewModeHash();\n\n  @$internal\n  @override\n  $ProviderElement<ViewMode> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  ViewMode create(Ref ref) {\n    return viewMode(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(ViewMode value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<ViewMode>(value),\n    );\n  }\n}\n\nString _$viewModeHash() => r'6822e9dc28c813afe1ed743feea464f0d33c805c';\n\n@ProviderFor(isMobileView)\nconst isMobileViewProvider = IsMobileViewProvider._();\n\nfinal class IsMobileViewProvider extends $FunctionalProvider<bool, bool, bool>\n    with $Provider<bool> {\n  const IsMobileViewProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'isMobileViewProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$isMobileViewHash();\n\n  @$internal\n  @override\n  $ProviderElement<bool> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  bool create(Ref ref) {\n    return isMobileView(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(bool value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<bool>(value),\n    );\n  }\n}\n\nString _$isMobileViewHash() => r'1d75bccb4f50ae206bf43b68df869a5d95e5ea5f';\n\n@ProviderFor(viewHeight)\nconst viewHeightProvider = ViewHeightProvider._();\n\nfinal class ViewHeightProvider\n    extends $FunctionalProvider<double, double, double>\n    with $Provider<double> {\n  const ViewHeightProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'viewHeightProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$viewHeightHash();\n\n  @$internal\n  @override\n  $ProviderElement<double> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  double create(Ref ref) {\n    return viewHeight(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(double value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<double>(value),\n    );\n  }\n}\n\nString _$viewHeightHash() => r'dc3fc18337b5ce9fc953d994c380e8f1fa49f352';\n\n@ProviderFor(Init)\nconst initProvider = InitProvider._();\n\nfinal class InitProvider extends $NotifierProvider<Init, bool> {\n  const InitProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'initProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$initHash();\n\n  @$internal\n  @override\n  Init create() => Init();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(bool value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<bool>(value),\n    );\n  }\n}\n\nString _$initHash() => r'0fcded1ed3c62f2658898dee845455e412b171b1';\n\nabstract class _$Init extends $Notifier<bool> {\n  bool build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<bool, bool>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<bool, bool>,\n              bool,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(CurrentPageLabel)\nconst currentPageLabelProvider = CurrentPageLabelProvider._();\n\nfinal class CurrentPageLabelProvider\n    extends $NotifierProvider<CurrentPageLabel, PageLabel> {\n  const CurrentPageLabelProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'currentPageLabelProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$currentPageLabelHash();\n\n  @$internal\n  @override\n  CurrentPageLabel create() => CurrentPageLabel();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(PageLabel value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<PageLabel>(value),\n    );\n  }\n}\n\nString _$currentPageLabelHash() => r'3a5fcd2d50e018ae379cdcd835cfa72ccf8720b8';\n\nabstract class _$CurrentPageLabel extends $Notifier<PageLabel> {\n  PageLabel build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<PageLabel, PageLabel>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<PageLabel, PageLabel>,\n              PageLabel,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(SortNum)\nconst sortNumProvider = SortNumProvider._();\n\nfinal class SortNumProvider extends $NotifierProvider<SortNum, int> {\n  const SortNumProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'sortNumProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$sortNumHash();\n\n  @$internal\n  @override\n  SortNum create() => SortNum();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(int value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<int>(value),\n    );\n  }\n}\n\nString _$sortNumHash() => r'6682f00d1f87cb17f294ad181ac96bf4dc6edb52';\n\nabstract class _$SortNum extends $Notifier<int> {\n  int build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<int, int>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<int, int>,\n              int,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(CheckIpNum)\nconst checkIpNumProvider = CheckIpNumProvider._();\n\nfinal class CheckIpNumProvider extends $NotifierProvider<CheckIpNum, int> {\n  const CheckIpNumProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'checkIpNumProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$checkIpNumHash();\n\n  @$internal\n  @override\n  CheckIpNum create() => CheckIpNum();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(int value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<int>(value),\n    );\n  }\n}\n\nString _$checkIpNumHash() => r'e66b46fae31f3683698dc55533fbdd240aff44fe';\n\nabstract class _$CheckIpNum extends $Notifier<int> {\n  int build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<int, int>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<int, int>,\n              int,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(BackBlock)\nconst backBlockProvider = BackBlockProvider._();\n\nfinal class BackBlockProvider extends $NotifierProvider<BackBlock, bool> {\n  const BackBlockProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'backBlockProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$backBlockHash();\n\n  @$internal\n  @override\n  BackBlock create() => BackBlock();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(bool value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<bool>(value),\n    );\n  }\n}\n\nString _$backBlockHash() => r'76e821bab72717698f0a5f10e9d2a8909918ae0d';\n\nabstract class _$BackBlock extends $Notifier<bool> {\n  bool build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<bool, bool>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<bool, bool>,\n              bool,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(Version)\nconst versionProvider = VersionProvider._();\n\nfinal class VersionProvider extends $NotifierProvider<Version, int> {\n  const VersionProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'versionProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$versionHash();\n\n  @$internal\n  @override\n  Version create() => Version();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(int value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<int>(value),\n    );\n  }\n}\n\nString _$versionHash() => r'00b43faa4061121d30a0612ed275644a402ce3fa';\n\nabstract class _$Version extends $Notifier<int> {\n  int build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<int, int>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<int, int>,\n              int,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(Groups)\nconst groupsProvider = GroupsProvider._();\n\nfinal class GroupsProvider extends $NotifierProvider<Groups, List<Group>> {\n  const GroupsProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'groupsProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$groupsHash();\n\n  @$internal\n  @override\n  Groups create() => Groups();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(List<Group> value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<List<Group>>(value),\n    );\n  }\n}\n\nString _$groupsHash() => r'180ede48880a239add201c111ae45b2a6d98f3a5';\n\nabstract class _$Groups extends $Notifier<List<Group>> {\n  List<Group> build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<List<Group>, List<Group>>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<List<Group>, List<Group>>,\n              List<Group>,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(DelayDataSource)\nconst delayDataSourceProvider = DelayDataSourceProvider._();\n\nfinal class DelayDataSourceProvider\n    extends $NotifierProvider<DelayDataSource, DelayMap> {\n  const DelayDataSourceProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'delayDataSourceProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$delayDataSourceHash();\n\n  @$internal\n  @override\n  DelayDataSource create() => DelayDataSource();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(DelayMap value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<DelayMap>(value),\n    );\n  }\n}\n\nString _$delayDataSourceHash() => r'9737cf2d943cb9b5504a5ec8ace20b0a9380b197';\n\nabstract class _$DelayDataSource extends $Notifier<DelayMap> {\n  DelayMap build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<DelayMap, DelayMap>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<DelayMap, DelayMap>,\n              DelayMap,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(SystemUiOverlayStyleState)\nconst systemUiOverlayStyleStateProvider = SystemUiOverlayStyleStateProvider._();\n\nfinal class SystemUiOverlayStyleStateProvider\n    extends $NotifierProvider<SystemUiOverlayStyleState, SystemUiOverlayStyle> {\n  const SystemUiOverlayStyleStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'systemUiOverlayStyleStateProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$systemUiOverlayStyleStateHash();\n\n  @$internal\n  @override\n  SystemUiOverlayStyleState create() => SystemUiOverlayStyleState();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(SystemUiOverlayStyle value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<SystemUiOverlayStyle>(value),\n    );\n  }\n}\n\nString _$systemUiOverlayStyleStateHash() =>\n    r'c5ba11d1c6eceef95f80b129e4d2a8ab7ecb7916';\n\nabstract class _$SystemUiOverlayStyleState\n    extends $Notifier<SystemUiOverlayStyle> {\n  SystemUiOverlayStyle build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<SystemUiOverlayStyle, SystemUiOverlayStyle>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<SystemUiOverlayStyle, SystemUiOverlayStyle>,\n              SystemUiOverlayStyle,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(_CoreStatus)\nconst coreStatusProvider = _CoreStatusProvider._();\n\nfinal class _CoreStatusProvider\n    extends $NotifierProvider<_CoreStatus, CoreStatus> {\n  const _CoreStatusProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'coreStatusProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$_coreStatusHash();\n\n  @$internal\n  @override\n  _CoreStatus create() => _CoreStatus();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(CoreStatus value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<CoreStatus>(value),\n    );\n  }\n}\n\nString _$_coreStatusHash() => r'e2e7fe37f66b906877e678149d09c656993e1405';\n\nabstract class _$CoreStatus extends $Notifier<CoreStatus> {\n  CoreStatus build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<CoreStatus, CoreStatus>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<CoreStatus, CoreStatus>,\n              CoreStatus,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(Query)\nconst queryProvider = QueryFamily._();\n\nfinal class QueryProvider extends $NotifierProvider<Query, String> {\n  const QueryProvider._({\n    required QueryFamily super.from,\n    required QueryTag super.argument,\n  }) : super(\n         retry: null,\n         name: r'queryProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$queryHash();\n\n  @override\n  String toString() {\n    return r'queryProvider'\n        ''\n        '($argument)';\n  }\n\n  @$internal\n  @override\n  Query create() => Query();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(String value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<String>(value),\n    );\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is QueryProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$queryHash() => r'b6be53823f3351ee2bf1c0d147c0ccf5f31bb8b5';\n\nfinal class QueryFamily extends $Family\n    with $ClassFamilyOverride<Query, String, String, String, QueryTag> {\n  const QueryFamily._()\n    : super(\n        retry: null,\n        name: r'queryProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  QueryProvider call(QueryTag tag) =>\n      QueryProvider._(argument: tag, from: this);\n\n  @override\n  String toString() => r'queryProvider';\n}\n\nabstract class _$Query extends $Notifier<String> {\n  late final _$args = ref.$arg as QueryTag;\n  QueryTag get tag => _$args;\n\n  String build(QueryTag tag);\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build(_$args);\n    final ref = this.ref as $Ref<String, String>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<String, String>,\n              String,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(Loading)\nconst loadingProvider = LoadingFamily._();\n\nfinal class LoadingProvider extends $NotifierProvider<Loading, bool> {\n  const LoadingProvider._({\n    required LoadingFamily super.from,\n    required LoadingTag super.argument,\n  }) : super(\n         retry: null,\n         name: r'loadingProvider',\n         isAutoDispose: false,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$loadingHash();\n\n  @override\n  String toString() {\n    return r'loadingProvider'\n        ''\n        '($argument)';\n  }\n\n  @$internal\n  @override\n  Loading create() => Loading();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(bool value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<bool>(value),\n    );\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is LoadingProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$loadingHash() => r'f4c58da7e5869c3e114b76439f3169b31d2e5b71';\n\nfinal class LoadingFamily extends $Family\n    with $ClassFamilyOverride<Loading, bool, bool, bool, LoadingTag> {\n  const LoadingFamily._()\n    : super(\n        retry: null,\n        name: r'loadingProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: false,\n      );\n\n  LoadingProvider call(LoadingTag tag) =>\n      LoadingProvider._(argument: tag, from: this);\n\n  @override\n  String toString() => r'loadingProvider';\n}\n\nabstract class _$Loading extends $Notifier<bool> {\n  late final _$args = ref.$arg as LoadingTag;\n  LoadingTag get tag => _$args;\n\n  bool build(LoadingTag tag);\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build(_$args);\n    final ref = this.ref as $Ref<bool, bool>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<bool, bool>,\n              bool,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(SelectedItems)\nconst selectedItemsProvider = SelectedItemsFamily._();\n\nfinal class SelectedItemsProvider\n    extends $NotifierProvider<SelectedItems, Set<dynamic>> {\n  const SelectedItemsProvider._({\n    required SelectedItemsFamily super.from,\n    required String super.argument,\n  }) : super(\n         retry: null,\n         name: r'selectedItemsProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$selectedItemsHash();\n\n  @override\n  String toString() {\n    return r'selectedItemsProvider'\n        ''\n        '($argument)';\n  }\n\n  @$internal\n  @override\n  SelectedItems create() => SelectedItems();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(Set<dynamic> value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<Set<dynamic>>(value),\n    );\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is SelectedItemsProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$selectedItemsHash() => r'05ef5c5584cbac90d416e5c4fe53ec9e29604020';\n\nfinal class SelectedItemsFamily extends $Family\n    with\n        $ClassFamilyOverride<\n          SelectedItems,\n          Set<dynamic>,\n          Set<dynamic>,\n          Set<dynamic>,\n          String\n        > {\n  const SelectedItemsFamily._()\n    : super(\n        retry: null,\n        name: r'selectedItemsProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  SelectedItemsProvider call(String key) =>\n      SelectedItemsProvider._(argument: key, from: this);\n\n  @override\n  String toString() => r'selectedItemsProvider';\n}\n\nabstract class _$SelectedItems extends $Notifier<Set<dynamic>> {\n  late final _$args = ref.$arg as String;\n  String get key => _$args;\n\n  Set<dynamic> build(String key);\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build(_$args);\n    final ref = this.ref as $Ref<Set<dynamic>, Set<dynamic>>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<Set<dynamic>, Set<dynamic>>,\n              Set<dynamic>,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(SelectedItem)\nconst selectedItemProvider = SelectedItemFamily._();\n\nfinal class SelectedItemProvider\n    extends $NotifierProvider<SelectedItem, dynamic> {\n  const SelectedItemProvider._({\n    required SelectedItemFamily super.from,\n    required String super.argument,\n  }) : super(\n         retry: null,\n         name: r'selectedItemProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$selectedItemHash();\n\n  @override\n  String toString() {\n    return r'selectedItemProvider'\n        ''\n        '($argument)';\n  }\n\n  @$internal\n  @override\n  SelectedItem create() => SelectedItem();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(dynamic value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<dynamic>(value),\n    );\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is SelectedItemProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$selectedItemHash() => r'b50be0386d53ee8441c37d1a2a4c25640ce10766';\n\nfinal class SelectedItemFamily extends $Family\n    with $ClassFamilyOverride<SelectedItem, dynamic, dynamic, dynamic, String> {\n  const SelectedItemFamily._()\n    : super(\n        retry: null,\n        name: r'selectedItemProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  SelectedItemProvider call(String key) =>\n      SelectedItemProvider._(argument: key, from: this);\n\n  @override\n  String toString() => r'selectedItemProvider';\n}\n\nabstract class _$SelectedItem extends $Notifier<dynamic> {\n  late final _$args = ref.$arg as String;\n  String get key => _$args;\n\n  dynamic build(String key);\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build(_$args);\n    final ref = this.ref as $Ref<dynamic, dynamic>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<dynamic, dynamic>,\n              dynamic,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(IsUpdating)\nconst isUpdatingProvider = IsUpdatingFamily._();\n\nfinal class IsUpdatingProvider extends $NotifierProvider<IsUpdating, bool> {\n  const IsUpdatingProvider._({\n    required IsUpdatingFamily super.from,\n    required String super.argument,\n  }) : super(\n         retry: null,\n         name: r'isUpdatingProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$isUpdatingHash();\n\n  @override\n  String toString() {\n    return r'isUpdatingProvider'\n        ''\n        '($argument)';\n  }\n\n  @$internal\n  @override\n  IsUpdating create() => IsUpdating();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(bool value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<bool>(value),\n    );\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is IsUpdatingProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$isUpdatingHash() => r'934cc96cbf8cf6909d27867455a31bf3008470e6';\n\nfinal class IsUpdatingFamily extends $Family\n    with $ClassFamilyOverride<IsUpdating, bool, bool, bool, String> {\n  const IsUpdatingFamily._()\n    : super(\n        retry: null,\n        name: r'isUpdatingProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  IsUpdatingProvider call(String name) =>\n      IsUpdatingProvider._(argument: name, from: this);\n\n  @override\n  String toString() => r'isUpdatingProvider';\n}\n\nabstract class _$IsUpdating extends $Notifier<bool> {\n  late final _$args = ref.$arg as String;\n  String get name => _$args;\n\n  bool build(String name);\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build(_$args);\n    final ref = this.ref as $Ref<bool, bool>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<bool, bool>,\n              bool,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(NetworkDetection)\nconst networkDetectionProvider = NetworkDetectionProvider._();\n\nfinal class NetworkDetectionProvider\n    extends $NotifierProvider<NetworkDetection, NetworkDetectionState> {\n  const NetworkDetectionProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'networkDetectionProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$networkDetectionHash();\n\n  @$internal\n  @override\n  NetworkDetection create() => NetworkDetection();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(NetworkDetectionState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<NetworkDetectionState>(value),\n    );\n  }\n}\n\nString _$networkDetectionHash() => r'501babec2bbf2a38e4fef96cf20c76e9352bc5ee';\n\nabstract class _$NetworkDetection extends $Notifier<NetworkDetectionState> {\n  NetworkDetectionState build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<NetworkDetectionState, NetworkDetectionState>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<NetworkDetectionState, NetworkDetectionState>,\n              NetworkDetectionState,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n"
  },
  {
    "path": "lib/providers/generated/config.g.dart",
    "content": "// GENERATED CODE - DO NOT MODIFY BY HAND\n\npart of '../config.dart';\n\n// **************************************************************************\n// RiverpodGenerator\n// **************************************************************************\n\n// GENERATED CODE - DO NOT MODIFY BY HAND\n// ignore_for_file: type=lint, type=warning\n\n@ProviderFor(AppSetting)\nconst appSettingProvider = AppSettingProvider._();\n\nfinal class AppSettingProvider\n    extends $NotifierProvider<AppSetting, AppSettingProps> {\n  const AppSettingProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'appSettingProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$appSettingHash();\n\n  @$internal\n  @override\n  AppSetting create() => AppSetting();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(AppSettingProps value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<AppSettingProps>(value),\n    );\n  }\n}\n\nString _$appSettingHash() => r'0efd340a05a5be1b1190b3f2e9465bdfc6182046';\n\nabstract class _$AppSetting extends $Notifier<AppSettingProps> {\n  AppSettingProps build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<AppSettingProps, AppSettingProps>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<AppSettingProps, AppSettingProps>,\n              AppSettingProps,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(WindowSetting)\nconst windowSettingProvider = WindowSettingProvider._();\n\nfinal class WindowSettingProvider\n    extends $NotifierProvider<WindowSetting, WindowProps> {\n  const WindowSettingProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'windowSettingProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$windowSettingHash();\n\n  @$internal\n  @override\n  WindowSetting create() => WindowSetting();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(WindowProps value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<WindowProps>(value),\n    );\n  }\n}\n\nString _$windowSettingHash() => r'd245796233fec671722ebed58e39c967d9a12142';\n\nabstract class _$WindowSetting extends $Notifier<WindowProps> {\n  WindowProps build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<WindowProps, WindowProps>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<WindowProps, WindowProps>,\n              WindowProps,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(VpnSetting)\nconst vpnSettingProvider = VpnSettingProvider._();\n\nfinal class VpnSettingProvider extends $NotifierProvider<VpnSetting, VpnProps> {\n  const VpnSettingProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'vpnSettingProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$vpnSettingHash();\n\n  @$internal\n  @override\n  VpnSetting create() => VpnSetting();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(VpnProps value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<VpnProps>(value),\n    );\n  }\n}\n\nString _$vpnSettingHash() => r'051f90f388a52678052b655827c48947150b7ca1';\n\nabstract class _$VpnSetting extends $Notifier<VpnProps> {\n  VpnProps build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<VpnProps, VpnProps>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<VpnProps, VpnProps>,\n              VpnProps,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(NetworkSetting)\nconst networkSettingProvider = NetworkSettingProvider._();\n\nfinal class NetworkSettingProvider\n    extends $NotifierProvider<NetworkSetting, NetworkProps> {\n  const NetworkSettingProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'networkSettingProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$networkSettingHash();\n\n  @$internal\n  @override\n  NetworkSetting create() => NetworkSetting();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(NetworkProps value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<NetworkProps>(value),\n    );\n  }\n}\n\nString _$networkSettingHash() => r'54bd68084a1eb1b68650e353089c240d4a07f3a5';\n\nabstract class _$NetworkSetting extends $Notifier<NetworkProps> {\n  NetworkProps build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<NetworkProps, NetworkProps>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<NetworkProps, NetworkProps>,\n              NetworkProps,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(ThemeSetting)\nconst themeSettingProvider = ThemeSettingProvider._();\n\nfinal class ThemeSettingProvider\n    extends $NotifierProvider<ThemeSetting, ThemeProps> {\n  const ThemeSettingProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'themeSettingProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$themeSettingHash();\n\n  @$internal\n  @override\n  ThemeSetting create() => ThemeSetting();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(ThemeProps value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<ThemeProps>(value),\n    );\n  }\n}\n\nString _$themeSettingHash() => r'5b64a2e3968a60967534805b4bef3adf3712e77a';\n\nabstract class _$ThemeSetting extends $Notifier<ThemeProps> {\n  ThemeProps build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<ThemeProps, ThemeProps>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<ThemeProps, ThemeProps>,\n              ThemeProps,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(CurrentProfileId)\nconst currentProfileIdProvider = CurrentProfileIdProvider._();\n\nfinal class CurrentProfileIdProvider\n    extends $NotifierProvider<CurrentProfileId, int?> {\n  const CurrentProfileIdProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'currentProfileIdProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$currentProfileIdHash();\n\n  @$internal\n  @override\n  CurrentProfileId create() => CurrentProfileId();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(int? value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<int?>(value),\n    );\n  }\n}\n\nString _$currentProfileIdHash() => r'98ff7a3a0b8ed420d086993839f4d629df7590a6';\n\nabstract class _$CurrentProfileId extends $Notifier<int?> {\n  int? build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<int?, int?>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<int?, int?>,\n              int?,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(DavSetting)\nconst davSettingProvider = DavSettingProvider._();\n\nfinal class DavSettingProvider\n    extends $NotifierProvider<DavSetting, DAVProps?> {\n  const DavSettingProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'davSettingProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$davSettingHash();\n\n  @$internal\n  @override\n  DavSetting create() => DavSetting();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(DAVProps? value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<DAVProps?>(value),\n    );\n  }\n}\n\nString _$davSettingHash() => r'5c85725b0d988c8f44ef6ba373953e551e09e857';\n\nabstract class _$DavSetting extends $Notifier<DAVProps?> {\n  DAVProps? build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<DAVProps?, DAVProps?>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<DAVProps?, DAVProps?>,\n              DAVProps?,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(OverrideDns)\nconst overrideDnsProvider = OverrideDnsProvider._();\n\nfinal class OverrideDnsProvider extends $NotifierProvider<OverrideDns, bool> {\n  const OverrideDnsProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'overrideDnsProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$overrideDnsHash();\n\n  @$internal\n  @override\n  OverrideDns create() => OverrideDns();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(bool value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<bool>(value),\n    );\n  }\n}\n\nString _$overrideDnsHash() => r'3d49994fa23389530643e8c80e588a58f14eec92';\n\nabstract class _$OverrideDns extends $Notifier<bool> {\n  bool build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<bool, bool>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<bool, bool>,\n              bool,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(HotKeyActions)\nconst hotKeyActionsProvider = HotKeyActionsProvider._();\n\nfinal class HotKeyActionsProvider\n    extends $NotifierProvider<HotKeyActions, List<HotKeyAction>> {\n  const HotKeyActionsProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'hotKeyActionsProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$hotKeyActionsHash();\n\n  @$internal\n  @override\n  HotKeyActions create() => HotKeyActions();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(List<HotKeyAction> value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<List<HotKeyAction>>(value),\n    );\n  }\n}\n\nString _$hotKeyActionsHash() => r'5512b83196646a49fa7307282315d9dccc658dc8';\n\nabstract class _$HotKeyActions extends $Notifier<List<HotKeyAction>> {\n  List<HotKeyAction> build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<List<HotKeyAction>, List<HotKeyAction>>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<List<HotKeyAction>, List<HotKeyAction>>,\n              List<HotKeyAction>,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(ProxiesStyleSetting)\nconst proxiesStyleSettingProvider = ProxiesStyleSettingProvider._();\n\nfinal class ProxiesStyleSettingProvider\n    extends $NotifierProvider<ProxiesStyleSetting, ProxiesStyleProps> {\n  const ProxiesStyleSettingProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'proxiesStyleSettingProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$proxiesStyleSettingHash();\n\n  @$internal\n  @override\n  ProxiesStyleSetting create() => ProxiesStyleSetting();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(ProxiesStyleProps value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<ProxiesStyleProps>(value),\n    );\n  }\n}\n\nString _$proxiesStyleSettingHash() =>\n    r'b785ed2e71d74384150d80456d2b852e80629b8e';\n\nabstract class _$ProxiesStyleSetting extends $Notifier<ProxiesStyleProps> {\n  ProxiesStyleProps build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<ProxiesStyleProps, ProxiesStyleProps>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<ProxiesStyleProps, ProxiesStyleProps>,\n              ProxiesStyleProps,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(PatchClashConfig)\nconst patchClashConfigProvider = PatchClashConfigProvider._();\n\nfinal class PatchClashConfigProvider\n    extends $NotifierProvider<PatchClashConfig, ClashConfig> {\n  const PatchClashConfigProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'patchClashConfigProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$patchClashConfigHash();\n\n  @$internal\n  @override\n  PatchClashConfig create() => PatchClashConfig();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(ClashConfig value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<ClashConfig>(value),\n    );\n  }\n}\n\nString _$patchClashConfigHash() => r'ff92f991ccb3a3d13a938affc006d7e2cb85fecd';\n\nabstract class _$PatchClashConfig extends $Notifier<ClashConfig> {\n  ClashConfig build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<ClashConfig, ClashConfig>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<ClashConfig, ClashConfig>,\n              ClashConfig,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(_config)\nconst configProvider = _ConfigProvider._();\n\nfinal class _ConfigProvider extends $FunctionalProvider<Config, Config, Config>\n    with $Provider<Config> {\n  const _ConfigProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'configProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$_configHash();\n\n  @$internal\n  @override\n  $ProviderElement<Config> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  Config create(Ref ref) {\n    return _config(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(Config value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<Config>(value),\n    );\n  }\n}\n\nString _$_configHash() => r'17dad8563f5727690a7fd484815e7344e6a46ffa';\n"
  },
  {
    "path": "lib/providers/generated/database.g.dart",
    "content": "// GENERATED CODE - DO NOT MODIFY BY HAND\n\npart of '../database.dart';\n\n// **************************************************************************\n// RiverpodGenerator\n// **************************************************************************\n\n// GENERATED CODE - DO NOT MODIFY BY HAND\n// ignore_for_file: type=lint, type=warning\n\n@ProviderFor(profilesStream)\nconst profilesStreamProvider = ProfilesStreamProvider._();\n\nfinal class ProfilesStreamProvider\n    extends\n        $FunctionalProvider<\n          AsyncValue<List<Profile>>,\n          List<Profile>,\n          Stream<List<Profile>>\n        >\n    with $FutureModifier<List<Profile>>, $StreamProvider<List<Profile>> {\n  const ProfilesStreamProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'profilesStreamProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$profilesStreamHash();\n\n  @$internal\n  @override\n  $StreamProviderElement<List<Profile>> $createElement(\n    $ProviderPointer pointer,\n  ) => $StreamProviderElement(pointer);\n\n  @override\n  Stream<List<Profile>> create(Ref ref) {\n    return profilesStream(ref);\n  }\n}\n\nString _$profilesStreamHash() => r'483907aa6c324209b5202369300a4a53230f83db';\n\n@ProviderFor(addedRuleStream)\nconst addedRuleStreamProvider = AddedRuleStreamFamily._();\n\nfinal class AddedRuleStreamProvider\n    extends\n        $FunctionalProvider<\n          AsyncValue<List<Rule>>,\n          List<Rule>,\n          Stream<List<Rule>>\n        >\n    with $FutureModifier<List<Rule>>, $StreamProvider<List<Rule>> {\n  const AddedRuleStreamProvider._({\n    required AddedRuleStreamFamily super.from,\n    required int super.argument,\n  }) : super(\n         retry: null,\n         name: r'addedRuleStreamProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$addedRuleStreamHash();\n\n  @override\n  String toString() {\n    return r'addedRuleStreamProvider'\n        ''\n        '($argument)';\n  }\n\n  @$internal\n  @override\n  $StreamProviderElement<List<Rule>> $createElement($ProviderPointer pointer) =>\n      $StreamProviderElement(pointer);\n\n  @override\n  Stream<List<Rule>> create(Ref ref) {\n    final argument = this.argument as int;\n    return addedRuleStream(ref, argument);\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is AddedRuleStreamProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$addedRuleStreamHash() => r'491968ce795e56d4516a95676fcf46d575b3495f';\n\nfinal class AddedRuleStreamFamily extends $Family\n    with $FunctionalFamilyOverride<Stream<List<Rule>>, int> {\n  const AddedRuleStreamFamily._()\n    : super(\n        retry: null,\n        name: r'addedRuleStreamProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  AddedRuleStreamProvider call(int profileId) =>\n      AddedRuleStreamProvider._(argument: profileId, from: this);\n\n  @override\n  String toString() => r'addedRuleStreamProvider';\n}\n\n@ProviderFor(Profiles)\nconst profilesProvider = ProfilesProvider._();\n\nfinal class ProfilesProvider\n    extends $NotifierProvider<Profiles, List<Profile>> {\n  const ProfilesProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'profilesProvider',\n        isAutoDispose: false,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$profilesHash();\n\n  @$internal\n  @override\n  Profiles create() => Profiles();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(List<Profile> value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<List<Profile>>(value),\n    );\n  }\n}\n\nString _$profilesHash() => r'9ba0fedd671eab4aa809eb2ce7962f8a7a71665d';\n\nabstract class _$Profiles extends $Notifier<List<Profile>> {\n  List<Profile> build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<List<Profile>, List<Profile>>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<List<Profile>, List<Profile>>,\n              List<Profile>,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(Scripts)\nconst scriptsProvider = ScriptsProvider._();\n\nfinal class ScriptsProvider\n    extends $StreamNotifierProvider<Scripts, List<Script>> {\n  const ScriptsProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'scriptsProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$scriptsHash();\n\n  @$internal\n  @override\n  Scripts create() => Scripts();\n}\n\nString _$scriptsHash() => r'a784e9986eae864229a1035cc28ce4f3ec4644a0';\n\nabstract class _$Scripts extends $StreamNotifier<List<Script>> {\n  Stream<List<Script>> build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<AsyncValue<List<Script>>, List<Script>>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<AsyncValue<List<Script>>, List<Script>>,\n              AsyncValue<List<Script>>,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(GlobalRules)\nconst globalRulesProvider = GlobalRulesProvider._();\n\nfinal class GlobalRulesProvider\n    extends $StreamNotifierProvider<GlobalRules, List<Rule>> {\n  const GlobalRulesProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'globalRulesProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$globalRulesHash();\n\n  @$internal\n  @override\n  GlobalRules create() => GlobalRules();\n}\n\nString _$globalRulesHash() => r'3ed947f389649a86d5c6d78d8c02ba5b8d0f7119';\n\nabstract class _$GlobalRules extends $StreamNotifier<List<Rule>> {\n  Stream<List<Rule>> build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<AsyncValue<List<Rule>>, List<Rule>>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<AsyncValue<List<Rule>>, List<Rule>>,\n              AsyncValue<List<Rule>>,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(ProfileAddedRules)\nconst profileAddedRulesProvider = ProfileAddedRulesFamily._();\n\nfinal class ProfileAddedRulesProvider\n    extends $StreamNotifierProvider<ProfileAddedRules, List<Rule>> {\n  const ProfileAddedRulesProvider._({\n    required ProfileAddedRulesFamily super.from,\n    required int super.argument,\n  }) : super(\n         retry: null,\n         name: r'profileAddedRulesProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$profileAddedRulesHash();\n\n  @override\n  String toString() {\n    return r'profileAddedRulesProvider'\n        ''\n        '($argument)';\n  }\n\n  @$internal\n  @override\n  ProfileAddedRules create() => ProfileAddedRules();\n\n  @override\n  bool operator ==(Object other) {\n    return other is ProfileAddedRulesProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$profileAddedRulesHash() => r'4155448335cf14a8928db6adf68e59572aa4ce47';\n\nfinal class ProfileAddedRulesFamily extends $Family\n    with\n        $ClassFamilyOverride<\n          ProfileAddedRules,\n          AsyncValue<List<Rule>>,\n          List<Rule>,\n          Stream<List<Rule>>,\n          int\n        > {\n  const ProfileAddedRulesFamily._()\n    : super(\n        retry: null,\n        name: r'profileAddedRulesProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  ProfileAddedRulesProvider call(int profileId) =>\n      ProfileAddedRulesProvider._(argument: profileId, from: this);\n\n  @override\n  String toString() => r'profileAddedRulesProvider';\n}\n\nabstract class _$ProfileAddedRules extends $StreamNotifier<List<Rule>> {\n  late final _$args = ref.$arg as int;\n  int get profileId => _$args;\n\n  Stream<List<Rule>> build(int profileId);\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build(_$args);\n    final ref = this.ref as $Ref<AsyncValue<List<Rule>>, List<Rule>>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<AsyncValue<List<Rule>>, List<Rule>>,\n              AsyncValue<List<Rule>>,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n\n@ProviderFor(ProfileDisabledRuleIds)\nconst profileDisabledRuleIdsProvider = ProfileDisabledRuleIdsFamily._();\n\nfinal class ProfileDisabledRuleIdsProvider\n    extends $StreamNotifierProvider<ProfileDisabledRuleIds, List<int>> {\n  const ProfileDisabledRuleIdsProvider._({\n    required ProfileDisabledRuleIdsFamily super.from,\n    required int super.argument,\n  }) : super(\n         retry: null,\n         name: r'profileDisabledRuleIdsProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$profileDisabledRuleIdsHash();\n\n  @override\n  String toString() {\n    return r'profileDisabledRuleIdsProvider'\n        ''\n        '($argument)';\n  }\n\n  @$internal\n  @override\n  ProfileDisabledRuleIds create() => ProfileDisabledRuleIds();\n\n  @override\n  bool operator ==(Object other) {\n    return other is ProfileDisabledRuleIdsProvider &&\n        other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$profileDisabledRuleIdsHash() =>\n    r'22d6e68bcee55b42fbb909e7f66e5c7095935224';\n\nfinal class ProfileDisabledRuleIdsFamily extends $Family\n    with\n        $ClassFamilyOverride<\n          ProfileDisabledRuleIds,\n          AsyncValue<List<int>>,\n          List<int>,\n          Stream<List<int>>,\n          int\n        > {\n  const ProfileDisabledRuleIdsFamily._()\n    : super(\n        retry: null,\n        name: r'profileDisabledRuleIdsProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  ProfileDisabledRuleIdsProvider call(int profileId) =>\n      ProfileDisabledRuleIdsProvider._(argument: profileId, from: this);\n\n  @override\n  String toString() => r'profileDisabledRuleIdsProvider';\n}\n\nabstract class _$ProfileDisabledRuleIds extends $StreamNotifier<List<int>> {\n  late final _$args = ref.$arg as int;\n  int get profileId => _$args;\n\n  Stream<List<int>> build(int profileId);\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build(_$args);\n    final ref = this.ref as $Ref<AsyncValue<List<int>>, List<int>>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<AsyncValue<List<int>>, List<int>>,\n              AsyncValue<List<int>>,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n"
  },
  {
    "path": "lib/providers/generated/state.g.dart",
    "content": "// GENERATED CODE - DO NOT MODIFY BY HAND\n\npart of '../state.dart';\n\n// **************************************************************************\n// RiverpodGenerator\n// **************************************************************************\n\n// GENERATED CODE - DO NOT MODIFY BY HAND\n// ignore_for_file: type=lint, type=warning\n\n@ProviderFor(currentGroupsState)\nconst currentGroupsStateProvider = CurrentGroupsStateProvider._();\n\nfinal class CurrentGroupsStateProvider\n    extends $FunctionalProvider<GroupsState, GroupsState, GroupsState>\n    with $Provider<GroupsState> {\n  const CurrentGroupsStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'currentGroupsStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$currentGroupsStateHash();\n\n  @$internal\n  @override\n  $ProviderElement<GroupsState> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  GroupsState create(Ref ref) {\n    return currentGroupsState(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(GroupsState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<GroupsState>(value),\n    );\n  }\n}\n\nString _$currentGroupsStateHash() =>\n    r'dbf8f02606a31486c99d7b89d19914cd5a1fc496';\n\n@ProviderFor(navigationItemsState)\nconst navigationItemsStateProvider = NavigationItemsStateProvider._();\n\nfinal class NavigationItemsStateProvider\n    extends\n        $FunctionalProvider<\n          NavigationItemsState,\n          NavigationItemsState,\n          NavigationItemsState\n        >\n    with $Provider<NavigationItemsState> {\n  const NavigationItemsStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'navigationItemsStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$navigationItemsStateHash();\n\n  @$internal\n  @override\n  $ProviderElement<NavigationItemsState> $createElement(\n    $ProviderPointer pointer,\n  ) => $ProviderElement(pointer);\n\n  @override\n  NavigationItemsState create(Ref ref) {\n    return navigationItemsState(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(NavigationItemsState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<NavigationItemsState>(value),\n    );\n  }\n}\n\nString _$navigationItemsStateHash() =>\n    r'1fc37c14d129f9725b0e62fd53f6b25382f51102';\n\n@ProviderFor(currentNavigationItemsState)\nconst currentNavigationItemsStateProvider =\n    CurrentNavigationItemsStateProvider._();\n\nfinal class CurrentNavigationItemsStateProvider\n    extends\n        $FunctionalProvider<\n          NavigationItemsState,\n          NavigationItemsState,\n          NavigationItemsState\n        >\n    with $Provider<NavigationItemsState> {\n  const CurrentNavigationItemsStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'currentNavigationItemsStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$currentNavigationItemsStateHash();\n\n  @$internal\n  @override\n  $ProviderElement<NavigationItemsState> $createElement(\n    $ProviderPointer pointer,\n  ) => $ProviderElement(pointer);\n\n  @override\n  NavigationItemsState create(Ref ref) {\n    return currentNavigationItemsState(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(NavigationItemsState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<NavigationItemsState>(value),\n    );\n  }\n}\n\nString _$currentNavigationItemsStateHash() =>\n    r'06fbdc194f4527b945695fe3b72b16e0585fa440';\n\n@ProviderFor(updateParams)\nconst updateParamsProvider = UpdateParamsProvider._();\n\nfinal class UpdateParamsProvider\n    extends $FunctionalProvider<UpdateParams, UpdateParams, UpdateParams>\n    with $Provider<UpdateParams> {\n  const UpdateParamsProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'updateParamsProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$updateParamsHash();\n\n  @$internal\n  @override\n  $ProviderElement<UpdateParams> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  UpdateParams create(Ref ref) {\n    return updateParams(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(UpdateParams value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<UpdateParams>(value),\n    );\n  }\n}\n\nString _$updateParamsHash() => r'012df72ab0e769a51c573f4692031506d7b1f1b4';\n\n@ProviderFor(proxyState)\nconst proxyStateProvider = ProxyStateProvider._();\n\nfinal class ProxyStateProvider\n    extends $FunctionalProvider<ProxyState, ProxyState, ProxyState>\n    with $Provider<ProxyState> {\n  const ProxyStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'proxyStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$proxyStateHash();\n\n  @$internal\n  @override\n  $ProviderElement<ProxyState> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  ProxyState create(Ref ref) {\n    return proxyState(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(ProxyState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<ProxyState>(value),\n    );\n  }\n}\n\nString _$proxyStateHash() => r'3df11daa70bd06de32da43e9b3e09a74389264b2';\n\n@ProviderFor(trayState)\nconst trayStateProvider = TrayStateProvider._();\n\nfinal class TrayStateProvider\n    extends $FunctionalProvider<TrayState, TrayState, TrayState>\n    with $Provider<TrayState> {\n  const TrayStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'trayStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$trayStateHash();\n\n  @$internal\n  @override\n  $ProviderElement<TrayState> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  TrayState create(Ref ref) {\n    return trayState(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(TrayState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<TrayState>(value),\n    );\n  }\n}\n\nString _$trayStateHash() => r'b03770ae2eb7fe1a73372f1128af3b38fdebb818';\n\n@ProviderFor(trayTitleState)\nconst trayTitleStateProvider = TrayTitleStateProvider._();\n\nfinal class TrayTitleStateProvider\n    extends $FunctionalProvider<TrayTitleState, TrayTitleState, TrayTitleState>\n    with $Provider<TrayTitleState> {\n  const TrayTitleStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'trayTitleStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$trayTitleStateHash();\n\n  @$internal\n  @override\n  $ProviderElement<TrayTitleState> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  TrayTitleState create(Ref ref) {\n    return trayTitleState(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(TrayTitleState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<TrayTitleState>(value),\n    );\n  }\n}\n\nString _$trayTitleStateHash() => r'5f868aaf70480b00bfdc2de18684ee646a93fd12';\n\n@ProviderFor(vpnState)\nconst vpnStateProvider = VpnStateProvider._();\n\nfinal class VpnStateProvider\n    extends $FunctionalProvider<VpnState, VpnState, VpnState>\n    with $Provider<VpnState> {\n  const VpnStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'vpnStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$vpnStateHash();\n\n  @$internal\n  @override\n  $ProviderElement<VpnState> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  VpnState create(Ref ref) {\n    return vpnState(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(VpnState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<VpnState>(value),\n    );\n  }\n}\n\nString _$vpnStateHash() => r'128ddad03ce045ad1f8204e47aec3cb6cfa29f6e';\n\n@ProviderFor(navigationState)\nconst navigationStateProvider = NavigationStateProvider._();\n\nfinal class NavigationStateProvider\n    extends\n        $FunctionalProvider<NavigationState, NavigationState, NavigationState>\n    with $Provider<NavigationState> {\n  const NavigationStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'navigationStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$navigationStateHash();\n\n  @$internal\n  @override\n  $ProviderElement<NavigationState> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  NavigationState create(Ref ref) {\n    return navigationState(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(NavigationState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<NavigationState>(value),\n    );\n  }\n}\n\nString _$navigationStateHash() => r'657dc47ecc35ba0807b58cb37e7f1baa14f6c2f9';\n\n@ProviderFor(contentWidth)\nconst contentWidthProvider = ContentWidthProvider._();\n\nfinal class ContentWidthProvider\n    extends $FunctionalProvider<double, double, double>\n    with $Provider<double> {\n  const ContentWidthProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'contentWidthProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$contentWidthHash();\n\n  @$internal\n  @override\n  $ProviderElement<double> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  double create(Ref ref) {\n    return contentWidth(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(double value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<double>(value),\n    );\n  }\n}\n\nString _$contentWidthHash() => r'4710fee8f91b08dc88520798fb6b1d4f61f090e6';\n\n@ProviderFor(dashboardState)\nconst dashboardStateProvider = DashboardStateProvider._();\n\nfinal class DashboardStateProvider\n    extends $FunctionalProvider<DashboardState, DashboardState, DashboardState>\n    with $Provider<DashboardState> {\n  const DashboardStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'dashboardStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$dashboardStateHash();\n\n  @$internal\n  @override\n  $ProviderElement<DashboardState> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  DashboardState create(Ref ref) {\n    return dashboardState(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(DashboardState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<DashboardState>(value),\n    );\n  }\n}\n\nString _$dashboardStateHash() => r'e8616e327c1b96658d917e4e4950f70ecb099d85';\n\n@ProviderFor(proxiesActionsState)\nconst proxiesActionsStateProvider = ProxiesActionsStateProvider._();\n\nfinal class ProxiesActionsStateProvider\n    extends\n        $FunctionalProvider<\n          ProxiesActionsState,\n          ProxiesActionsState,\n          ProxiesActionsState\n        >\n    with $Provider<ProxiesActionsState> {\n  const ProxiesActionsStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'proxiesActionsStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$proxiesActionsStateHash();\n\n  @$internal\n  @override\n  $ProviderElement<ProxiesActionsState> $createElement(\n    $ProviderPointer pointer,\n  ) => $ProviderElement(pointer);\n\n  @override\n  ProxiesActionsState create(Ref ref) {\n    return proxiesActionsState(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(ProxiesActionsState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<ProxiesActionsState>(value),\n    );\n  }\n}\n\nString _$proxiesActionsStateHash() =>\n    r'84f8a94706233ff5d4b8a456291a4e66c1381c62';\n\n@ProviderFor(profilesState)\nconst profilesStateProvider = ProfilesStateProvider._();\n\nfinal class ProfilesStateProvider\n    extends $FunctionalProvider<ProfilesState, ProfilesState, ProfilesState>\n    with $Provider<ProfilesState> {\n  const ProfilesStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'profilesStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$profilesStateHash();\n\n  @$internal\n  @override\n  $ProviderElement<ProfilesState> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  ProfilesState create(Ref ref) {\n    return profilesState(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(ProfilesState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<ProfilesState>(value),\n    );\n  }\n}\n\nString _$profilesStateHash() => r'8b07eeacb83b9002ba7e6283ff7a7f451a0845a6';\n\n@ProviderFor(filterGroupsState)\nconst filterGroupsStateProvider = FilterGroupsStateFamily._();\n\nfinal class FilterGroupsStateProvider\n    extends $FunctionalProvider<GroupsState, GroupsState, GroupsState>\n    with $Provider<GroupsState> {\n  const FilterGroupsStateProvider._({\n    required FilterGroupsStateFamily super.from,\n    required String super.argument,\n  }) : super(\n         retry: null,\n         name: r'filterGroupsStateProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$filterGroupsStateHash();\n\n  @override\n  String toString() {\n    return r'filterGroupsStateProvider'\n        ''\n        '($argument)';\n  }\n\n  @$internal\n  @override\n  $ProviderElement<GroupsState> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  GroupsState create(Ref ref) {\n    final argument = this.argument as String;\n    return filterGroupsState(ref, argument);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(GroupsState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<GroupsState>(value),\n    );\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is FilterGroupsStateProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$filterGroupsStateHash() => r'7de7a4603ca5ed7c39a00351af43144eb6c21404';\n\nfinal class FilterGroupsStateFamily extends $Family\n    with $FunctionalFamilyOverride<GroupsState, String> {\n  const FilterGroupsStateFamily._()\n    : super(\n        retry: null,\n        name: r'filterGroupsStateProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  FilterGroupsStateProvider call(String query) =>\n      FilterGroupsStateProvider._(argument: query, from: this);\n\n  @override\n  String toString() => r'filterGroupsStateProvider';\n}\n\n@ProviderFor(proxiesListState)\nconst proxiesListStateProvider = ProxiesListStateProvider._();\n\nfinal class ProxiesListStateProvider\n    extends\n        $FunctionalProvider<\n          ProxiesListState,\n          ProxiesListState,\n          ProxiesListState\n        >\n    with $Provider<ProxiesListState> {\n  const ProxiesListStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'proxiesListStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$proxiesListStateHash();\n\n  @$internal\n  @override\n  $ProviderElement<ProxiesListState> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  ProxiesListState create(Ref ref) {\n    return proxiesListState(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(ProxiesListState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<ProxiesListState>(value),\n    );\n  }\n}\n\nString _$proxiesListStateHash() => r'b16ad96516ece78f6cb22f558a0535000b784317';\n\n@ProviderFor(proxiesTabState)\nconst proxiesTabStateProvider = ProxiesTabStateProvider._();\n\nfinal class ProxiesTabStateProvider\n    extends\n        $FunctionalProvider<ProxiesTabState, ProxiesTabState, ProxiesTabState>\n    with $Provider<ProxiesTabState> {\n  const ProxiesTabStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'proxiesTabStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$proxiesTabStateHash();\n\n  @$internal\n  @override\n  $ProviderElement<ProxiesTabState> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  ProxiesTabState create(Ref ref) {\n    return proxiesTabState(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(ProxiesTabState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<ProxiesTabState>(value),\n    );\n  }\n}\n\nString _$proxiesTabStateHash() => r'143b106d74da618327cbac48af15078efd8cabee';\n\n@ProviderFor(isStart)\nconst isStartProvider = IsStartProvider._();\n\nfinal class IsStartProvider extends $FunctionalProvider<bool, bool, bool>\n    with $Provider<bool> {\n  const IsStartProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'isStartProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$isStartHash();\n\n  @$internal\n  @override\n  $ProviderElement<bool> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  bool create(Ref ref) {\n    return isStart(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(bool value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<bool>(value),\n    );\n  }\n}\n\nString _$isStartHash() => r'f8bcefa8515c44fbe14876a5fc6676110508e9b2';\n\n@ProviderFor(proxiesTabControllerState)\nconst proxiesTabControllerStateProvider = ProxiesTabControllerStateProvider._();\n\nfinal class ProxiesTabControllerStateProvider\n    extends\n        $FunctionalProvider<\n          VM2<List<String>, String?>,\n          VM2<List<String>, String?>,\n          VM2<List<String>, String?>\n        >\n    with $Provider<VM2<List<String>, String?>> {\n  const ProxiesTabControllerStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'proxiesTabControllerStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$proxiesTabControllerStateHash();\n\n  @$internal\n  @override\n  $ProviderElement<VM2<List<String>, String?>> $createElement(\n    $ProviderPointer pointer,\n  ) => $ProviderElement(pointer);\n\n  @override\n  VM2<List<String>, String?> create(Ref ref) {\n    return proxiesTabControllerState(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(VM2<List<String>, String?> value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<VM2<List<String>, String?>>(value),\n    );\n  }\n}\n\nString _$proxiesTabControllerStateHash() =>\n    r'd9c4eb6771262b2a989b053ce6ad94c307cf43fb';\n\n@ProviderFor(proxyGroupSelectorState)\nconst proxyGroupSelectorStateProvider = ProxyGroupSelectorStateFamily._();\n\nfinal class ProxyGroupSelectorStateProvider\n    extends\n        $FunctionalProvider<\n          ProxyGroupSelectorState,\n          ProxyGroupSelectorState,\n          ProxyGroupSelectorState\n        >\n    with $Provider<ProxyGroupSelectorState> {\n  const ProxyGroupSelectorStateProvider._({\n    required ProxyGroupSelectorStateFamily super.from,\n    required (String, String) super.argument,\n  }) : super(\n         retry: null,\n         name: r'proxyGroupSelectorStateProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$proxyGroupSelectorStateHash();\n\n  @override\n  String toString() {\n    return r'proxyGroupSelectorStateProvider'\n        ''\n        '$argument';\n  }\n\n  @$internal\n  @override\n  $ProviderElement<ProxyGroupSelectorState> $createElement(\n    $ProviderPointer pointer,\n  ) => $ProviderElement(pointer);\n\n  @override\n  ProxyGroupSelectorState create(Ref ref) {\n    final argument = this.argument as (String, String);\n    return proxyGroupSelectorState(ref, argument.$1, argument.$2);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(ProxyGroupSelectorState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<ProxyGroupSelectorState>(value),\n    );\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is ProxyGroupSelectorStateProvider &&\n        other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$proxyGroupSelectorStateHash() =>\n    r'c2a059873a38907071a2664409bacfe21b7d6c3c';\n\nfinal class ProxyGroupSelectorStateFamily extends $Family\n    with $FunctionalFamilyOverride<ProxyGroupSelectorState, (String, String)> {\n  const ProxyGroupSelectorStateFamily._()\n    : super(\n        retry: null,\n        name: r'proxyGroupSelectorStateProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  ProxyGroupSelectorStateProvider call(String groupName, String query) =>\n      ProxyGroupSelectorStateProvider._(\n        argument: (groupName, query),\n        from: this,\n      );\n\n  @override\n  String toString() => r'proxyGroupSelectorStateProvider';\n}\n\n@ProviderFor(packageListSelectorState)\nconst packageListSelectorStateProvider = PackageListSelectorStateProvider._();\n\nfinal class PackageListSelectorStateProvider\n    extends\n        $FunctionalProvider<\n          PackageListSelectorState,\n          PackageListSelectorState,\n          PackageListSelectorState\n        >\n    with $Provider<PackageListSelectorState> {\n  const PackageListSelectorStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'packageListSelectorStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$packageListSelectorStateHash();\n\n  @$internal\n  @override\n  $ProviderElement<PackageListSelectorState> $createElement(\n    $ProviderPointer pointer,\n  ) => $ProviderElement(pointer);\n\n  @override\n  PackageListSelectorState create(Ref ref) {\n    return packageListSelectorState(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(PackageListSelectorState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<PackageListSelectorState>(value),\n    );\n  }\n}\n\nString _$packageListSelectorStateHash() =>\n    r'1fa2bebbd8ee07910aa8d6e9c5d5d6128df5c13b';\n\n@ProviderFor(moreToolsSelectorState)\nconst moreToolsSelectorStateProvider = MoreToolsSelectorStateProvider._();\n\nfinal class MoreToolsSelectorStateProvider\n    extends\n        $FunctionalProvider<\n          MoreToolsSelectorState,\n          MoreToolsSelectorState,\n          MoreToolsSelectorState\n        >\n    with $Provider<MoreToolsSelectorState> {\n  const MoreToolsSelectorStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'moreToolsSelectorStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$moreToolsSelectorStateHash();\n\n  @$internal\n  @override\n  $ProviderElement<MoreToolsSelectorState> $createElement(\n    $ProviderPointer pointer,\n  ) => $ProviderElement(pointer);\n\n  @override\n  MoreToolsSelectorState create(Ref ref) {\n    return moreToolsSelectorState(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(MoreToolsSelectorState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<MoreToolsSelectorState>(value),\n    );\n  }\n}\n\nString _$moreToolsSelectorStateHash() =>\n    r'6329d92652135e2af009dddeac590b4369d2fa04';\n\n@ProviderFor(isCurrentPage)\nconst isCurrentPageProvider = IsCurrentPageFamily._();\n\nfinal class IsCurrentPageProvider extends $FunctionalProvider<bool, bool, bool>\n    with $Provider<bool> {\n  const IsCurrentPageProvider._({\n    required IsCurrentPageFamily super.from,\n    required (\n      PageLabel, {\n      bool Function(PageLabel pageLabel, ViewMode viewMode)? handler,\n    })\n    super.argument,\n  }) : super(\n         retry: null,\n         name: r'isCurrentPageProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$isCurrentPageHash();\n\n  @override\n  String toString() {\n    return r'isCurrentPageProvider'\n        ''\n        '$argument';\n  }\n\n  @$internal\n  @override\n  $ProviderElement<bool> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  bool create(Ref ref) {\n    final argument =\n        this.argument\n            as (\n              PageLabel, {\n              bool Function(PageLabel pageLabel, ViewMode viewMode)? handler,\n            });\n    return isCurrentPage(ref, argument.$1, handler: argument.handler);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(bool value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<bool>(value),\n    );\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is IsCurrentPageProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$isCurrentPageHash() => r'7c300770aef90da23109d9fcfc3bf26140d8cd08';\n\nfinal class IsCurrentPageFamily extends $Family\n    with\n        $FunctionalFamilyOverride<\n          bool,\n          (\n            PageLabel, {\n            bool Function(PageLabel pageLabel, ViewMode viewMode)? handler,\n          })\n        > {\n  const IsCurrentPageFamily._()\n    : super(\n        retry: null,\n        name: r'isCurrentPageProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  IsCurrentPageProvider call(\n    PageLabel pageLabel, {\n    bool Function(PageLabel pageLabel, ViewMode viewMode)? handler,\n  }) => IsCurrentPageProvider._(\n    argument: (pageLabel, handler: handler),\n    from: this,\n  );\n\n  @override\n  String toString() => r'isCurrentPageProvider';\n}\n\n@ProviderFor(realTestUrl)\nconst realTestUrlProvider = RealTestUrlFamily._();\n\nfinal class RealTestUrlProvider\n    extends $FunctionalProvider<String, String, String>\n    with $Provider<String> {\n  const RealTestUrlProvider._({\n    required RealTestUrlFamily super.from,\n    required String? super.argument,\n  }) : super(\n         retry: null,\n         name: r'realTestUrlProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$realTestUrlHash();\n\n  @override\n  String toString() {\n    return r'realTestUrlProvider'\n        ''\n        '($argument)';\n  }\n\n  @$internal\n  @override\n  $ProviderElement<String> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  String create(Ref ref) {\n    final argument = this.argument as String?;\n    return realTestUrl(ref, argument);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(String value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<String>(value),\n    );\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is RealTestUrlProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$realTestUrlHash() => r'6d68caa7a526b6788e3e4899d3ec8ad1c065b15e';\n\nfinal class RealTestUrlFamily extends $Family\n    with $FunctionalFamilyOverride<String, String?> {\n  const RealTestUrlFamily._()\n    : super(\n        retry: null,\n        name: r'realTestUrlProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  RealTestUrlProvider call([String? testUrl]) =>\n      RealTestUrlProvider._(argument: testUrl, from: this);\n\n  @override\n  String toString() => r'realTestUrlProvider';\n}\n\n@ProviderFor(getDelay)\nconst getDelayProvider = GetDelayFamily._();\n\nfinal class GetDelayProvider extends $FunctionalProvider<int?, int?, int?>\n    with $Provider<int?> {\n  const GetDelayProvider._({\n    required GetDelayFamily super.from,\n    required ({String proxyName, String? testUrl}) super.argument,\n  }) : super(\n         retry: null,\n         name: r'getDelayProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$getDelayHash();\n\n  @override\n  String toString() {\n    return r'getDelayProvider'\n        ''\n        '$argument';\n  }\n\n  @$internal\n  @override\n  $ProviderElement<int?> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  int? create(Ref ref) {\n    final argument = this.argument as ({String proxyName, String? testUrl});\n    return getDelay(\n      ref,\n      proxyName: argument.proxyName,\n      testUrl: argument.testUrl,\n    );\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(int? value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<int?>(value),\n    );\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is GetDelayProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$getDelayHash() => r'ee2df2db2b12d599794f77519a9ac518f42245a7';\n\nfinal class GetDelayFamily extends $Family\n    with\n        $FunctionalFamilyOverride<int?, ({String proxyName, String? testUrl})> {\n  const GetDelayFamily._()\n    : super(\n        retry: null,\n        name: r'getDelayProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  GetDelayProvider call({required String proxyName, String? testUrl}) =>\n      GetDelayProvider._(\n        argument: (proxyName: proxyName, testUrl: testUrl),\n        from: this,\n      );\n\n  @override\n  String toString() => r'getDelayProvider';\n}\n\n@ProviderFor(selectedMap)\nconst selectedMapProvider = SelectedMapProvider._();\n\nfinal class SelectedMapProvider\n    extends\n        $FunctionalProvider<\n          Map<String, String>,\n          Map<String, String>,\n          Map<String, String>\n        >\n    with $Provider<Map<String, String>> {\n  const SelectedMapProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'selectedMapProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$selectedMapHash();\n\n  @$internal\n  @override\n  $ProviderElement<Map<String, String>> $createElement(\n    $ProviderPointer pointer,\n  ) => $ProviderElement(pointer);\n\n  @override\n  Map<String, String> create(Ref ref) {\n    return selectedMap(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(Map<String, String> value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<Map<String, String>>(value),\n    );\n  }\n}\n\nString _$selectedMapHash() => r'd4438d8d87d0c7ec7d9c5d02f577cdba6ba2a785';\n\n@ProviderFor(unfoldSet)\nconst unfoldSetProvider = UnfoldSetProvider._();\n\nfinal class UnfoldSetProvider\n    extends $FunctionalProvider<Set<String>, Set<String>, Set<String>>\n    with $Provider<Set<String>> {\n  const UnfoldSetProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'unfoldSetProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$unfoldSetHash();\n\n  @$internal\n  @override\n  $ProviderElement<Set<String>> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  Set<String> create(Ref ref) {\n    return unfoldSet(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(Set<String> value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<Set<String>>(value),\n    );\n  }\n}\n\nString _$unfoldSetHash() => r'59a5b417611533069462ddf31eca080ab2f74ac9';\n\n@ProviderFor(getHotKeyAction)\nconst getHotKeyActionProvider = GetHotKeyActionFamily._();\n\nfinal class GetHotKeyActionProvider\n    extends $FunctionalProvider<HotKeyAction, HotKeyAction, HotKeyAction>\n    with $Provider<HotKeyAction> {\n  const GetHotKeyActionProvider._({\n    required GetHotKeyActionFamily super.from,\n    required HotAction super.argument,\n  }) : super(\n         retry: null,\n         name: r'getHotKeyActionProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$getHotKeyActionHash();\n\n  @override\n  String toString() {\n    return r'getHotKeyActionProvider'\n        ''\n        '($argument)';\n  }\n\n  @$internal\n  @override\n  $ProviderElement<HotKeyAction> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  HotKeyAction create(Ref ref) {\n    final argument = this.argument as HotAction;\n    return getHotKeyAction(ref, argument);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(HotKeyAction value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<HotKeyAction>(value),\n    );\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is GetHotKeyActionProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$getHotKeyActionHash() => r'4dc74ea7ffb25624ce70c7c8214806f3ef022223';\n\nfinal class GetHotKeyActionFamily extends $Family\n    with $FunctionalFamilyOverride<HotKeyAction, HotAction> {\n  const GetHotKeyActionFamily._()\n    : super(\n        retry: null,\n        name: r'getHotKeyActionProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  GetHotKeyActionProvider call(HotAction hotAction) =>\n      GetHotKeyActionProvider._(argument: hotAction, from: this);\n\n  @override\n  String toString() => r'getHotKeyActionProvider';\n}\n\n@ProviderFor(currentProfile)\nconst currentProfileProvider = CurrentProfileProvider._();\n\nfinal class CurrentProfileProvider\n    extends $FunctionalProvider<Profile?, Profile?, Profile?>\n    with $Provider<Profile?> {\n  const CurrentProfileProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'currentProfileProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$currentProfileHash();\n\n  @$internal\n  @override\n  $ProviderElement<Profile?> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  Profile? create(Ref ref) {\n    return currentProfile(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(Profile? value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<Profile?>(value),\n    );\n  }\n}\n\nString _$currentProfileHash() => r'55f3cb9570a0aa6b9e0b83a36693b69d52e753ab';\n\n@ProviderFor(getProxiesColumns)\nconst getProxiesColumnsProvider = GetProxiesColumnsProvider._();\n\nfinal class GetProxiesColumnsProvider extends $FunctionalProvider<int, int, int>\n    with $Provider<int> {\n  const GetProxiesColumnsProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'getProxiesColumnsProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$getProxiesColumnsHash();\n\n  @$internal\n  @override\n  $ProviderElement<int> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  int create(Ref ref) {\n    return getProxiesColumns(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(int value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<int>(value),\n    );\n  }\n}\n\nString _$getProxiesColumnsHash() => r'd5340932d4812727caa670065bce30450f1c4da5';\n\n@ProviderFor(realSelectedProxyState)\nconst realSelectedProxyStateProvider = RealSelectedProxyStateFamily._();\n\nfinal class RealSelectedProxyStateProvider\n    extends\n        $FunctionalProvider<\n          SelectedProxyState,\n          SelectedProxyState,\n          SelectedProxyState\n        >\n    with $Provider<SelectedProxyState> {\n  const RealSelectedProxyStateProvider._({\n    required RealSelectedProxyStateFamily super.from,\n    required String super.argument,\n  }) : super(\n         retry: null,\n         name: r'realSelectedProxyStateProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$realSelectedProxyStateHash();\n\n  @override\n  String toString() {\n    return r'realSelectedProxyStateProvider'\n        ''\n        '($argument)';\n  }\n\n  @$internal\n  @override\n  $ProviderElement<SelectedProxyState> $createElement(\n    $ProviderPointer pointer,\n  ) => $ProviderElement(pointer);\n\n  @override\n  SelectedProxyState create(Ref ref) {\n    final argument = this.argument as String;\n    return realSelectedProxyState(ref, argument);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(SelectedProxyState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<SelectedProxyState>(value),\n    );\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is RealSelectedProxyStateProvider &&\n        other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$realSelectedProxyStateHash() =>\n    r'42fa131419f0a26e30c4f5269bf020893b7f828c';\n\nfinal class RealSelectedProxyStateFamily extends $Family\n    with $FunctionalFamilyOverride<SelectedProxyState, String> {\n  const RealSelectedProxyStateFamily._()\n    : super(\n        retry: null,\n        name: r'realSelectedProxyStateProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  RealSelectedProxyStateProvider call(String proxyName) =>\n      RealSelectedProxyStateProvider._(argument: proxyName, from: this);\n\n  @override\n  String toString() => r'realSelectedProxyStateProvider';\n}\n\n@ProviderFor(getProxyName)\nconst getProxyNameProvider = GetProxyNameFamily._();\n\nfinal class GetProxyNameProvider\n    extends $FunctionalProvider<String?, String?, String?>\n    with $Provider<String?> {\n  const GetProxyNameProvider._({\n    required GetProxyNameFamily super.from,\n    required String super.argument,\n  }) : super(\n         retry: null,\n         name: r'getProxyNameProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$getProxyNameHash();\n\n  @override\n  String toString() {\n    return r'getProxyNameProvider'\n        ''\n        '($argument)';\n  }\n\n  @$internal\n  @override\n  $ProviderElement<String?> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  String? create(Ref ref) {\n    final argument = this.argument as String;\n    return getProxyName(ref, argument);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(String? value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<String?>(value),\n    );\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is GetProxyNameProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$getProxyNameHash() => r'204a477ea18c8e1eeef55b3efd3d47e45b0d2350';\n\nfinal class GetProxyNameFamily extends $Family\n    with $FunctionalFamilyOverride<String?, String> {\n  const GetProxyNameFamily._()\n    : super(\n        retry: null,\n        name: r'getProxyNameProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  GetProxyNameProvider call(String groupName) =>\n      GetProxyNameProvider._(argument: groupName, from: this);\n\n  @override\n  String toString() => r'getProxyNameProvider';\n}\n\n@ProviderFor(getSelectedProxyName)\nconst getSelectedProxyNameProvider = GetSelectedProxyNameFamily._();\n\nfinal class GetSelectedProxyNameProvider\n    extends $FunctionalProvider<String?, String?, String?>\n    with $Provider<String?> {\n  const GetSelectedProxyNameProvider._({\n    required GetSelectedProxyNameFamily super.from,\n    required String super.argument,\n  }) : super(\n         retry: null,\n         name: r'getSelectedProxyNameProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$getSelectedProxyNameHash();\n\n  @override\n  String toString() {\n    return r'getSelectedProxyNameProvider'\n        ''\n        '($argument)';\n  }\n\n  @$internal\n  @override\n  $ProviderElement<String?> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  String? create(Ref ref) {\n    final argument = this.argument as String;\n    return getSelectedProxyName(ref, argument);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(String? value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<String?>(value),\n    );\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is GetSelectedProxyNameProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$getSelectedProxyNameHash() =>\n    r'13aeae1fede234983d262d824a85c7375f9e4e78';\n\nfinal class GetSelectedProxyNameFamily extends $Family\n    with $FunctionalFamilyOverride<String?, String> {\n  const GetSelectedProxyNameFamily._()\n    : super(\n        retry: null,\n        name: r'getSelectedProxyNameProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  GetSelectedProxyNameProvider call(String groupName) =>\n      GetSelectedProxyNameProvider._(argument: groupName, from: this);\n\n  @override\n  String toString() => r'getSelectedProxyNameProvider';\n}\n\n@ProviderFor(getProxyDesc)\nconst getProxyDescProvider = GetProxyDescFamily._();\n\nfinal class GetProxyDescProvider\n    extends $FunctionalProvider<String, String, String>\n    with $Provider<String> {\n  const GetProxyDescProvider._({\n    required GetProxyDescFamily super.from,\n    required Proxy super.argument,\n  }) : super(\n         retry: null,\n         name: r'getProxyDescProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$getProxyDescHash();\n\n  @override\n  String toString() {\n    return r'getProxyDescProvider'\n        ''\n        '($argument)';\n  }\n\n  @$internal\n  @override\n  $ProviderElement<String> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  String create(Ref ref) {\n    final argument = this.argument as Proxy;\n    return getProxyDesc(ref, argument);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(String value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<String>(value),\n    );\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is GetProxyDescProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$getProxyDescHash() => r'4579b55bf7e9fbcfdf91b91619bd0320c585f23d';\n\nfinal class GetProxyDescFamily extends $Family\n    with $FunctionalFamilyOverride<String, Proxy> {\n  const GetProxyDescFamily._()\n    : super(\n        retry: null,\n        name: r'getProxyDescProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  GetProxyDescProvider call(Proxy proxy) =>\n      GetProxyDescProvider._(argument: proxy, from: this);\n\n  @override\n  String toString() => r'getProxyDescProvider';\n}\n\n@ProviderFor(checkIp)\nconst checkIpProvider = CheckIpProvider._();\n\nfinal class CheckIpProvider\n    extends\n        $FunctionalProvider<\n          VM3<bool, int, bool>,\n          VM3<bool, int, bool>,\n          VM3<bool, int, bool>\n        >\n    with $Provider<VM3<bool, int, bool>> {\n  const CheckIpProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'checkIpProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$checkIpHash();\n\n  @$internal\n  @override\n  $ProviderElement<VM3<bool, int, bool>> $createElement(\n    $ProviderPointer pointer,\n  ) => $ProviderElement(pointer);\n\n  @override\n  VM3<bool, int, bool> create(Ref ref) {\n    return checkIp(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(VM3<bool, int, bool> value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<VM3<bool, int, bool>>(value),\n    );\n  }\n}\n\nString _$checkIpHash() => r'7d8be66f0e8164bcf20c32659da2a4bea9893596';\n\n@ProviderFor(genColorScheme)\nconst genColorSchemeProvider = GenColorSchemeFamily._();\n\nfinal class GenColorSchemeProvider\n    extends $FunctionalProvider<ColorScheme, ColorScheme, ColorScheme>\n    with $Provider<ColorScheme> {\n  const GenColorSchemeProvider._({\n    required GenColorSchemeFamily super.from,\n    required (Brightness, {Color? color, bool ignoreConfig}) super.argument,\n  }) : super(\n         retry: null,\n         name: r'genColorSchemeProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$genColorSchemeHash();\n\n  @override\n  String toString() {\n    return r'genColorSchemeProvider'\n        ''\n        '$argument';\n  }\n\n  @$internal\n  @override\n  $ProviderElement<ColorScheme> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  ColorScheme create(Ref ref) {\n    final argument =\n        this.argument as (Brightness, {Color? color, bool ignoreConfig});\n    return genColorScheme(\n      ref,\n      argument.$1,\n      color: argument.color,\n      ignoreConfig: argument.ignoreConfig,\n    );\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(ColorScheme value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<ColorScheme>(value),\n    );\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is GenColorSchemeProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$genColorSchemeHash() => r'25f648db7c33ac00e7152f3d304da372a4de9fdd';\n\nfinal class GenColorSchemeFamily extends $Family\n    with\n        $FunctionalFamilyOverride<\n          ColorScheme,\n          (Brightness, {Color? color, bool ignoreConfig})\n        > {\n  const GenColorSchemeFamily._()\n    : super(\n        retry: null,\n        name: r'genColorSchemeProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  GenColorSchemeProvider call(\n    Brightness brightness, {\n    Color? color,\n    bool ignoreConfig = false,\n  }) => GenColorSchemeProvider._(\n    argument: (brightness, color: color, ignoreConfig: ignoreConfig),\n    from: this,\n  );\n\n  @override\n  String toString() => r'genColorSchemeProvider';\n}\n\n@ProviderFor(currentSetupState)\nconst currentSetupStateProvider = CurrentSetupStateProvider._();\n\nfinal class CurrentSetupStateProvider\n    extends $FunctionalProvider<SetupState?, SetupState?, SetupState?>\n    with $Provider<SetupState?> {\n  const CurrentSetupStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'currentSetupStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$currentSetupStateHash();\n\n  @$internal\n  @override\n  $ProviderElement<SetupState?> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  SetupState? create(Ref ref) {\n    return currentSetupState(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(SetupState? value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<SetupState?>(value),\n    );\n  }\n}\n\nString _$currentSetupStateHash() => r'd687b0563ea8cc8eb1ca345fdfeee3411d67ad47';\n\n@ProviderFor(currentBrightness)\nconst currentBrightnessProvider = CurrentBrightnessProvider._();\n\nfinal class CurrentBrightnessProvider\n    extends $FunctionalProvider<Brightness, Brightness, Brightness>\n    with $Provider<Brightness> {\n  const CurrentBrightnessProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'currentBrightnessProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$currentBrightnessHash();\n\n  @$internal\n  @override\n  $ProviderElement<Brightness> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  Brightness create(Ref ref) {\n    return currentBrightness(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(Brightness value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<Brightness>(value),\n    );\n  }\n}\n\nString _$currentBrightnessHash() => r'ab56c47af4fcae773c8f9f81c91800c1e1890b70';\n\n@ProviderFor(autoSetSystemDnsState)\nconst autoSetSystemDnsStateProvider = AutoSetSystemDnsStateProvider._();\n\nfinal class AutoSetSystemDnsStateProvider\n    extends\n        $FunctionalProvider<VM2<bool, bool>, VM2<bool, bool>, VM2<bool, bool>>\n    with $Provider<VM2<bool, bool>> {\n  const AutoSetSystemDnsStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'autoSetSystemDnsStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$autoSetSystemDnsStateHash();\n\n  @$internal\n  @override\n  $ProviderElement<VM2<bool, bool>> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  VM2<bool, bool> create(Ref ref) {\n    return autoSetSystemDnsState(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(VM2<bool, bool> value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<VM2<bool, bool>>(value),\n    );\n  }\n}\n\nString _$autoSetSystemDnsStateHash() =>\n    r'a8805965efe78241613bfde55f4ea8fa12a6ea32';\n\n@ProviderFor(needUpdateGroups)\nconst needUpdateGroupsProvider = NeedUpdateGroupsProvider._();\n\nfinal class NeedUpdateGroupsProvider\n    extends\n        $FunctionalProvider<\n          VM3<bool, int, ProxiesSortType>,\n          VM3<bool, int, ProxiesSortType>,\n          VM3<bool, int, ProxiesSortType>\n        >\n    with $Provider<VM3<bool, int, ProxiesSortType>> {\n  const NeedUpdateGroupsProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'needUpdateGroupsProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$needUpdateGroupsHash();\n\n  @$internal\n  @override\n  $ProviderElement<VM3<bool, int, ProxiesSortType>> $createElement(\n    $ProviderPointer pointer,\n  ) => $ProviderElement(pointer);\n\n  @override\n  VM3<bool, int, ProxiesSortType> create(Ref ref) {\n    return needUpdateGroups(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(VM3<bool, int, ProxiesSortType> value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<VM3<bool, int, ProxiesSortType>>(\n        value,\n      ),\n    );\n  }\n}\n\nString _$needUpdateGroupsHash() => r'7913b7b74caf9f2c72fd32729d52b7c6ac9258e8';\n\n@ProviderFor(sharedState)\nconst sharedStateProvider = SharedStateProvider._();\n\nfinal class SharedStateProvider\n    extends $FunctionalProvider<SharedState, SharedState, SharedState>\n    with $Provider<SharedState> {\n  const SharedStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'sharedStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$sharedStateHash();\n\n  @$internal\n  @override\n  $ProviderElement<SharedState> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  SharedState create(Ref ref) {\n    return sharedState(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(SharedState value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<SharedState>(value),\n    );\n  }\n}\n\nString _$sharedStateHash() => r'864fdf3f750fb6d1beadcb5f9226a614a9cb2caa';\n\n@ProviderFor(overlayTopOffset)\nconst overlayTopOffsetProvider = OverlayTopOffsetProvider._();\n\nfinal class OverlayTopOffsetProvider\n    extends $FunctionalProvider<double, double, double>\n    with $Provider<double> {\n  const OverlayTopOffsetProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'overlayTopOffsetProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$overlayTopOffsetHash();\n\n  @$internal\n  @override\n  $ProviderElement<double> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  double create(Ref ref) {\n    return overlayTopOffset(ref);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(double value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<double>(value),\n    );\n  }\n}\n\nString _$overlayTopOffsetHash() => r'b2462f67acbd88b7a881dfe4c6353e68ba49961d';\n\n@ProviderFor(profile)\nconst profileProvider = ProfileFamily._();\n\nfinal class ProfileProvider\n    extends $FunctionalProvider<Profile?, Profile?, Profile?>\n    with $Provider<Profile?> {\n  const ProfileProvider._({\n    required ProfileFamily super.from,\n    required int? super.argument,\n  }) : super(\n         retry: null,\n         name: r'profileProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$profileHash();\n\n  @override\n  String toString() {\n    return r'profileProvider'\n        ''\n        '($argument)';\n  }\n\n  @$internal\n  @override\n  $ProviderElement<Profile?> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  Profile? create(Ref ref) {\n    final argument = this.argument as int?;\n    return profile(ref, argument);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(Profile? value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<Profile?>(value),\n    );\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is ProfileProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$profileHash() => r'8de429dc0844c6b6155032ad3c9546231e08cead';\n\nfinal class ProfileFamily extends $Family\n    with $FunctionalFamilyOverride<Profile?, int?> {\n  const ProfileFamily._()\n    : super(\n        retry: null,\n        name: r'profileProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  ProfileProvider call(int? profileId) =>\n      ProfileProvider._(argument: profileId, from: this);\n\n  @override\n  String toString() => r'profileProvider';\n}\n\n@ProviderFor(overwriteType)\nconst overwriteTypeProvider = OverwriteTypeFamily._();\n\nfinal class OverwriteTypeProvider\n    extends $FunctionalProvider<OverwriteType, OverwriteType, OverwriteType>\n    with $Provider<OverwriteType> {\n  const OverwriteTypeProvider._({\n    required OverwriteTypeFamily super.from,\n    required int? super.argument,\n  }) : super(\n         retry: null,\n         name: r'overwriteTypeProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$overwriteTypeHash();\n\n  @override\n  String toString() {\n    return r'overwriteTypeProvider'\n        ''\n        '($argument)';\n  }\n\n  @$internal\n  @override\n  $ProviderElement<OverwriteType> $createElement($ProviderPointer pointer) =>\n      $ProviderElement(pointer);\n\n  @override\n  OverwriteType create(Ref ref) {\n    final argument = this.argument as int?;\n    return overwriteType(ref, argument);\n  }\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(OverwriteType value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<OverwriteType>(value),\n    );\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is OverwriteTypeProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$overwriteTypeHash() => r'03a8ab8ddec76935da5fa231270b65baa70fd727';\n\nfinal class OverwriteTypeFamily extends $Family\n    with $FunctionalFamilyOverride<OverwriteType, int?> {\n  const OverwriteTypeFamily._()\n    : super(\n        retry: null,\n        name: r'overwriteTypeProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  OverwriteTypeProvider call(int? profileId) =>\n      OverwriteTypeProvider._(argument: profileId, from: this);\n\n  @override\n  String toString() => r'overwriteTypeProvider';\n}\n\n@ProviderFor(script)\nconst scriptProvider = ScriptFamily._();\n\nfinal class ScriptProvider\n    extends $FunctionalProvider<AsyncValue<Script?>, Script?, FutureOr<Script?>>\n    with $FutureModifier<Script?>, $FutureProvider<Script?> {\n  const ScriptProvider._({\n    required ScriptFamily super.from,\n    required int? super.argument,\n  }) : super(\n         retry: null,\n         name: r'scriptProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$scriptHash();\n\n  @override\n  String toString() {\n    return r'scriptProvider'\n        ''\n        '($argument)';\n  }\n\n  @$internal\n  @override\n  $FutureProviderElement<Script?> $createElement($ProviderPointer pointer) =>\n      $FutureProviderElement(pointer);\n\n  @override\n  FutureOr<Script?> create(Ref ref) {\n    final argument = this.argument as int?;\n    return script(ref, argument);\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is ScriptProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$scriptHash() => r'b12a6dbe34e08cb1232afafa8b0b0f5363d28bc0';\n\nfinal class ScriptFamily extends $Family\n    with $FunctionalFamilyOverride<FutureOr<Script?>, int?> {\n  const ScriptFamily._()\n    : super(\n        retry: null,\n        name: r'scriptProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  ScriptProvider call(int? scriptId) =>\n      ScriptProvider._(argument: scriptId, from: this);\n\n  @override\n  String toString() => r'scriptProvider';\n}\n\n@ProviderFor(setupState)\nconst setupStateProvider = SetupStateFamily._();\n\nfinal class SetupStateProvider\n    extends\n        $FunctionalProvider<\n          AsyncValue<SetupState>,\n          SetupState,\n          FutureOr<SetupState>\n        >\n    with $FutureModifier<SetupState>, $FutureProvider<SetupState> {\n  const SetupStateProvider._({\n    required SetupStateFamily super.from,\n    required int? super.argument,\n  }) : super(\n         retry: null,\n         name: r'setupStateProvider',\n         isAutoDispose: true,\n         dependencies: null,\n         $allTransitiveDependencies: null,\n       );\n\n  @override\n  String debugGetCreateSourceHash() => _$setupStateHash();\n\n  @override\n  String toString() {\n    return r'setupStateProvider'\n        ''\n        '($argument)';\n  }\n\n  @$internal\n  @override\n  $FutureProviderElement<SetupState> $createElement($ProviderPointer pointer) =>\n      $FutureProviderElement(pointer);\n\n  @override\n  FutureOr<SetupState> create(Ref ref) {\n    final argument = this.argument as int?;\n    return setupState(ref, argument);\n  }\n\n  @override\n  bool operator ==(Object other) {\n    return other is SetupStateProvider && other.argument == argument;\n  }\n\n  @override\n  int get hashCode {\n    return argument.hashCode;\n  }\n}\n\nString _$setupStateHash() => r'8e0c849fa1a51ee15f8b40be94e3094182325b58';\n\nfinal class SetupStateFamily extends $Family\n    with $FunctionalFamilyOverride<FutureOr<SetupState>, int?> {\n  const SetupStateFamily._()\n    : super(\n        retry: null,\n        name: r'setupStateProvider',\n        dependencies: null,\n        $allTransitiveDependencies: null,\n        isAutoDispose: true,\n      );\n\n  SetupStateProvider call(int? profileId) =>\n      SetupStateProvider._(argument: profileId, from: this);\n\n  @override\n  String toString() => r'setupStateProvider';\n}\n\n@ProviderFor(AccessControlState)\nconst accessControlStateProvider = AccessControlStateProvider._();\n\nfinal class AccessControlStateProvider\n    extends $NotifierProvider<AccessControlState, AccessControlProps> {\n  const AccessControlStateProvider._()\n    : super(\n        from: null,\n        argument: null,\n        retry: null,\n        name: r'accessControlStateProvider',\n        isAutoDispose: true,\n        dependencies: null,\n        $allTransitiveDependencies: null,\n      );\n\n  @override\n  String debugGetCreateSourceHash() => _$accessControlStateHash();\n\n  @$internal\n  @override\n  AccessControlState create() => AccessControlState();\n\n  /// {@macro riverpod.override_with_value}\n  Override overrideWithValue(AccessControlProps value) {\n    return $ProviderOverride(\n      origin: this,\n      providerOverride: $SyncValueProvider<AccessControlProps>(value),\n    );\n  }\n}\n\nString _$accessControlStateHash() =>\n    r'08fda2e342d027c1bdd49c1ef9a13f2e775db204';\n\nabstract class _$AccessControlState extends $Notifier<AccessControlProps> {\n  AccessControlProps build();\n  @$mustCallSuper\n  @override\n  void runBuild() {\n    final created = build();\n    final ref = this.ref as $Ref<AccessControlProps, AccessControlProps>;\n    final element =\n        ref.element\n            as $ClassProviderElement<\n              AnyNotifier<AccessControlProps, AccessControlProps>,\n              AccessControlProps,\n              Object?,\n              Object?\n            >;\n    element.handleValue(ref, created);\n  }\n}\n"
  },
  {
    "path": "lib/providers/providers.dart",
    "content": "export 'app.dart';\nexport 'config.dart';\nexport 'state.dart';"
  },
  {
    "path": "lib/providers/state.dart",
    "content": "import 'package:dynamic_color/dynamic_color.dart';\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:riverpod_annotation/riverpod_annotation.dart';\n\nimport 'app.dart';\nimport 'config.dart';\nimport 'database.dart';\n\npart 'generated/state.g.dart';\n\n@riverpod\nGroupsState currentGroupsState(Ref ref) {\n  final mode = ref.watch(\n    patchClashConfigProvider.select((state) => state.mode),\n  );\n  final groups = ref.watch(\n    groupsProvider.select(\n      (state) => state.map((item) {\n        return item.copyWith(\n          now: '',\n          all: item.all.map((proxy) => proxy.copyWith(now: '')).toList(),\n        );\n      }),\n    ),\n  );\n  return GroupsState(\n    value: switch (mode) {\n      Mode.direct => [],\n      Mode.global => groups.toList(),\n      Mode.rule =>\n        groups\n            .where((item) => item.hidden == false)\n            .where((element) => element.name != GroupName.GLOBAL.name)\n            .toList(),\n    },\n  );\n}\n\n@riverpod\nNavigationItemsState navigationItemsState(Ref ref) {\n  final openLogs = ref.watch(appSettingProvider).openLogs;\n  final hasProfiles = ref.watch(\n    profilesProvider.select((state) => state.isNotEmpty),\n  );\n  final hasProxies = ref.watch(\n    currentGroupsStateProvider.select((state) => state.value.isNotEmpty),\n  );\n  final isInit = ref.watch(initProvider);\n  return NavigationItemsState(\n    value: navigation.getItems(\n      openLogs: openLogs,\n      hasProxies: !isInit ? hasProfiles : hasProxies,\n    ),\n  );\n}\n\n@riverpod\nNavigationItemsState currentNavigationItemsState(Ref ref) {\n  final viewWidth = ref.watch(viewWidthProvider);\n  final navigationItemsState = ref.watch(navigationItemsStateProvider);\n  final navigationItemMode = switch (viewWidth <= maxMobileWidth) {\n    true => NavigationItemMode.mobile,\n    false => NavigationItemMode.desktop,\n  };\n  return NavigationItemsState(\n    value: navigationItemsState.value\n        .where((element) => element.modes.contains(navigationItemMode))\n        .toList(),\n  );\n}\n\n@riverpod\nUpdateParams updateParams(Ref ref) {\n  final routeMode = ref.watch(\n    networkSettingProvider.select((state) => state.routeMode),\n  );\n  return ref.watch(\n    patchClashConfigProvider.select(\n      (state) => UpdateParams(\n        tun: state.tun.getRealTun(routeMode),\n        allowLan: state.allowLan,\n        findProcessMode: state.findProcessMode,\n        mode: state.mode,\n        logLevel: state.logLevel,\n        ipv6: state.ipv6,\n        tcpConcurrent: state.tcpConcurrent,\n        externalController: state.externalController,\n        unifiedDelay: state.unifiedDelay,\n        mixedPort: state.mixedPort,\n      ),\n    ),\n  );\n}\n\n@riverpod\nProxyState proxyState(Ref ref) {\n  final isStart = ref.watch(runTimeProvider.select((state) => state != null));\n  final vm2 = ref.watch(\n    networkSettingProvider.select(\n      (state) => VM2(state.systemProxy, state.bypassDomain),\n    ),\n  );\n  final mixedPort = ref.watch(\n    patchClashConfigProvider.select((state) => state.mixedPort),\n  );\n  return ProxyState(\n    isStart: isStart,\n    systemProxy: vm2.a,\n    bassDomain: vm2.b,\n    port: mixedPort,\n  );\n}\n\n@riverpod\nTrayState trayState(Ref ref) {\n  final isStart = ref.watch(runTimeProvider.select((state) => state != null));\n  final systemProxy = ref.watch(\n    networkSettingProvider.select((state) => state.systemProxy),\n  );\n  final clashConfigVm3 = ref.watch(\n    patchClashConfigProvider.select(\n      (state) => VM3(state.mode, state.mixedPort, state.tun.enable),\n    ),\n  );\n  final appSettingVm3 = ref.watch(\n    appSettingProvider.select(\n      (state) => VM3(state.autoLaunch, state.locale, state.showTrayTitle),\n    ),\n  );\n  final groups = ref.watch(currentGroupsStateProvider).value;\n  final brightness = ref.watch(systemBrightnessProvider);\n  final selectedMap = ref.watch(selectedMapProvider);\n\n  return TrayState(\n    mode: clashConfigVm3.a,\n    port: clashConfigVm3.b,\n    autoLaunch: appSettingVm3.a,\n    systemProxy: systemProxy,\n    tunEnable: clashConfigVm3.c,\n    isStart: isStart,\n    locale: appSettingVm3.b,\n    brightness: brightness,\n    groups: groups,\n    selectedMap: selectedMap,\n    showTrayTitle: appSettingVm3.c,\n  );\n}\n\n@riverpod\nTrayTitleState trayTitleState(Ref ref) {\n  final showTrayTitle = ref.watch(\n    appSettingProvider.select((state) => state.showTrayTitle),\n  );\n  final traffic = ref.watch(\n    trafficsProvider.select((state) => state.list.safeLast(Traffic())),\n  );\n  return TrayTitleState(showTrayTitle: showTrayTitle, traffic: traffic);\n}\n\n@riverpod\nVpnState vpnState(Ref ref) {\n  final vpnProps = ref.watch(vpnSettingProvider);\n  final stack = ref.watch(\n    patchClashConfigProvider.select((state) => state.tun.stack),\n  );\n  return VpnState(stack: stack, vpnProps: vpnProps);\n}\n\n@riverpod\nNavigationState navigationState(Ref ref) {\n  final pageLabel = ref.watch(currentPageLabelProvider);\n  final navigationItems = ref.watch(currentNavigationItemsStateProvider).value;\n  final viewMode = ref.watch(viewModeProvider);\n  final locale = ref.watch(appSettingProvider).locale;\n  final index = navigationItems.lastIndexWhere(\n    (element) => element.label == pageLabel,\n  );\n  final currentIndex = index == -1 ? 0 : index;\n  return NavigationState(\n    pageLabel: pageLabel,\n    navigationItems: navigationItems,\n    viewMode: viewMode,\n    locale: locale,\n    currentIndex: currentIndex,\n  );\n}\n\n@riverpod\ndouble contentWidth(Ref ref) {\n  final viewWidth = ref.watch(viewWidthProvider);\n  final sideWidth = ref.watch(sideWidthProvider);\n  return viewWidth - sideWidth;\n}\n\n@riverpod\nDashboardState dashboardState(Ref ref) {\n  final dashboardWidgets = ref.watch(\n    appSettingProvider.select((state) => state.dashboardWidgets),\n  );\n  final contentWidth = ref.watch(contentWidthProvider);\n  return DashboardState(\n    dashboardWidgets: dashboardWidgets,\n    contentWidth: contentWidth,\n  );\n}\n\n@riverpod\nProxiesActionsState proxiesActionsState(Ref ref) {\n  final pageLabel = ref.watch(currentPageLabelProvider);\n  final hasProviders = ref.watch(\n    providersProvider.select((state) => state.isNotEmpty),\n  );\n  final type = ref.watch(\n    proxiesStyleSettingProvider.select((state) => state.type),\n  );\n  return ProxiesActionsState(\n    pageLabel: pageLabel,\n    hasProviders: hasProviders,\n    type: type,\n  );\n}\n\n@riverpod\nProfilesState profilesState(Ref ref) {\n  final currentProfileId = ref.watch(currentProfileIdProvider);\n  final profiles = ref.watch(profilesProvider);\n  final columns = ref.watch(\n    contentWidthProvider.select((state) => utils.getProfilesColumns(state)),\n  );\n  return ProfilesState(\n    profiles: profiles,\n    currentProfileId: currentProfileId,\n    columns: columns,\n  );\n}\n\n@riverpod\nGroupsState filterGroupsState(Ref ref, String query) {\n  final currentGroups = ref.watch(currentGroupsStateProvider);\n  if (query.isEmpty) {\n    return currentGroups;\n  }\n  final lowQuery = query.toLowerCase();\n  final groups = currentGroups.value\n      .map((group) {\n        return group.copyWith(\n          all: group.all\n              .where((proxy) => proxy.name.toLowerCase().contains(lowQuery))\n              .toList(),\n        );\n      })\n      .where((group) => group.all.isNotEmpty)\n      .toList();\n  return currentGroups.copyWith(value: groups);\n}\n\n@riverpod\nProxiesListState proxiesListState(Ref ref) {\n  final query = ref.watch(queryProvider(QueryTag.proxies));\n  final currentGroups = ref.watch(filterGroupsStateProvider(query));\n  final currentUnfoldSet = ref.watch(unfoldSetProvider);\n  final cardType = ref.watch(\n    proxiesStyleSettingProvider.select((state) => state.cardType),\n  );\n\n  final columns = ref.watch(getProxiesColumnsProvider);\n  return ProxiesListState(\n    groups: currentGroups.value,\n    currentUnfoldSet: currentUnfoldSet,\n    proxyCardType: cardType,\n    columns: columns,\n  );\n}\n\n@riverpod\nProxiesTabState proxiesTabState(Ref ref) {\n  final query = ref.watch(queryProvider(QueryTag.proxies));\n  final currentGroups = ref.watch(filterGroupsStateProvider(query));\n  final currentGroupName = ref.watch(\n    currentProfileProvider.select((state) => state?.currentGroupName),\n  );\n  final cardType = ref.watch(\n    proxiesStyleSettingProvider.select((state) => state.cardType),\n  );\n  final columns = ref.watch(getProxiesColumnsProvider);\n  return ProxiesTabState(\n    groups: currentGroups.value,\n    currentGroupName: currentGroupName,\n    proxyCardType: cardType,\n    columns: columns,\n  );\n}\n\n@riverpod\nbool isStart(Ref ref) {\n  return ref.watch(runTimeProvider.select((state) => state != null));\n}\n\n@riverpod\nVM2<List<String>, String?> proxiesTabControllerState(Ref ref) {\n  return ref.watch(\n    proxiesTabStateProvider.select(\n      (state) => VM2(\n        state.groups.map((group) => group.name).toList(),\n        state.currentGroupName,\n      ),\n    ),\n  );\n}\n\n@riverpod\nProxyGroupSelectorState proxyGroupSelectorState(\n  Ref ref,\n  String groupName,\n  String query,\n) {\n  final proxiesStyle = ref.watch(proxiesStyleSettingProvider);\n  final group = ref.watch(\n    currentGroupsStateProvider.select(\n      (state) => state.value.getGroup(groupName),\n    ),\n  );\n  final sortNum = ref.watch(sortNumProvider);\n  final columns = ref.watch(getProxiesColumnsProvider);\n  final lowQuery = query.toLowerCase();\n  final proxies =\n      group?.all.where((item) {\n        return item.name.toLowerCase().contains(lowQuery);\n      }).toList() ??\n      [];\n  return ProxyGroupSelectorState(\n    testUrl: group?.testUrl,\n    proxiesSortType: proxiesStyle.sortType,\n    proxyCardType: proxiesStyle.cardType,\n    sortNum: sortNum,\n    groupType: group?.type ?? GroupType.Selector,\n    proxies: proxies,\n    columns: columns,\n  );\n}\n\n@riverpod\nPackageListSelectorState packageListSelectorState(Ref ref) {\n  final packages = ref.watch(packagesProvider);\n  final accessControlProps = ref.watch(\n    vpnSettingProvider.select((state) => state.accessControlProps),\n  );\n  return PackageListSelectorState(\n    packages: packages,\n    accessControlProps: accessControlProps,\n  );\n}\n\n@riverpod\nMoreToolsSelectorState moreToolsSelectorState(Ref ref) {\n  final viewMode = ref.watch(viewModeProvider);\n  final navigationItems = ref.watch(\n    navigationItemsStateProvider.select((state) {\n      return state.value.where((element) {\n        final isMore = element.modes.contains(NavigationItemMode.more);\n        final isDesktop = element.modes.contains(NavigationItemMode.desktop);\n        if (isMore && !isDesktop) return true;\n        if (viewMode != ViewMode.mobile || !isMore) {\n          return false;\n        }\n        return true;\n      }).toList();\n    }),\n  );\n\n  return MoreToolsSelectorState(navigationItems: navigationItems);\n}\n\n@riverpod\nbool isCurrentPage(\n  Ref ref,\n  PageLabel pageLabel, {\n  bool Function(PageLabel pageLabel, ViewMode viewMode)? handler,\n}) {\n  final currentPageLabel = ref.watch(currentPageLabelProvider);\n  if (pageLabel == currentPageLabel) {\n    return true;\n  }\n  if (handler != null) {\n    final viewMode = ref.watch(viewModeProvider);\n    return handler(currentPageLabel, viewMode);\n  }\n  return false;\n}\n\n@riverpod\nString realTestUrl(Ref ref, [String? testUrl]) {\n  final currentTestUrl = ref.watch(appSettingProvider).testUrl;\n  return testUrl.takeFirstValid([currentTestUrl]);\n}\n\n@riverpod\nint? getDelay(Ref ref, {required String proxyName, String? testUrl}) {\n  final currentTestUrl = ref.watch(realTestUrlProvider(testUrl));\n  final proxyState = ref.watch(realSelectedProxyStateProvider(proxyName));\n  final delay = ref.watch(\n    delayDataSourceProvider.select((state) {\n      final delayMap =\n          state[proxyState.testUrl.takeFirstValid([currentTestUrl])];\n      return delayMap?[proxyState.proxyName];\n    }),\n  );\n\n  return delay;\n}\n\n@riverpod\nMap<String, String> selectedMap(Ref ref) {\n  final selectedMap = ref.watch(\n    currentProfileProvider.select((state) => state?.selectedMap ?? {}),\n  );\n  return selectedMap;\n}\n\n@riverpod\nSet<String> unfoldSet(Ref ref) {\n  final unfoldSet = ref.watch(\n    currentProfileProvider.select((state) => state?.unfoldSet ?? {}),\n  );\n  return unfoldSet;\n}\n\n@riverpod\nHotKeyAction getHotKeyAction(Ref ref, HotAction hotAction) {\n  return ref.watch(\n    hotKeyActionsProvider.select((state) {\n      final index = state.indexWhere((item) => item.action == hotAction);\n      return index != -1 ? state[index] : HotKeyAction(action: hotAction);\n    }),\n  );\n}\n\n@riverpod\nProfile? currentProfile(Ref ref) {\n  final profileId = ref.watch(currentProfileIdProvider);\n  return ref.watch(\n    profilesProvider.select((state) => state.getProfile(profileId)),\n  );\n}\n\n@riverpod\nint getProxiesColumns(Ref ref) {\n  final contentWidth = ref.watch(contentWidthProvider);\n  final proxiesLayout = ref.watch(\n    proxiesStyleSettingProvider.select((state) => state.layout),\n  );\n  return utils.getProxiesColumns(contentWidth, proxiesLayout);\n}\n\n@riverpod\nSelectedProxyState realSelectedProxyState(Ref ref, String proxyName) {\n  final groups = ref.watch(groupsProvider);\n  final selectedMap = ref.watch(selectedMapProvider);\n  return computeRealSelectedProxyState(\n    proxyName,\n    groups: groups,\n    selectedMap: selectedMap,\n  );\n}\n\n@riverpod\nString? getProxyName(Ref ref, String groupName) {\n  final proxyName = ref.watch(\n    selectedMapProvider.select((state) => state[groupName]),\n  );\n  return proxyName;\n}\n\n@riverpod\nString? getSelectedProxyName(Ref ref, String groupName) {\n  final proxyName = ref.watch(getProxyNameProvider(groupName));\n  final group = ref.watch(\n    groupsProvider.select((state) => state.getGroup(groupName)),\n  );\n  return group?.getCurrentSelectedName(proxyName ?? '');\n}\n\n@riverpod\nString getProxyDesc(Ref ref, Proxy proxy) {\n  final groupTypeNamesList = GroupType.values.map((e) => e.name).toList();\n  if (!groupTypeNamesList.contains(proxy.type)) {\n    return proxy.type;\n  } else {\n    final groups = ref.watch(groupsProvider);\n    final index = groups.indexWhere((element) => element.name == proxy.name);\n    if (index == -1) return proxy.type;\n    final state = ref.watch(realSelectedProxyStateProvider(proxy.name));\n    return \"${proxy.type}(${state.proxyName.isNotEmpty ? state.proxyName : '*'})\";\n  }\n}\n\n@riverpod\nVM3<bool, int, bool> checkIp(Ref ref) {\n  final isInit = ref.watch(initProvider);\n  final checkIpNum = ref.watch(checkIpNumProvider);\n  final containsDetection = ref.watch(\n    dashboardStateProvider.select(\n      (state) =>\n          state.dashboardWidgets.contains(DashboardWidget.networkDetection),\n    ),\n  );\n  return VM3(isInit, checkIpNum, containsDetection);\n}\n\n@riverpod\nColorScheme genColorScheme(\n  Ref ref,\n  Brightness brightness, {\n  Color? color,\n  bool ignoreConfig = false,\n}) {\n  final vm2 = ref.watch(\n    themeSettingProvider.select(\n      (state) => VM2(state.primaryColor, state.schemeVariant),\n    ),\n  );\n  if (color == null && (ignoreConfig == true || vm2.a == null)) {\n    // if (globalState.corePalette != null) {\n    //   return globalState.corePalette!.toColorScheme(brightness: brightness);\n    // }\n    return ColorScheme.fromSeed(\n      seedColor:\n          globalState.corePalette\n              ?.toColorScheme(brightness: brightness)\n              .primary ??\n          globalState.accentColor,\n      brightness: brightness,\n      dynamicSchemeVariant: vm2.b,\n    );\n  }\n  return ColorScheme.fromSeed(\n    seedColor: color ?? Color(vm2.a!),\n    brightness: brightness,\n    dynamicSchemeVariant: vm2.b,\n  );\n}\n\n@riverpod\nSetupState? currentSetupState(Ref ref) {\n  final profileId = ref.watch(currentProfileIdProvider);\n  return ref.watch(setupStateProvider(profileId)).value;\n}\n\n@riverpod\nBrightness currentBrightness(Ref ref) {\n  final themeMode = ref.watch(\n    themeSettingProvider.select((state) => state.themeMode),\n  );\n  final systemBrightness = ref.watch(systemBrightnessProvider);\n  return switch (themeMode) {\n    ThemeMode.system => systemBrightness,\n    ThemeMode.light => Brightness.light,\n    ThemeMode.dark => Brightness.dark,\n  };\n}\n\n@riverpod\nVM2<bool, bool> autoSetSystemDnsState(Ref ref) {\n  final isStart = ref.watch(runTimeProvider.select((state) => state != null));\n  final realTunEnable = ref.watch(realTunEnableProvider);\n  final autoSetSystemDns = ref.watch(\n    networkSettingProvider.select((state) => state.autoSetSystemDns),\n  );\n  return VM2(isStart ? realTunEnable : false, autoSetSystemDns);\n}\n\n@riverpod\nVM3<bool, int, ProxiesSortType> needUpdateGroups(Ref ref) {\n  final isProxies = ref.watch(\n    currentPageLabelProvider.select((state) => state == PageLabel.proxies),\n  );\n  final sortNum = ref.watch(sortNumProvider);\n  final sortType = ref.watch(\n    proxiesStyleSettingProvider.select((state) => state.sortType),\n  );\n  return VM3(isProxies, sortNum, sortType);\n}\n\n@riverpod\nSharedState sharedState(Ref ref) {\n  ref.watch((appSettingProvider).select((state) => state.locale));\n  final currentProfileVM2 = ref.watch(\n    currentProfileProvider.select(\n      (state) => VM2(state?.label ?? '', state?.selectedMap ?? {}),\n    ),\n  );\n  final appSettingVM3 = ref.watch(\n    appSettingProvider.select(\n      (state) =>\n          VM3(state.onlyStatisticsProxy, state.crashlytics, state.testUrl),\n    ),\n  );\n  final bypassDomain = ref.watch(\n    networkSettingProvider.select((state) => state.bypassDomain),\n  );\n  final clashConfigVM2 = ref.watch(\n    patchClashConfigProvider.select(\n      (state) => VM2(state.tun.stack.name, state.mixedPort),\n    ),\n  );\n  final vpnSetting = ref.watch(vpnSettingProvider);\n  final currentProfileName = currentProfileVM2.a;\n  final selectedMap = currentProfileVM2.b;\n  final onlyStatisticsProxy = appSettingVM3.a;\n  final crashlytics = appSettingVM3.b;\n  final testUrl = appSettingVM3.c;\n  final stack = clashConfigVM2.a;\n  final port = clashConfigVM2.b;\n  return SharedState(\n    currentProfileName: currentProfileName,\n    onlyStatisticsProxy: onlyStatisticsProxy,\n    stopText: appLocalizations.stop,\n    crashlytics: crashlytics,\n    stopTip: appLocalizations.stopVpn,\n    startTip: appLocalizations.startVpn,\n    setupParams: SetupParams(selectedMap: selectedMap, testUrl: testUrl),\n    vpnOptions: VpnOptions(\n      enable: vpnSetting.enable,\n      stack: stack,\n      systemProxy: vpnSetting.systemProxy,\n      port: port,\n      ipv6: vpnSetting.ipv6,\n      dnsHijacking: vpnSetting.dnsHijacking,\n      accessControlProps: vpnSetting.accessControlProps,\n      allowBypass: vpnSetting.allowBypass,\n      bypassDomain: bypassDomain,\n    ),\n  );\n}\n\n@riverpod\ndouble overlayTopOffset(Ref ref) {\n  final isMobileView = ref.watch(isMobileViewProvider);\n  final version = ref.watch(versionProvider);\n  ref.watch(viewSizeProvider);\n  double top = kHeaderHeight;\n  if ((version <= 10 || !isMobileView) && system.isMacOS || !system.isDesktop) {\n    top = 0;\n  }\n  return kToolbarHeight + top;\n}\n\n@riverpod\nProfile? profile(Ref ref, int? profileId) {\n  return ref.watch(\n    profilesProvider.select((state) => state.getProfile(profileId)),\n  );\n}\n\n@riverpod\nOverwriteType overwriteType(Ref ref, int? profileId) {\n  return ref.watch(\n    profileProvider(\n      profileId,\n    ).select((state) => state?.overwriteType ?? OverwriteType.standard),\n  );\n}\n\n@riverpod\nFuture<Script?> script(Ref ref, int? scriptId) async {\n  final script = await ref.watch(\n    (scriptsProvider.future.select((state) async {\n      final scripts = await state;\n      return scripts.get(scriptId);\n    })),\n  );\n  return script;\n}\n\n@riverpod\nFuture<SetupState> setupState(Ref ref, int? profileId) async {\n  final profile = ref.watch(profileProvider(profileId));\n  final scriptId = profile?.scriptId;\n  final profileLastUpdateDate = profile?.lastUpdateDate?.millisecondsSinceEpoch;\n  final overwriteType = profile?.overwriteType ?? OverwriteType.standard;\n  final dns = ref.watch(patchClashConfigProvider.select((state) => state.dns));\n  final script = await ref.watch(scriptProvider(scriptId).future);\n  final overrideDns = ref.watch(overrideDnsProvider);\n  final List<Rule> addedRules = profileId != null\n      ? await ref.watch(addedRuleStreamProvider(profileId).future)\n      : [];\n  return SetupState(\n    profileId: profileId,\n    profileLastUpdateDate: profileLastUpdateDate,\n    overwriteType: overwriteType,\n    addedRules: addedRules,\n    script: script,\n    overrideDns: overrideDns,\n    dns: dns,\n  );\n}\n\n@riverpod\nclass AccessControlState extends _$AccessControlState\n    with AutoDisposeNotifierMixin {\n  @override\n  AccessControlProps build() => AccessControlProps();\n}\n"
  },
  {
    "path": "lib/state.dart",
    "content": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:ffi' as ffi;\n\nimport 'package:animations/animations.dart';\nimport 'package:dynamic_color/dynamic_color.dart';\nimport 'package:fl_clash/common/theme.dart';\nimport 'package:fl_clash/core/core.dart';\nimport 'package:fl_clash/plugins/service.dart';\nimport 'package:fl_clash/providers/app.dart';\nimport 'package:fl_clash/providers/config.dart';\nimport 'package:fl_clash/providers/database.dart';\nimport 'package:fl_clash/widgets/dialog.dart';\nimport 'package:fl_clash/widgets/list.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/services.dart';\nimport 'package:flutter_js/flutter_js.dart';\nimport 'package:material_color_utilities/palettes/core_palette.dart';\nimport 'package:package_info_plus/package_info_plus.dart';\nimport 'package:riverpod_annotation/riverpod_annotation.dart';\nimport 'package:url_launcher/url_launcher.dart';\n\nimport 'common/common.dart';\nimport 'database/database.dart';\nimport 'l10n/l10n.dart';\nimport 'models/models.dart';\n\ntypedef UpdateTasks = List<FutureOr Function()>;\n\nclass GlobalState {\n  static GlobalState? _instance;\n  final navigatorKey = GlobalKey<NavigatorState>();\n  Timer? timer;\n  bool isPre = true;\n  late final String coreSHA256;\n  late final PackageInfo packageInfo;\n  Function? updateCurrentDelayDebounce;\n  late Measure measure;\n  late CommonTheme theme;\n  late Color accentColor;\n  bool needInitStatus = true;\n  CorePalette? corePalette;\n  DateTime? startTime;\n  UpdateTasks tasks = [];\n  SetupState? lastSetupState;\n  VpnState? lastVpnState;\n\n  bool get isStart => startTime != null && startTime!.isBeforeNow;\n\n  GlobalState._internal();\n\n  factory GlobalState() {\n    _instance ??= GlobalState._internal();\n    return _instance!;\n  }\n\n  Future<ProviderContainer> init(int version) async {\n    coreSHA256 = const String.fromEnvironment('CORE_SHA256');\n    isPre = const String.fromEnvironment('APP_ENV') != 'stable';\n    await _initDynamicColor();\n    return await _initData(version);\n  }\n\n  Future<void> _initDynamicColor() async {\n    try {\n      corePalette = await DynamicColorPlugin.getCorePalette();\n      accentColor =\n          await DynamicColorPlugin.getAccentColor() ??\n          Color(defaultPrimaryColor);\n    } catch (_) {}\n  }\n\n  Future<ProviderContainer> _initData(int version) async {\n    final appState = AppState(\n      brightness: WidgetsBinding.instance.platformDispatcher.platformBrightness,\n      version: version,\n      viewSize: Size.zero,\n      requests: FixedList(maxLength),\n      logs: FixedList(maxLength),\n      traffics: FixedList(30),\n      totalTraffic: Traffic(),\n      systemUiOverlayStyle: const SystemUiOverlayStyle(),\n    );\n    final appStateOverrides = buildAppStateOverrides(appState);\n    packageInfo = await PackageInfo.fromPlatform();\n    final configMap = await preferences.getConfigMap();\n    final config = await migration.migrationIfNeeded(\n      configMap,\n      sync: (data) async {\n        final newConfigMap = data.configMap;\n        final config = Config.realFromJson(newConfigMap);\n        await Future.wait([\n          database.restore(data.profiles, data.scripts, data.rules, data.links),\n          preferences.saveConfig(config),\n        ]);\n        return config;\n      },\n    );\n    final configOverrides = buildConfigOverrides(config);\n    final container = ProviderContainer(\n      overrides: [...appStateOverrides, ...configOverrides],\n    );\n    final profiles = await database.profilesDao.all().get();\n    container.read(profilesProvider.notifier).setAndReorder(profiles);\n    await AppLocalizations.load(\n      utils.getLocaleForString(config.appSettingProps.locale) ??\n          WidgetsBinding.instance.platformDispatcher.locale,\n    );\n    await window?.init(version, config.windowProps);\n    return container;\n  }\n\n  Future<void> startUpdateTasks([UpdateTasks? tasks]) async {\n    if (timer != null && timer!.isActive == true) return;\n    if (tasks != null) {\n      this.tasks = tasks;\n    }\n    if (this.tasks.isEmpty) {\n      return;\n    }\n    await executorUpdateTask();\n    timer = Timer(const Duration(seconds: 1), () async {\n      startUpdateTasks();\n    });\n  }\n\n  Future<void> executorUpdateTask() async {\n    for (final task in tasks) {\n      await task();\n    }\n    timer = null;\n  }\n\n  void stopUpdateTasks() {\n    if (timer == null || timer?.isActive == false) return;\n    timer?.cancel();\n    timer = null;\n  }\n\n  Future<void> handleStart([UpdateTasks? tasks]) async {\n    startTime ??= DateTime.now();\n    await coreController.startListener();\n    await service?.start();\n    startUpdateTasks(tasks);\n  }\n\n  Future updateStartTime() async {\n    startTime = await service?.getRunTime();\n  }\n\n  Future handleStop() async {\n    startTime = null;\n    await coreController.stopListener();\n    await service?.stop();\n    stopUpdateTasks();\n  }\n\n  Future<bool?> showMessage({\n    required InlineSpan message,\n    BuildContext? context,\n    String? title,\n    String? confirmText,\n    String? cancelText,\n    bool cancelable = true,\n    bool? dismissible,\n  }) async {\n    return await showCommonDialog<bool>(\n      context: context,\n      dismissible: dismissible,\n      child: Builder(\n        builder: (context) {\n          return CommonDialog(\n            title: title ?? appLocalizations.tip,\n            actions: [\n              if (cancelable)\n                TextButton(\n                  onPressed: () {\n                    Navigator.of(context).pop(false);\n                  },\n                  child: Text(cancelText ?? appLocalizations.cancel),\n                ),\n              TextButton(\n                onPressed: () {\n                  Navigator.of(context).pop(true);\n                },\n                child: Text(confirmText ?? appLocalizations.confirm),\n              ),\n            ],\n            child: Container(\n              width: 300,\n              constraints: const BoxConstraints(maxHeight: 200),\n              child: SingleChildScrollView(\n                child: SelectableText.rich(\n                  TextSpan(\n                    style: Theme.of(context).textTheme.labelLarge,\n                    children: [message],\n                  ),\n                  style: const TextStyle(overflow: TextOverflow.visible),\n                ),\n              ),\n            ),\n          );\n        },\n      ),\n    );\n  }\n\n  Future<bool?> showAllUpdatingMessagesDialog(\n    List<UpdatingMessage> messages,\n  ) async {\n    return await showCommonDialog<bool>(\n      child: Builder(\n        builder: (context) {\n          return CommonDialog(\n            padding: EdgeInsets.zero,\n            title: appLocalizations.tip,\n            actions: [\n              TextButton(\n                onPressed: () {\n                  Navigator.of(context).pop(true);\n                },\n                child: Text(appLocalizations.confirm),\n              ),\n            ],\n            child: Container(\n              padding: EdgeInsets.symmetric(vertical: 4),\n              constraints: const BoxConstraints(maxHeight: 200),\n              child: ListView.separated(\n                itemBuilder: (_, index) {\n                  final message = messages[index];\n                  return ListItem(\n                    padding: EdgeInsets.symmetric(horizontal: 24),\n                    title: Text(message.label),\n                    subtitle: Text(message.message),\n                  );\n                },\n                itemCount: messages.length,\n                separatorBuilder: (_, _) => Divider(height: 0),\n              ),\n            ),\n          );\n        },\n      ),\n    );\n  }\n\n  Future<T?> showCommonDialog<T>({\n    required Widget child,\n    BuildContext? context,\n    bool? dismissible,\n    bool filter = true,\n  }) async {\n    return await showModal<T>(\n      useRootNavigator: false,\n      context: context ?? globalState.navigatorKey.currentContext!,\n      configuration: FadeScaleTransitionConfiguration(\n        barrierColor: Colors.black38,\n        barrierDismissible: dismissible ?? true,\n      ),\n      builder: (_) => child,\n      filter: filter ? commonFilter : null,\n    );\n  }\n\n  void showNotifier(String text, {MessageActionState? actionState}) {\n    if (text.isEmpty) {\n      return;\n    }\n    navigatorKey.currentContext?.showNotifier(text, actionState: actionState);\n  }\n\n  Future<void> openUrl(String url) async {\n    final res = await showMessage(\n      message: TextSpan(text: url),\n      title: appLocalizations.externalLink,\n      confirmText: appLocalizations.go,\n    );\n    if (res != true) {\n      return;\n    }\n    launchUrl(Uri.parse(url));\n  }\n\n  Future<Map<String, dynamic>> handleEvaluate(\n    String scriptContent,\n    Map<String, dynamic> config,\n  ) async {\n    if (config['proxy-providers'] == null) {\n      config['proxy-providers'] = {};\n    }\n    final configJs = json.encode(config);\n    final runtime = getJavascriptRuntime();\n    final res = await runtime.evaluateAsync('''\n      $scriptContent\n      main($configJs)\n    ''');\n    if (res.isError) {\n      throw res.stringResult;\n    }\n    final value = switch (res.rawResult is ffi.Pointer) {\n      true => runtime.convertValue<Map<String, dynamic>>(res),\n      false => Map<String, dynamic>.from(res.rawResult),\n    };\n    return value ?? config;\n  }\n}\n\nfinal globalState = GlobalState();\n"
  },
  {
    "path": "lib/views/about.dart",
    "content": "import 'dart:async';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/providers/config.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/list.dart';\nimport 'package:fl_clash/widgets/scaffold.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\n@immutable\nclass Contributor {\n  final String avatar;\n  final String name;\n  final String link;\n\n  const Contributor({\n    required this.avatar,\n    required this.name,\n    required this.link,\n  });\n}\n\nclass AboutView extends StatelessWidget {\n  const AboutView({super.key});\n\n  Future<void> _checkUpdate(BuildContext context) async {\n    final data = await appController.safeRun<Map<String, dynamic>?>(\n      request.checkForUpdate,\n      title: appLocalizations.checkUpdate,\n    );\n    appController.checkUpdateResultHandle(data: data, isUser: true);\n  }\n\n  List<Widget> _buildMoreSection(BuildContext context) {\n    return generateSection(\n      separated: false,\n      title: appLocalizations.more,\n      items: [\n        ListItem(\n          title: Text(appLocalizations.checkUpdate),\n          onTap: () {\n            _checkUpdate(context);\n          },\n        ),\n        ListItem(\n          title: const Text('Telegram'),\n          onTap: () {\n            globalState.openUrl('https://t.me/FlClash');\n          },\n          trailing: const Icon(Icons.launch),\n        ),\n        ListItem(\n          title: Text(appLocalizations.project),\n          onTap: () {\n            globalState.openUrl('https://github.com/$repository');\n          },\n          trailing: const Icon(Icons.launch),\n        ),\n        ListItem(\n          title: Text(appLocalizations.core),\n          onTap: () {\n            globalState.openUrl(\n              'https://github.com/chen08209/Clash.Meta/tree/FlClash',\n            );\n          },\n          trailing: const Icon(Icons.launch),\n        ),\n      ],\n    );\n  }\n\n  List<Widget> _buildContributorsSection() {\n    const contributors = [\n      Contributor(\n        avatar: 'assets/images/avatar/june2.jpg',\n        name: 'June2',\n        link: 'https://t.me/Jibadong',\n      ),\n      Contributor(\n        avatar: 'assets/images/avatar/arue.jpg',\n        name: 'Arue',\n        link: 'https://t.me/xrcm6868',\n      ),\n    ];\n    return generateSection(\n      separated: false,\n      title: appLocalizations.otherContributors,\n      items: [\n        ListItem(\n          title: SingleChildScrollView(\n            scrollDirection: Axis.horizontal,\n            child: Wrap(\n              spacing: 24,\n              children: [\n                for (final contributor in contributors)\n                  Avatar(contributor: contributor),\n              ],\n            ),\n          ),\n        ),\n      ],\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final items = [\n      ListTile(\n        title: Column(\n          crossAxisAlignment: CrossAxisAlignment.start,\n          children: [\n            Consumer(\n              builder: (_, ref, _) {\n                return _DeveloperModeDetector(\n                  child: Wrap(\n                    spacing: 16,\n                    crossAxisAlignment: WrapCrossAlignment.center,\n                    children: [\n                      Padding(\n                        padding: const EdgeInsets.all(12),\n                        child: Image.asset(\n                          'assets/images/icon.png',\n                          width: 64,\n                          height: 64,\n                        ),\n                      ),\n                      Column(\n                        crossAxisAlignment: CrossAxisAlignment.start,\n                        children: [\n                          Text(\n                            appName,\n                            style: Theme.of(context).textTheme.headlineSmall,\n                          ),\n                          Text(\n                            globalState.packageInfo.version,\n                            style: Theme.of(context).textTheme.labelLarge,\n                          ),\n                        ],\n                      ),\n                    ],\n                  ),\n                  onEnterDeveloperMode: () {\n                    ref\n                        .read(appSettingProvider.notifier)\n                        .update((state) => state.copyWith(developerMode: true));\n                    context.showNotifier(\n                      appLocalizations.developerModeEnableTip,\n                    );\n                  },\n                );\n              },\n            ),\n            const SizedBox(height: 24),\n            Text(\n              appLocalizations.desc,\n              style: Theme.of(context).textTheme.bodySmall,\n            ),\n          ],\n        ),\n      ),\n      const SizedBox(height: 12),\n      ..._buildContributorsSection(),\n      ..._buildMoreSection(context),\n    ];\n    return BaseScaffold(\n      title: appLocalizations.about,\n      body: Padding(\n        padding: kMaterialListPadding.copyWith(top: 16, bottom: 16),\n        child: generateListView(items),\n      ),\n    );\n  }\n}\n\nclass Avatar extends StatelessWidget {\n  final Contributor contributor;\n\n  const Avatar({super.key, required this.contributor});\n\n  @override\n  Widget build(BuildContext context) {\n    return GestureDetector(\n      child: Column(\n        children: [\n          SizedBox(\n            width: 36,\n            height: 36,\n            child: CircleAvatar(\n              foregroundImage: AssetImage(contributor.avatar),\n            ),\n          ),\n          const SizedBox(height: 4),\n          Text(contributor.name, style: context.textTheme.bodySmall),\n        ],\n      ),\n      onTap: () {\n        globalState.openUrl(contributor.link);\n      },\n    );\n  }\n}\n\nclass _DeveloperModeDetector extends StatefulWidget {\n  final Widget child;\n  final VoidCallback onEnterDeveloperMode;\n\n  const _DeveloperModeDetector({\n    required this.child,\n    required this.onEnterDeveloperMode,\n  });\n\n  @override\n  State<_DeveloperModeDetector> createState() => _DeveloperModeDetectorState();\n}\n\nclass _DeveloperModeDetectorState extends State<_DeveloperModeDetector> {\n  int _counter = 0;\n  Timer? _timer;\n\n  void _handleTap() {\n    _counter++;\n    if (_counter >= 5) {\n      widget.onEnterDeveloperMode();\n      _resetCounter();\n    } else {\n      _timer?.cancel();\n      _timer = Timer(Duration(seconds: 1), _resetCounter);\n    }\n  }\n\n  void _resetCounter() {\n    _counter = 0;\n    _timer?.cancel();\n    _timer = null;\n  }\n\n  @override\n  void dispose() {\n    _timer?.cancel();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return GestureDetector(onTap: _handleTap, child: widget.child);\n  }\n}\n"
  },
  {
    "path": "lib/views/access.dart",
    "content": "import 'dart:async';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/plugins/app.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/services.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass AccessView extends ConsumerStatefulWidget {\n  const AccessView({super.key});\n\n  @override\n  ConsumerState<AccessView> createState() => _AccessViewState();\n}\n\nclass _AccessViewState extends ConsumerState<AccessView> {\n  final GlobalKey<CommonScaffoldState> _scaffoldKey = GlobalKey();\n  late ScrollController _controller;\n  List<String>? _pinedList;\n  bool _isInit = false;\n  AccessControlMode? _lastMode;\n\n  final _completer = Completer();\n\n  @override\n  void initState() {\n    super.initState();\n    _controller = ScrollController();\n    _completer.complete(appController.getPackages());\n    final accessControl = ref\n        .read(vpnSettingProvider.select((state) => state.accessControlProps))\n        .copyWith();\n    WidgetsBinding.instance.addPostFrameCallback((_) {\n      ref.read(accessControlStateProvider.notifier).value = accessControl;\n      _isInit = true;\n    });\n  }\n\n  @override\n  void dispose() {\n    _controller.dispose();\n    super.dispose();\n  }\n\n  Widget _buildSelectedAllButton({\n    required bool isSelectedAll,\n    required List<String> allValueList,\n  }) {\n    onPressed() {\n      ref.read(accessControlStateProvider.notifier).update((state) {\n        final newSet = Set<String>.from(state.currentList);\n        final isSelectedAll = newSet.containsAll(allValueList);\n        if (isSelectedAll) {\n          newSet.removeAll(allValueList);\n        } else {\n          newSet.addAll(allValueList);\n        }\n        return state.copyWithNewList(newSet.toList());\n      });\n    }\n\n    return FadeRotationScaleBox(\n      alignment: Alignment.centerRight,\n      child: isSelectedAll\n          ? FloatingActionButton.extended(\n              key: ValueKey(true),\n              onPressed: onPressed,\n              label: Text(appLocalizations.cancelSelectAll),\n              icon: const Icon(Icons.deselect),\n            )\n          : FloatingActionButton.extended(\n              key: ValueKey(false),\n              tooltip: appLocalizations.selectAll,\n              onPressed: onPressed,\n              label: Text(appLocalizations.selectAll),\n              icon: const Icon(Icons.select_all),\n            ),\n    );\n  }\n\n  Future<void> _intelligentSelected() async {\n    final packageNames = ref.read(\n      packagesProvider.select((state) => state.map((item) => item.packageName)),\n    );\n    if (packageNames.isEmpty) {\n      return;\n    }\n    final selectedPackageNames =\n        (await appController.loadingRun<List<String>>(() async {\n          return await app?.getChinaPackageNames() ?? [];\n        }, tag: LoadingTag.access))?.toSet() ??\n        {};\n    final acceptList = packageNames\n        .where((item) => !selectedPackageNames.contains(item))\n        .toList();\n    final rejectList = packageNames\n        .where((item) => selectedPackageNames.contains(item))\n        .toList();\n    ref\n        .read(accessControlStateProvider.notifier)\n        .update(\n          (state) =>\n              state.copyWith(acceptList: acceptList, rejectList: rejectList),\n        );\n  }\n\n  Future<void> _handleToSetting() async {\n    await showSheet<int>(\n      context: context,\n      props: SheetProps(isScrollControlled: true),\n      builder: (_, type) {\n        return AdaptiveSheetScaffold(\n          type: type,\n          body: AccessControlPanel(),\n          title: appLocalizations.accessControlSettings,\n        );\n      },\n    );\n  }\n\n  void _handleSelected(String packageName) {\n    ref.read(accessControlStateProvider.notifier).update((state) {\n      final newSet = Set<String>.from(state.currentList)\n        ..addOrRemove(packageName);\n      return state.copyWithNewList(newSet.toList());\n    });\n  }\n\n  void _handleToggle() {\n    ref.read(accessControlStateProvider.notifier).update((state) {\n      return state.copyWith(enable: !state.enable);\n    });\n  }\n\n  void _handleSearch() {\n    _scaffoldKey.currentState?.handleToSearch();\n  }\n\n  Future<void> _handleBack() async {\n    final res = await globalState.showMessage(\n      title: appLocalizations.tip,\n      message: TextSpan(text: appLocalizations.saveChanges),\n    );\n    if (res == true) {\n      _handleSave();\n    }\n    if (mounted) {\n      Navigator.of(context).pop();\n    }\n  }\n\n  AccessControlProps _getRealAccessControlProps(\n    AccessControlProps accessControl,\n  ) {\n    final packages = ref.read(packagesProvider);\n    if (packages.isEmpty) {\n      return accessControl;\n    }\n    final viewPackageNames = packages\n        .getViewList(\n          pinedList: [],\n          sortType: accessControl.sort,\n          isFilterSystemApp: accessControl.isFilterSystemApp,\n          isFilterNonInternetApp: accessControl.isFilterNonInternetApp,\n        )\n        .map((item) => item.packageName)\n        .toSet()\n        .toList();\n    return accessControl.copyWithNewList(\n      accessControl.currentList.intersection(viewPackageNames),\n    );\n  }\n\n  void _handleSave() {\n    final accessControl = ref.read(accessControlStateProvider);\n    ref\n        .read(vpnSettingProvider.notifier)\n        .update(\n          (state) => state.copyWith(\n            accessControlProps: _getRealAccessControlProps(accessControl),\n          ),\n        );\n  }\n\n  Widget _buildConfirm() {\n    return Consumer(\n      builder: (_, ref, child) {\n        final accessControl = ref.watch(accessControlStateProvider);\n        final noSave = ref.watch(\n          vpnSettingProvider.select(\n            (state) =>\n                state.accessControlProps ==\n                _getRealAccessControlProps(accessControl),\n          ),\n        );\n        if (noSave) {\n          return SizedBox();\n        }\n        return child!;\n      },\n      child: CommonPopScope(\n        onPop: (_) {\n          _handleBack();\n          return false;\n        },\n        child: CommonMinFilledButtonTheme(\n          child: FilledButton.tonal(\n            onPressed: _handleSave,\n            child: Text(context.appLocalizations.save),\n          ),\n        ),\n      ),\n    );\n  }\n\n  Future<void> _exportToClipboard() async {\n    await appController.safeRun(() {\n      final currentList = ref.read(\n        accessControlStateProvider.select((state) => state.currentList),\n      );\n      Clipboard.setData(ClipboardData(text: currentList.join('\\n')));\n    });\n  }\n\n  Future<void> _importFormClipboard() async {\n    await appController.safeRun(() async {\n      final data = await Clipboard.getData('text/plain');\n      final text = data?.text;\n      if (text == null) return;\n      final list = text.split('\\n');\n      ref\n          .read(accessControlStateProvider.notifier)\n          .update((state) => state.copyWithNewList(list.toSet().toList()));\n    });\n  }\n\n  List<Widget> _buildActions({required bool enable}) {\n    return [\n      _buildConfirm(),\n      CommonPopupBox(\n        targetBuilder: (open) {\n          return IconButton(\n            onPressed: () {\n              open(offset: Offset(0, 0));\n            },\n            icon: Icon(Icons.more_vert),\n          );\n        },\n        popup: CommonPopupMenu(\n          items: [\n            PopupMenuItemData(\n              icon: Icons.swap_horiz,\n              label: enable\n                  ? appLocalizations.turnOff\n                  : appLocalizations.turnOn,\n              onPressed: _handleToggle,\n            ),\n            PopupMenuItemData(\n              icon: Icons.search,\n              label: appLocalizations.search,\n              onPressed: _handleSearch,\n            ),\n            PopupMenuItemData(\n              icon: Icons.tune,\n              label: appLocalizations.settings,\n              onPressed: _handleToSetting,\n            ),\n            PopupMenuItemData(\n              icon: Icons.emergency_outlined,\n              label: appLocalizations.action,\n              subItems: [\n                PopupMenuItemData(\n                  icon: Icons.auto_awesome,\n                  label: appLocalizations.intelligentSelected,\n                  onPressed: _intelligentSelected,\n                ),\n                PopupMenuItemData(\n                  icon: Icons.content_copy,\n                  label: appLocalizations.clipboardExport,\n                  onPressed: _exportToClipboard,\n                ),\n                PopupMenuItemData(\n                  icon: Icons.paste,\n                  label: appLocalizations.clipboardImport,\n                  onPressed: _importFormClipboard,\n                ),\n              ],\n            ),\n          ],\n        ),\n      ),\n    ];\n  }\n\n  Widget _buildContent({\n    required List<Package> packages,\n    required List<String> valueList,\n  }) {\n    return FutureBuilder(\n      future: _completer.future,\n      builder: (_, snapshot) {\n        if (snapshot.connectionState != ConnectionState.done) {\n          return Center(child: CircularProgressIndicator());\n        }\n        return packages.isEmpty\n            ? NullStatus(label: appLocalizations.noData)\n            : CommonScrollBar(\n                controller: _controller,\n                child: ListView.builder(\n                  controller: _controller,\n                  itemCount: packages.length,\n                  itemExtent: 72,\n                  itemBuilder: (_, index) {\n                    final package = packages[index];\n                    return PackageListItem(\n                      key: Key(package.packageName),\n                      package: package,\n                      value: valueList.contains(package.packageName),\n                      onChanged: (value) {\n                        _handleSelected(package.packageName);\n                      },\n                    );\n                  },\n                ),\n              );\n      },\n    );\n  }\n\n  Widget _buildBannerBar(AccessControlMode mode, int count) {\n    final describe = mode == AccessControlMode.acceptSelected\n        ? appLocalizations.accessControlAllowDesc\n        : appLocalizations.accessControlNotAllowDesc;\n    final textStyle = context.textTheme.labelLarge?.copyWith(\n      color: context.colorScheme.onPrimary,\n    );\n    return MaterialBanner(\n      content: Text(describe),\n      actions: [\n        Card.filled(\n          color: context.colorScheme.primary,\n          elevation: 0,\n          shape: RoundedSuperellipseBorder(\n            borderRadius: BorderRadius.circular(14),\n          ),\n          child: Padding(\n            padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),\n            child: Row(\n              mainAxisSize: MainAxisSize.min,\n              children: [\n                Text(appLocalizations.selected, style: textStyle),\n                SizedBox(width: 4),\n                Flexible(child: Text('$count', style: textStyle)),\n              ],\n            ),\n          ),\n        ),\n      ],\n    );\n  }\n\n  void _onSearch(String value) {\n    ref.read(queryProvider(QueryTag.access).notifier).value = value;\n    _pinedList = null;\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final isLoading = ref.watch(loadingProvider(LoadingTag.access));\n    final query = ref.watch(queryProvider(QueryTag.access));\n    final packages = ref.watch(packagesProvider);\n    final accessControl = ref.watch(accessControlStateProvider);\n    if (_isInit) {\n      if (_lastMode != accessControl.mode) {\n        _lastMode = accessControl.mode;\n        _pinedList = accessControl.currentList;\n      } else {\n        _pinedList ??= accessControl.currentList;\n      }\n    }\n    final viewPackages = packages\n        .getViewList(\n          pinedList: _pinedList ?? [],\n          sortType: accessControl.sort,\n          isFilterNonInternetApp: accessControl.isFilterNonInternetApp,\n          isFilterSystemApp: accessControl.isFilterSystemApp,\n        )\n        .where(\n          (package) =>\n              package.label.toLowerCase().contains(query) ||\n              package.packageName.contains(query),\n        )\n        .toList();\n    final mode = accessControl.mode;\n    final currentList = accessControl.currentList;\n    final viewPackageNameList = viewPackages.map((e) => e.packageName).toList();\n    final valueList = currentList.intersection(viewPackageNameList);\n    return CommonScaffold(\n      key: _scaffoldKey,\n      isLoading: isLoading,\n      searchState: AppBarSearchState(onSearch: _onSearch, autoAddSearch: false),\n      title: appLocalizations.appAccessControl,\n      actions: _buildActions(enable: accessControl.enable),\n      body: DisabledMask(\n        status: !accessControl.enable,\n        child: Column(\n          mainAxisSize: MainAxisSize.min,\n          children: [\n            _buildBannerBar(mode, valueList.length),\n            SizedBox(height: 8),\n            Expanded(\n              child: _buildContent(\n                packages: viewPackages,\n                valueList: valueList,\n              ),\n            ),\n          ],\n        ),\n      ),\n      floatingActionButton: _buildSelectedAllButton(\n        isSelectedAll: valueList.length == viewPackageNameList.length,\n        allValueList: viewPackageNameList,\n      ),\n    );\n  }\n}\n\nclass PackageListItem extends StatelessWidget {\n  final Package package;\n  final bool value;\n  final void Function(bool?) onChanged;\n\n  const PackageListItem({\n    super.key,\n    required this.package,\n    required this.value,\n    required this.onChanged,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return ListItem.checkbox(\n      leading: SizedBox(\n        width: 48,\n        height: 48,\n        child: FutureBuilder<ImageProvider?>(\n          future: app?.getPackageIcon(package.packageName),\n          builder: (_, snapshot) {\n            if (!snapshot.hasData && snapshot.data == null) {\n              return Container();\n            } else {\n              return Image(\n                image: snapshot.data!,\n                gaplessPlayback: true,\n                width: 48,\n                height: 48,\n              );\n            }\n          },\n        ),\n      ),\n      title: Text(\n        package.label,\n        style: const TextStyle(overflow: TextOverflow.ellipsis),\n        maxLines: 1,\n      ),\n      subtitle: Text(\n        package.packageName,\n        style: const TextStyle(overflow: TextOverflow.ellipsis),\n        maxLines: 1,\n      ),\n      delegate: CheckboxDelegate(value: value, onChanged: onChanged),\n    );\n  }\n}\n\nclass AccessControlPanel extends ConsumerStatefulWidget {\n  const AccessControlPanel({super.key});\n\n  @override\n  ConsumerState createState() => _AccessControlPanelState();\n}\n\nclass _AccessControlPanelState extends ConsumerState<AccessControlPanel> {\n  IconData _getIconWithAccessControlMode(AccessControlMode mode) {\n    return switch (mode) {\n      AccessControlMode.acceptSelected => Icons.adjust_outlined,\n      AccessControlMode.rejectSelected => Icons.block_outlined,\n    };\n  }\n\n  String _getTextWithAccessControlMode(AccessControlMode mode) {\n    return switch (mode) {\n      AccessControlMode.acceptSelected => appLocalizations.whitelistMode,\n      AccessControlMode.rejectSelected => appLocalizations.blacklistMode,\n    };\n  }\n\n  String _getTextWithAccessSortType(AccessSortType type) {\n    return switch (type) {\n      AccessSortType.none => appLocalizations.defaultText,\n      AccessSortType.name => appLocalizations.name,\n      AccessSortType.time => appLocalizations.time,\n    };\n  }\n\n  IconData _getIconWithProxiesSortType(AccessSortType type) {\n    return switch (type) {\n      AccessSortType.none => Icons.sort,\n      AccessSortType.name => Icons.sort_by_alpha,\n      AccessSortType.time => Icons.timeline,\n    };\n  }\n\n  List<Widget> _buildModeSetting() {\n    return generateSection(\n      isFirst: true,\n      title: appLocalizations.mode,\n      items: [\n        SingleChildScrollView(\n          padding: const EdgeInsets.symmetric(horizontal: 16),\n          scrollDirection: Axis.horizontal,\n          child: Consumer(\n            builder: (_, ref, _) {\n              final accessControlMode = ref.watch(\n                accessControlStateProvider.select((state) => state.mode),\n              );\n              return Wrap(\n                spacing: 16,\n                children: [\n                  for (final item in AccessControlMode.values)\n                    SettingInfoCard(\n                      Info(\n                        label: _getTextWithAccessControlMode(item),\n                        iconData: _getIconWithAccessControlMode(item),\n                      ),\n                      isSelected: accessControlMode == item,\n                      onPressed: () {\n                        ref\n                            .read(accessControlStateProvider.notifier)\n                            .update((state) => state.copyWith(mode: item));\n                      },\n                    ),\n                ],\n              );\n            },\n          ),\n        ),\n      ],\n    );\n  }\n\n  List<Widget> _buildSortSetting() {\n    return generateSection(\n      title: appLocalizations.sort,\n      items: [\n        SingleChildScrollView(\n          padding: const EdgeInsets.symmetric(horizontal: 16),\n          scrollDirection: Axis.horizontal,\n          child: Consumer(\n            builder: (_, ref, _) {\n              final accessSortType = ref.watch(\n                accessControlStateProvider.select((state) => state.sort),\n              );\n              return Wrap(\n                spacing: 16,\n                children: [\n                  for (final item in AccessSortType.values)\n                    SettingInfoCard(\n                      Info(\n                        label: _getTextWithAccessSortType(item),\n                        iconData: _getIconWithProxiesSortType(item),\n                      ),\n                      isSelected: accessSortType == item,\n                      onPressed: () {\n                        ref\n                            .read(accessControlStateProvider.notifier)\n                            .update((state) => state.copyWith(sort: item));\n                      },\n                    ),\n                ],\n              );\n            },\n          ),\n        ),\n      ],\n    );\n  }\n\n  List<Widget> _buildSourceSetting() {\n    return generateSection(\n      title: appLocalizations.source,\n      items: [\n        SingleChildScrollView(\n          padding: const EdgeInsets.symmetric(horizontal: 16),\n          scrollDirection: Axis.horizontal,\n          child: Consumer(\n            builder: (_, ref, _) {\n              final vm2 = ref.watch(\n                accessControlStateProvider.select(\n                  (state) => VM2(\n                    state.isFilterSystemApp,\n                    state.isFilterNonInternetApp,\n                  ),\n                ),\n              );\n              return Wrap(\n                spacing: 16,\n                children: [\n                  SettingTextCard(\n                    appLocalizations.systemApp,\n                    isSelected: vm2.a == false,\n                    onPressed: () {\n                      ref\n                          .read(accessControlStateProvider.notifier)\n                          .update(\n                            (state) =>\n                                state.copyWith(isFilterSystemApp: !vm2.a),\n                          );\n                    },\n                  ),\n                  SettingTextCard(\n                    appLocalizations.noNetworkApp,\n                    isSelected: vm2.b == false,\n                    onPressed: () {\n                      ref\n                          .read(accessControlStateProvider.notifier)\n                          .update(\n                            (state) =>\n                                state.copyWith(isFilterNonInternetApp: !vm2.b),\n                          );\n                    },\n                  ),\n                ],\n              );\n            },\n          ),\n        ),\n      ],\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return SingleChildScrollView(\n      child: Padding(\n        padding: const EdgeInsets.only(bottom: 32),\n        child: Column(\n          mainAxisSize: MainAxisSize.min,\n          crossAxisAlignment: CrossAxisAlignment.start,\n          children: [\n            ..._buildModeSetting(),\n            ..._buildSortSetting(),\n            ..._buildSourceSetting(),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/application_setting.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/providers/config.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:intl/intl.dart';\n\nclass CloseConnectionsItem extends ConsumerWidget {\n  const CloseConnectionsItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final closeConnections = ref.watch(\n      appSettingProvider.select((state) => state.closeConnections),\n    );\n    return ListItem.switchItem(\n      title: Text(appLocalizations.autoCloseConnections),\n      subtitle: Text(appLocalizations.autoCloseConnectionsDesc),\n      delegate: SwitchDelegate(\n        value: closeConnections,\n        onChanged: (value) async {\n          ref\n              .read(appSettingProvider.notifier)\n              .update((state) => state.copyWith(closeConnections: value));\n        },\n      ),\n    );\n  }\n}\n\nclass UsageItem extends ConsumerWidget {\n  const UsageItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final onlyStatisticsProxy = ref.watch(\n      appSettingProvider.select((state) => state.onlyStatisticsProxy),\n    );\n    return ListItem.switchItem(\n      title: Text(appLocalizations.onlyStatisticsProxy),\n      subtitle: Text(appLocalizations.onlyStatisticsProxyDesc),\n      delegate: SwitchDelegate(\n        value: onlyStatisticsProxy,\n        onChanged: (bool value) async {\n          ref\n              .read(appSettingProvider.notifier)\n              .update((state) => state.copyWith(onlyStatisticsProxy: value));\n        },\n      ),\n    );\n  }\n}\n\nclass MinimizeItem extends ConsumerWidget {\n  const MinimizeItem({super.key});\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final minimizeOnExit = ref.watch(\n      appSettingProvider.select((state) => state.minimizeOnExit),\n    );\n    return ListItem.switchItem(\n      title: Text(appLocalizations.minimizeOnExit),\n      subtitle: Text(appLocalizations.minimizeOnExitDesc),\n      delegate: SwitchDelegate(\n        value: minimizeOnExit,\n        onChanged: (bool value) {\n          ref\n              .read(appSettingProvider.notifier)\n              .update((state) => state.copyWith(minimizeOnExit: value));\n        },\n      ),\n    );\n  }\n}\n\nclass AutoLaunchItem extends ConsumerWidget {\n  const AutoLaunchItem({super.key});\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final autoLaunch = ref.watch(\n      appSettingProvider.select((state) => state.autoLaunch),\n    );\n    return ListItem.switchItem(\n      title: Text(appLocalizations.autoLaunch),\n      subtitle: Text(appLocalizations.autoLaunchDesc),\n      delegate: SwitchDelegate(\n        value: autoLaunch,\n        onChanged: (bool value) {\n          ref\n              .read(appSettingProvider.notifier)\n              .update((state) => state.copyWith(autoLaunch: value));\n        },\n      ),\n    );\n  }\n}\n\nclass SilentLaunchItem extends ConsumerWidget {\n  const SilentLaunchItem({super.key});\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final silentLaunch = ref.watch(\n      appSettingProvider.select((state) => state.silentLaunch),\n    );\n    return ListItem.switchItem(\n      title: Text(appLocalizations.silentLaunch),\n      subtitle: Text(appLocalizations.silentLaunchDesc),\n      delegate: SwitchDelegate(\n        value: silentLaunch,\n        onChanged: (bool value) {\n          ref\n              .read(appSettingProvider.notifier)\n              .update((state) => state.copyWith(silentLaunch: value));\n        },\n      ),\n    );\n  }\n}\n\nclass AutoRunItem extends ConsumerWidget {\n  const AutoRunItem({super.key});\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final autoRun = ref.watch(\n      appSettingProvider.select((state) => state.autoRun),\n    );\n    return ListItem.switchItem(\n      title: Text(appLocalizations.autoRun),\n      subtitle: Text(appLocalizations.autoRunDesc),\n      delegate: SwitchDelegate(\n        value: autoRun,\n        onChanged: (bool value) {\n          ref\n              .read(appSettingProvider.notifier)\n              .update((state) => state.copyWith(autoRun: value));\n        },\n      ),\n    );\n  }\n}\n\nclass HiddenItem extends ConsumerWidget {\n  const HiddenItem({super.key});\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final hidden = ref.watch(\n      appSettingProvider.select((state) => state.hidden),\n    );\n    return ListItem.switchItem(\n      title: Text(appLocalizations.exclude),\n      subtitle: Text(appLocalizations.excludeDesc),\n      delegate: SwitchDelegate(\n        value: hidden,\n        onChanged: (value) {\n          ref\n              .read(appSettingProvider.notifier)\n              .update((state) => state.copyWith(hidden: value));\n        },\n      ),\n    );\n  }\n}\n\nclass AnimateTabItem extends ConsumerWidget {\n  const AnimateTabItem({super.key});\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final isAnimateToPage = ref.watch(\n      appSettingProvider.select((state) => state.isAnimateToPage),\n    );\n    return ListItem.switchItem(\n      title: Text(appLocalizations.tabAnimation),\n      subtitle: Text(appLocalizations.tabAnimationDesc),\n      delegate: SwitchDelegate(\n        value: isAnimateToPage,\n        onChanged: (value) {\n          ref\n              .read(appSettingProvider.notifier)\n              .update((state) => state.copyWith(isAnimateToPage: value));\n        },\n      ),\n    );\n  }\n}\n\nclass OpenLogsItem extends ConsumerWidget {\n  const OpenLogsItem({super.key});\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final openLogs = ref.watch(\n      appSettingProvider.select((state) => state.openLogs),\n    );\n    return ListItem.switchItem(\n      title: Text(appLocalizations.logcat),\n      subtitle: Text(appLocalizations.logcatDesc),\n      delegate: SwitchDelegate(\n        value: openLogs,\n        onChanged: (bool value) {\n          ref\n              .read(appSettingProvider.notifier)\n              .update((state) => state.copyWith(openLogs: value));\n        },\n      ),\n    );\n  }\n}\n\nclass CrashlyticsItem extends ConsumerWidget {\n  const CrashlyticsItem({super.key});\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final crashlytics = ref.watch(\n      appSettingProvider.select((state) => state.crashlytics),\n    );\n    return ListItem.switchItem(\n      title: Text(appLocalizations.crashlytics),\n      subtitle: Text(appLocalizations.crashlyticsTip),\n      delegate: SwitchDelegate(\n        value: crashlytics,\n        onChanged: (bool value) {\n          ref\n              .read(appSettingProvider.notifier)\n              .update((state) => state.copyWith(crashlytics: value));\n        },\n      ),\n    );\n  }\n}\n\nclass AutoCheckUpdateItem extends ConsumerWidget {\n  const AutoCheckUpdateItem({super.key});\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final autoCheckUpdate = ref.watch(\n      appSettingProvider.select((state) => state.autoCheckUpdate),\n    );\n    return ListItem.switchItem(\n      title: Text(appLocalizations.autoCheckUpdate),\n      subtitle: Text(appLocalizations.autoCheckUpdateDesc),\n      delegate: SwitchDelegate(\n        value: autoCheckUpdate,\n        onChanged: (bool value) {\n          ref\n              .read(appSettingProvider.notifier)\n              .update((state) => state.copyWith(autoCheckUpdate: value));\n        },\n      ),\n    );\n  }\n}\n\nclass ApplicationSettingView extends StatelessWidget {\n  const ApplicationSettingView({super.key});\n\n  String getLocaleString(Locale? locale) {\n    if (locale == null) return appLocalizations.defaultText;\n    return Intl.message(locale.toString());\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    List<Widget> items = [\n      MinimizeItem(),\n      if (system.isDesktop) ...[AutoLaunchItem(), SilentLaunchItem()],\n      AutoRunItem(),\n      if (system.isAndroid) ...[HiddenItem()],\n      AnimateTabItem(),\n      OpenLogsItem(),\n      CloseConnectionsItem(),\n      UsageItem(),\n      if (system.isAndroid) CrashlyticsItem(),\n      AutoCheckUpdateItem(),\n    ];\n    return BaseScaffold(\n      title: appLocalizations.application,\n      body: ListView.separated(\n        itemBuilder: (_, index) {\n          final item = items[index];\n          return item;\n        },\n        separatorBuilder: (_, _) {\n          return const Divider(height: 0);\n        },\n        itemCount: items.length,\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/backup_and_restore.dart",
    "content": "import 'dart:io';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/common/dav_client.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/providers/app.dart';\nimport 'package:fl_clash/providers/config.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/dialog.dart';\nimport 'package:fl_clash/widgets/fade_box.dart';\nimport 'package:fl_clash/widgets/input.dart';\nimport 'package:fl_clash/widgets/list.dart';\nimport 'package:fl_clash/widgets/scaffold.dart';\nimport 'package:fl_clash/widgets/text.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:intl/intl.dart';\n\nclass BackupAndRestore extends ConsumerWidget {\n  const BackupAndRestore({super.key});\n\n  Future<void> _showAddWebDAV(DAVProps? dav) async {\n    await globalState.showCommonDialog<String>(\n      child: WebDAVFormDialog(dav: dav?.copyWith()),\n    );\n  }\n\n  Future<void> _backupOnWebDAV(DAVClient client) async {\n    final res = await appController.loadingRun<bool>(\n      () async {\n        final path = await appController.backup();\n        if (path.isEmpty) {\n          return false;\n        }\n        return await client.backup(path);\n      },\n      tag: LoadingTag.backup_restore,\n      title: appLocalizations.backup,\n    );\n    if (res != true) return;\n    globalState.showMessage(\n      title: appLocalizations.backup,\n      message: TextSpan(text: appLocalizations.backupSuccess),\n    );\n  }\n\n  Future<void> _restoreOnWebDAV(\n    BuildContext context,\n    DAVClient client,\n    RestoreOption option,\n  ) async {\n    final res = await appController.loadingRun<bool>(\n      () async {\n        await client.restore();\n        await appController.restore(option);\n        return true;\n      },\n      tag: LoadingTag.backup_restore,\n      title: appLocalizations.restore,\n    );\n    if (res != true) return;\n    globalState.showMessage(\n      title: appLocalizations.restore,\n      message: TextSpan(text: appLocalizations.restoreSuccess),\n    );\n  }\n\n  Future<void> _handleRestoreOnWebDAV(\n    BuildContext context,\n    DAVClient client,\n  ) async {\n    final restoreOption = await globalState.showCommonDialog<RestoreOption>(\n      child: const RestoreOptionsDialog(),\n    );\n    if (restoreOption == null || !context.mounted) return;\n    _restoreOnWebDAV(context, client, restoreOption);\n  }\n\n  Future<void> _backupOnLocal(BuildContext context) async {\n    final res = await appController.loadingRun<bool>(\n      () async {\n        final path = await appController.backup();\n        if (path.isEmpty) {\n          return false;\n        }\n        final value = await picker.saveFileWithPath(\n          utils.getBackupFileName(),\n          path,\n        );\n        if (value == null) return false;\n        return true;\n      },\n      title: appLocalizations.backup,\n      tag: LoadingTag.backup_restore,\n    );\n    if (res != true) return;\n    globalState.showMessage(\n      title: appLocalizations.backup,\n      message: TextSpan(text: appLocalizations.backupSuccess),\n    );\n  }\n\n  Future<void> _restoreOnLocal(RestoreOption option) async {\n    final file = await picker.pickerFile(withData: false);\n    final path = file?.path;\n    if (path == null) return;\n    await File(path).safeCopy(await appPath.backupFilePath);\n    final res = await appController.loadingRun<bool>(\n      () async {\n        await appController.restore(option);\n        return true;\n      },\n      tag: LoadingTag.backup_restore,\n      title: appLocalizations.restore,\n    );\n    if (res != true) return;\n    globalState.showMessage(\n      title: appLocalizations.restore,\n      message: TextSpan(text: appLocalizations.restoreSuccess),\n    );\n  }\n\n  Future<void> _handleRestoreOnLocal(BuildContext context) async {\n    final option = await globalState.showCommonDialog<RestoreOption>(\n      child: const RestoreOptionsDialog(),\n    );\n    if (option == null || !context.mounted) return;\n    _restoreOnLocal(option);\n  }\n\n  void _handleChange(String? value, WidgetRef ref) {\n    if (value == null) {\n      return;\n    }\n    ref\n        .read(davSettingProvider.notifier)\n        .update((state) => state?.copyWith(fileName: value));\n  }\n\n  Future<void> _handleUpdateRestoreStrategy(WidgetRef ref) async {\n    final restoreStrategy = ref.read(\n      appSettingProvider.select((state) => state.restoreStrategy),\n    );\n    final res = await globalState.showCommonDialog(\n      child: OptionsDialog<RestoreStrategy>(\n        title: appLocalizations.restoreStrategy,\n        options: RestoreStrategy.values,\n        textBuilder: (mode) => Intl.message('restoreStrategy_${mode.name}'),\n        value: restoreStrategy,\n      ),\n    );\n    if (res == null) {\n      return;\n    }\n    ref\n        .read(appSettingProvider.notifier)\n        .update((state) => state.copyWith(restoreStrategy: res));\n  }\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final dav = ref.watch(davSettingProvider);\n    final isLoading = ref.watch(loadingProvider(LoadingTag.backup_restore));\n    final client = dav != null ? DAVClient(dav) : null;\n    return CommonScaffold(\n      isLoading: isLoading,\n      title: appLocalizations.backupAndRestore,\n      body: ListView(\n        children: [\n          ListHeader(title: appLocalizations.remote),\n          if (dav == null)\n            ListItem(\n              leading: const Icon(Icons.account_box),\n              title: Text(appLocalizations.noInfo),\n              subtitle: Text(appLocalizations.pleaseBindWebDAV),\n              trailing: FilledButton.tonal(\n                onPressed: () {\n                  _showAddWebDAV(dav);\n                },\n                child: Text(appLocalizations.bind),\n              ),\n            )\n          else ...[\n            ListItem(\n              leading: const Icon(Icons.account_box),\n              title: TooltipText(\n                text: Text(\n                  dav.user,\n                  maxLines: 1,\n                  overflow: TextOverflow.ellipsis,\n                ),\n              ),\n              subtitle: Padding(\n                padding: const EdgeInsets.symmetric(vertical: 4),\n                child: Row(\n                  crossAxisAlignment: CrossAxisAlignment.center,\n                  children: [\n                    Text(appLocalizations.connectivity),\n                    FutureBuilder<bool>(\n                      future: client!.pingCompleter.future,\n                      builder: (_, snapshot) {\n                        return Center(\n                          child: FadeThroughBox(\n                            child:\n                                snapshot.connectionState != ConnectionState.done\n                                ? const SizedBox(\n                                    width: 12,\n                                    height: 12,\n                                    child: CircularProgressIndicator(\n                                      strokeWidth: 1,\n                                    ),\n                                  )\n                                : Container(\n                                    decoration: BoxDecoration(\n                                      shape: BoxShape.circle,\n                                      color: snapshot.data == true\n                                          ? Colors.green\n                                          : Colors.red,\n                                    ),\n                                    width: 12,\n                                    height: 12,\n                                  ),\n                          ),\n                        );\n                      },\n                    ),\n                  ],\n                ),\n              ),\n              trailing: FilledButton.tonal(\n                onPressed: () {\n                  _showAddWebDAV(dav);\n                },\n                child: Text(appLocalizations.edit),\n              ),\n            ),\n            const SizedBox(height: 4),\n            ListItem.input(\n              title: Text(appLocalizations.file),\n              subtitle: Text(dav.fileName),\n              delegate: InputDelegate(\n                title: appLocalizations.file,\n                value: dav.fileName,\n                resetValue: defaultDavFileName,\n                onChanged: (value) {\n                  _handleChange(value, ref);\n                },\n              ),\n            ),\n            ListItem(\n              onTap: () {\n                _backupOnWebDAV(client);\n              },\n              title: Text(appLocalizations.backup),\n              subtitle: Text(appLocalizations.remoteBackupDesc),\n            ),\n            ListItem(\n              onTap: () {\n                _handleRestoreOnWebDAV(context, client);\n              },\n              title: Text(appLocalizations.restore),\n              subtitle: Text(appLocalizations.restoreFromWebDAVDesc),\n            ),\n          ],\n          ListHeader(title: appLocalizations.local),\n          ListItem(\n            onTap: () {\n              _backupOnLocal(context);\n            },\n            title: Text(appLocalizations.backup),\n            subtitle: Text(appLocalizations.localBackupDesc),\n          ),\n          ListItem(\n            onTap: () {\n              _handleRestoreOnLocal(context);\n            },\n            title: Text(appLocalizations.restore),\n            subtitle: Text(appLocalizations.restoreFromFileDesc),\n          ),\n          ListHeader(title: appLocalizations.options),\n          Consumer(\n            builder: (_, ref, _) {\n              final restoreStrategy = ref.watch(\n                appSettingProvider.select((state) => state.restoreStrategy),\n              );\n              return ListItem(\n                onTap: () {\n                  _handleUpdateRestoreStrategy(ref);\n                },\n                title: Text(appLocalizations.restoreStrategy),\n                trailing: FilledButton(\n                  onPressed: () {\n                    _handleUpdateRestoreStrategy(ref);\n                  },\n                  child: Text(\n                    Intl.message('restoreStrategy_${restoreStrategy.name}'),\n                  ),\n                ),\n              );\n            },\n          ),\n        ],\n      ),\n    );\n  }\n}\n\nclass RestoreOptionsDialog extends StatefulWidget {\n  const RestoreOptionsDialog({super.key});\n\n  @override\n  State<RestoreOptionsDialog> createState() => _RestoreOptionsDialogState();\n}\n\nclass _RestoreOptionsDialogState extends State<RestoreOptionsDialog> {\n  void _handleOnTab(RestoreOption? option) {\n    if (option == null) return;\n    Navigator.of(context).pop(option);\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonDialog(\n      title: appLocalizations.restore,\n      padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 16),\n      child: Wrap(\n        children: [\n          ListItem(\n            onTap: () {\n              _handleOnTab(RestoreOption.onlyProfiles);\n            },\n            title: Text(appLocalizations.restoreOnlyConfig),\n          ),\n          ListItem(\n            onTap: () {\n              _handleOnTab(RestoreOption.all);\n            },\n            title: Text(appLocalizations.restoreAllData),\n          ),\n        ],\n      ),\n    );\n  }\n}\n\nclass WebDAVFormDialog extends ConsumerStatefulWidget {\n  final DAVProps? dav;\n\n  const WebDAVFormDialog({super.key, this.dav});\n\n  @override\n  ConsumerState<WebDAVFormDialog> createState() => _WebDAVFormDialogState();\n}\n\nclass _WebDAVFormDialogState extends ConsumerState<WebDAVFormDialog> {\n  late TextEditingController _uriController;\n  late TextEditingController _userController;\n  late TextEditingController _passwordController;\n  final _obscureController = ValueNotifier<bool>(true);\n  final GlobalKey<FormState> _formKey = GlobalKey<FormState>();\n\n  @override\n  void initState() {\n    super.initState();\n    _uriController = TextEditingController(text: widget.dav?.uri);\n    _userController = TextEditingController(text: widget.dav?.user);\n    _passwordController = TextEditingController(text: widget.dav?.password);\n  }\n\n  void _submit() {\n    if (!_formKey.currentState!.validate()) return;\n    ref.read(davSettingProvider.notifier).value = DAVProps(\n      uri: _uriController.text,\n      user: _userController.text,\n      password: _passwordController.text,\n    );\n    Navigator.pop(context);\n  }\n\n  void _delete() {\n    ref.read(davSettingProvider.notifier).value = null;\n    Navigator.pop(context);\n  }\n\n  @override\n  void dispose() {\n    _obscureController.dispose();\n    _uriController.dispose();\n    _userController.dispose();\n    _passwordController.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonDialog(\n      title: appLocalizations.webDAVConfiguration,\n      actions: [\n        if (widget.dav != null)\n          TextButton(onPressed: _delete, child: Text(appLocalizations.delete)),\n        TextButton(onPressed: _submit, child: Text(appLocalizations.save)),\n      ],\n      child: Form(\n        key: _formKey,\n        child: Wrap(\n          runSpacing: 16,\n          children: [\n            TextFormField(\n              controller: _uriController,\n              maxLines: 5,\n              minLines: 1,\n              decoration: InputDecoration(\n                prefixIcon: const Icon(Icons.link),\n                border: const OutlineInputBorder(),\n                labelText: appLocalizations.address,\n                helperText: appLocalizations.addressHelp,\n              ),\n              validator: (String? value) {\n                if (value == null || value.isEmpty || !value.isUrl) {\n                  return appLocalizations.addressTip;\n                }\n                return null;\n              },\n            ),\n            TextFormField(\n              controller: _userController,\n              decoration: InputDecoration(\n                prefixIcon: const Icon(Icons.account_circle),\n                border: const OutlineInputBorder(),\n                labelText: appLocalizations.account,\n              ),\n              validator: (String? value) {\n                if (value == null || value.isEmpty) {\n                  return appLocalizations.emptyTip(appLocalizations.account);\n                }\n                return null;\n              },\n            ),\n            ValueListenableBuilder(\n              valueListenable: _obscureController,\n              builder: (_, obscure, _) {\n                return TextFormField(\n                  controller: _passwordController,\n                  obscureText: obscure,\n                  decoration: InputDecoration(\n                    prefixIcon: const Icon(Icons.password),\n                    border: const OutlineInputBorder(),\n                    suffixIcon: IconButton(\n                      icon: Icon(\n                        obscure ? Icons.visibility : Icons.visibility_off,\n                      ),\n                      onPressed: () {\n                        _obscureController.value = !obscure;\n                      },\n                    ),\n                    labelText: appLocalizations.password,\n                  ),\n                  validator: (String? value) {\n                    if (value == null || value.isEmpty) {\n                      return appLocalizations.emptyTip(\n                        appLocalizations.password,\n                      );\n                    }\n                    return null;\n                  },\n                );\n              },\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/config/advanced.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/models/clash_config.dart';\nimport 'package:fl_clash/providers/config.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/views/config/dns.dart';\nimport 'package:fl_clash/views/config/network.dart';\nimport 'package:fl_clash/views/config/scripts.dart';\nimport 'package:fl_clash/widgets/list.dart';\nimport 'package:fl_clash/widgets/scaffold.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nimport 'rules.dart';\n\nclass AdvancedConfigView extends StatelessWidget {\n  const AdvancedConfigView({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    final appLocalizations = context.appLocalizations;\n    List<Widget> items = [\n      ListItem.open(\n        title: Text(appLocalizations.network),\n        subtitle: Text(appLocalizations.networkDesc),\n        leading: const Icon(Icons.vpn_key),\n        delegate: OpenDelegate(\n          blur: false,\n          widget: BaseScaffold(\n            title: appLocalizations.network,\n            body: const NetworkListView(),\n          ),\n        ),\n      ),\n      ListItem.open(\n        title: Text('DNS'),\n        subtitle: Text(appLocalizations.dnsDesc),\n        leading: const Icon(Icons.dns),\n        delegate: OpenDelegate(\n          widget: BaseScaffold(\n            title: 'DNS',\n            actions: [\n              Consumer(\n                builder: (_, ref, _) {\n                  return IconButton(\n                    onPressed: () async {\n                      final res = await globalState.showMessage(\n                        title: appLocalizations.reset,\n                        message: TextSpan(text: appLocalizations.resetTip),\n                      );\n                      if (res != true) {\n                        return;\n                      }\n                      ref\n                          .read(patchClashConfigProvider.notifier)\n                          .update((state) => state.copyWith(dns: defaultDns));\n                    },\n                    tooltip: appLocalizations.reset,\n                    icon: const Icon(Icons.replay),\n                  );\n                },\n              ),\n            ],\n            body: const DnsListView(),\n          ),\n          blur: false,\n        ),\n      ),\n      ListItem.open(\n        title: Text(appLocalizations.addedRules),\n        subtitle: Text(appLocalizations.controlGlobalAddedRules),\n        leading: const Icon(Icons.library_books),\n        delegate: OpenDelegate(widget: const AddedRulesView(), blur: false),\n      ),\n      ListItem.open(\n        title: Text(appLocalizations.script),\n        subtitle: Text(appLocalizations.overrideScript),\n        leading: const Icon(Icons.rocket, fontWeight: FontWeight.w900),\n        delegate: OpenDelegate(widget: const ScriptsView(), blur: false),\n      ),\n    ];\n    return BaseScaffold(\n      title: appLocalizations.advancedConfig,\n      body: generateListView(\n        items.separated(const Divider(height: 0)).toList(),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/config/config.dart",
    "content": "import 'package:fl_clash/common/app_localizations.dart';\nimport 'package:fl_clash/views/config/general.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\n\nclass ConfigView extends StatelessWidget {\n  const ConfigView({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return BaseScaffold(\n      title: appLocalizations.basicConfig,\n      body: generateListView(generalItems),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/config/dns.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/providers/config.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass OverrideItem extends ConsumerWidget {\n  const OverrideItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final override = ref.watch(overrideDnsProvider);\n    return ListItem.switchItem(\n      title: Text(appLocalizations.overrideDns),\n      subtitle: Text(appLocalizations.overrideDnsDesc),\n      delegate: SwitchDelegate(\n        value: override,\n        onChanged: (bool value) async {\n          ref.read(overrideDnsProvider.notifier).value = value;\n        },\n      ),\n    );\n  }\n}\n\nclass StatusItem extends ConsumerWidget {\n  const StatusItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final enable = ref.watch(\n      patchClashConfigProvider.select((state) => state.dns.enable),\n    );\n    return ListItem.switchItem(\n      title: Text(appLocalizations.status),\n      subtitle: Text(appLocalizations.statusDesc),\n      delegate: SwitchDelegate(\n        value: enable,\n        onChanged: (bool value) async {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith.dns(enable: value));\n        },\n      ),\n    );\n  }\n}\n\nclass ListenItem extends ConsumerWidget {\n  const ListenItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final listen = ref.watch(\n      patchClashConfigProvider.select((state) => state.dns.listen),\n    );\n    return ListItem.input(\n      title: Text(appLocalizations.listen),\n      subtitle: Text(listen),\n      delegate: InputDelegate(\n        title: appLocalizations.listen,\n        value: listen,\n        validator: (value) {\n          if (value == null || value.isEmpty) {\n            return appLocalizations.emptyTip(appLocalizations.listen);\n          }\n          return null;\n        },\n        onChanged: (String? value) {\n          if (value == null) {\n            return;\n          }\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith.dns(listen: value));\n        },\n      ),\n    );\n  }\n}\n\nclass PreferH3Item extends ConsumerWidget {\n  const PreferH3Item({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final preferH3 = ref.watch(\n      patchClashConfigProvider.select((state) => state.dns.preferH3),\n    );\n    return ListItem.switchItem(\n      title: const Text('PreferH3'),\n      subtitle: Text(appLocalizations.preferH3Desc),\n      delegate: SwitchDelegate(\n        value: preferH3,\n        onChanged: (bool value) async {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith.dns(preferH3: value));\n        },\n      ),\n    );\n  }\n}\n\nclass IPv6Item extends ConsumerWidget {\n  const IPv6Item({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final ipv6 = ref.watch(\n      patchClashConfigProvider.select((state) => state.dns.ipv6),\n    );\n    return ListItem.switchItem(\n      title: const Text('IPv6'),\n      delegate: SwitchDelegate(\n        value: ipv6,\n        onChanged: (bool value) async {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith.dns(ipv6: value));\n        },\n      ),\n    );\n  }\n}\n\nclass RespectRulesItem extends ConsumerWidget {\n  const RespectRulesItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final respectRules = ref.watch(\n      patchClashConfigProvider.select((state) => state.dns.respectRules),\n    );\n    return ListItem.switchItem(\n      title: Text(appLocalizations.respectRules),\n      subtitle: Text(appLocalizations.respectRulesDesc),\n      delegate: SwitchDelegate(\n        value: respectRules,\n        onChanged: (bool value) async {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith.dns(respectRules: value));\n        },\n      ),\n    );\n  }\n}\n\nclass DnsModeItem extends ConsumerWidget {\n  const DnsModeItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final enhancedMode = ref.watch(\n      patchClashConfigProvider.select((state) => state.dns.enhancedMode),\n    );\n    return ListItem<DnsMode>.options(\n      title: Text(appLocalizations.dnsMode),\n      subtitle: Text(enhancedMode.name),\n      delegate: OptionsDelegate(\n        title: appLocalizations.dnsMode,\n        options: DnsMode.values,\n        onChanged: (value) {\n          if (value == null) {\n            return;\n          }\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith.dns(enhancedMode: value));\n        },\n        textBuilder: (dnsMode) => dnsMode.name,\n        value: enhancedMode,\n      ),\n    );\n  }\n}\n\nclass FakeIpRangeItem extends ConsumerWidget {\n  const FakeIpRangeItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final fakeIpRange = ref.watch(\n      patchClashConfigProvider.select((state) => state.dns.fakeIpRange),\n    );\n    return ListItem.input(\n      title: Text(appLocalizations.fakeipRange),\n      subtitle: Text(fakeIpRange),\n      delegate: InputDelegate(\n        title: appLocalizations.fakeipRange,\n        value: fakeIpRange,\n        validator: (value) {\n          if (value == null || value.isEmpty) {\n            return appLocalizations.emptyTip(appLocalizations.fakeipRange);\n          }\n          return null;\n        },\n        onChanged: (String? value) {\n          if (value == null) {\n            return;\n          }\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith.dns(fakeIpRange: value));\n        },\n      ),\n    );\n  }\n}\n\nclass FakeIpFilterItem extends ConsumerWidget {\n  const FakeIpFilterItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final fakeIpFilter = ref.watch(\n      patchClashConfigProvider.select((state) => state.dns.fakeIpFilter),\n    );\n    return ListItem.open(\n      title: Text(appLocalizations.fakeipFilter),\n      delegate: OpenDelegate(\n        blur: false,\n        widget: ListInputPage(\n          title: appLocalizations.fakeipFilter,\n          items: fakeIpFilter,\n          titleBuilder: (item) => Text(item),\n        ),\n        onChanged: (items) {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update(\n                (state) => state.copyWith.dns(fakeIpFilter: List.from(items)),\n              );\n        },\n      ),\n    );\n  }\n}\n\nclass DefaultNameserverItem extends ConsumerWidget {\n  const DefaultNameserverItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final defaultNameserver = ref.watch(\n      patchClashConfigProvider.select((state) => state.dns.defaultNameserver),\n    );\n    return ListItem.open(\n      title: Text(appLocalizations.defaultNameserver),\n      subtitle: Text(appLocalizations.defaultNameserverDesc),\n      delegate: OpenDelegate(\n        blur: false,\n        widget: ListInputPage(\n          title: appLocalizations.defaultNameserver,\n          items: defaultNameserver,\n          titleBuilder: (item) => Text(item),\n        ),\n        onChanged: (items) {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update(\n                (state) =>\n                    state.copyWith.dns(defaultNameserver: List.from(items)),\n              );\n        },\n      ),\n    );\n  }\n}\n\nclass NameserverItem extends ConsumerWidget {\n  const NameserverItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final nameserver = ref.watch(\n      patchClashConfigProvider.select((state) => state.dns.nameserver),\n    );\n    return ListItem.open(\n      title: Text(appLocalizations.nameserver),\n      subtitle: Text(appLocalizations.nameserverDesc),\n      delegate: OpenDelegate(\n        blur: false,\n        widget: ListInputPage(\n          title: appLocalizations.nameserver,\n          items: nameserver,\n          titleBuilder: (item) => Text(item),\n        ),\n        onChanged: (items) {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update(\n                (state) => state.copyWith.dns(nameserver: List.from(items)),\n              );\n        },\n      ),\n    );\n  }\n}\n\nclass UseHostsItem extends ConsumerWidget {\n  const UseHostsItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final useHosts = ref.watch(\n      patchClashConfigProvider.select((state) => state.dns.useHosts),\n    );\n    return ListItem.switchItem(\n      title: Text(appLocalizations.useHosts),\n      delegate: SwitchDelegate(\n        value: useHosts,\n        onChanged: (bool value) async {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith.dns(useHosts: value));\n        },\n      ),\n    );\n  }\n}\n\nclass UseSystemHostsItem extends ConsumerWidget {\n  const UseSystemHostsItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final useSystemHosts = ref.watch(\n      patchClashConfigProvider.select((state) => state.dns.useSystemHosts),\n    );\n    return ListItem.switchItem(\n      title: Text(appLocalizations.useSystemHosts),\n      delegate: SwitchDelegate(\n        value: useSystemHosts,\n        onChanged: (bool value) async {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith.dns(useSystemHosts: value));\n        },\n      ),\n    );\n  }\n}\n\nclass NameserverPolicyItem extends ConsumerWidget {\n  const NameserverPolicyItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final nameserverPolicy = ref.watch(\n      patchClashConfigProvider.select((state) => state.dns.nameserverPolicy),\n    );\n    return ListItem.open(\n      title: Text(appLocalizations.nameserverPolicy),\n      subtitle: Text(appLocalizations.nameserverPolicyDesc),\n      delegate: OpenDelegate(\n        blur: false,\n        widget: MapInputPage(\n          title: appLocalizations.nameserverPolicy,\n          map: nameserverPolicy,\n          titleBuilder: (item) => Text(item.key),\n          subtitleBuilder: (item) => Text(item.value),\n        ),\n        onChanged: (value) {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith.dns(nameserverPolicy: value));\n        },\n      ),\n    );\n  }\n}\n\nclass ProxyServerNameserverItem extends ConsumerWidget {\n  const ProxyServerNameserverItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final proxyServerNameserver = ref.watch(\n      patchClashConfigProvider.select(\n        (state) => state.dns.proxyServerNameserver,\n      ),\n    );\n    return ListItem.open(\n      title: Text(appLocalizations.proxyNameserver),\n      subtitle: Text(appLocalizations.proxyNameserverDesc),\n      delegate: OpenDelegate(\n        blur: false,\n        widget: ListInputPage(\n          title: appLocalizations.proxyNameserver,\n          items: proxyServerNameserver,\n          titleBuilder: (item) => Text(item),\n        ),\n        onChanged: (items) {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update(\n                (state) =>\n                    state.copyWith.dns(proxyServerNameserver: List.from(items)),\n              );\n        },\n      ),\n    );\n  }\n}\n\nclass FallbackItem extends ConsumerWidget {\n  const FallbackItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final fallback = ref.watch(\n      patchClashConfigProvider.select((state) => state.dns.fallback),\n    );\n    return ListItem.open(\n      title: Text(appLocalizations.fallback),\n      subtitle: Text(appLocalizations.fallbackDesc),\n      delegate: OpenDelegate(\n        blur: false,\n        widget: ListInputPage(\n          title: appLocalizations.fallback,\n          items: fallback,\n          titleBuilder: (item) => Text(item),\n        ),\n        onChanged: (items) {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update(\n                (state) => state.copyWith.dns(fallback: List.from(items)),\n              );\n        },\n      ),\n    );\n  }\n}\n\nclass GeoipItem extends ConsumerWidget {\n  const GeoipItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final geoip = ref.watch(\n      patchClashConfigProvider.select(\n        (state) => state.dns.fallbackFilter.geoip,\n      ),\n    );\n    return ListItem.switchItem(\n      title: const Text('Geoip'),\n      delegate: SwitchDelegate(\n        value: geoip,\n        onChanged: (bool value) async {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update(\n                (state) => state.copyWith.dns.fallbackFilter(geoip: value),\n              );\n        },\n      ),\n    );\n  }\n}\n\nclass GeoipCodeItem extends ConsumerWidget {\n  const GeoipCodeItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final geoipCode = ref.watch(\n      patchClashConfigProvider.select(\n        (state) => state.dns.fallbackFilter.geoipCode,\n      ),\n    );\n    return ListItem.input(\n      title: Text(appLocalizations.geoipCode),\n      subtitle: Text(geoipCode),\n      delegate: InputDelegate(\n        title: appLocalizations.geoipCode,\n        value: geoipCode,\n        validator: (value) {\n          if (value == null || value.isEmpty) {\n            return appLocalizations.emptyTip(appLocalizations.geoipCode);\n          }\n          return null;\n        },\n        onChanged: (String? value) {\n          if (value == null) {\n            return;\n          }\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update(\n                (state) => state.copyWith.dns.fallbackFilter(geoipCode: value),\n              );\n        },\n      ),\n    );\n  }\n}\n\nclass GeositeItem extends ConsumerWidget {\n  const GeositeItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final geosite = ref.watch(\n      patchClashConfigProvider.select(\n        (state) => state.dns.fallbackFilter.geosite,\n      ),\n    );\n    return ListItem.open(\n      title: const Text('Geosite'),\n      delegate: OpenDelegate(\n        blur: false,\n        widget: ListInputPage(\n          title: 'Geosite',\n          items: geosite,\n          titleBuilder: (item) => Text(item),\n        ),\n        onChanged: (items) {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update(\n                (state) => state.copyWith.dns.fallbackFilter(\n                  geosite: List.from(items),\n                ),\n              );\n        },\n      ),\n    );\n  }\n}\n\nclass IpcidrItem extends ConsumerWidget {\n  const IpcidrItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final ipcidr = ref.watch(\n      patchClashConfigProvider.select(\n        (state) => state.dns.fallbackFilter.ipcidr,\n      ),\n    );\n    return ListItem.open(\n      title: Text(appLocalizations.ipcidr),\n      delegate: OpenDelegate(\n        blur: false,\n        widget: ListInputPage(\n          title: appLocalizations.ipcidr,\n          items: ipcidr,\n          titleBuilder: (item) => Text(item),\n        ),\n        onChanged: (items) {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update(\n                (state) =>\n                    state.copyWith.dns.fallbackFilter(ipcidr: List.from(items)),\n              );\n        },\n      ),\n    );\n  }\n}\n\nclass DomainItem extends ConsumerWidget {\n  const DomainItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final domain = ref.watch(\n      patchClashConfigProvider.select(\n        (state) => state.dns.fallbackFilter.domain,\n      ),\n    );\n    return ListItem.open(\n      title: Text(appLocalizations.domain),\n      delegate: OpenDelegate(\n        blur: false,\n        widget: ListInputPage(\n          title: appLocalizations.domain,\n          items: domain,\n          titleBuilder: (item) => Text(item),\n        ),\n        onChanged: (items) {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update(\n                (state) =>\n                    state.copyWith.dns.fallbackFilter(domain: List.from(items)),\n              );\n        },\n      ),\n    );\n  }\n}\n\nclass DnsOptions extends StatelessWidget {\n  const DnsOptions({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: generateSection(\n        title: appLocalizations.options,\n        items: [\n          const StatusItem(),\n          const ListenItem(),\n          const UseHostsItem(),\n          const UseSystemHostsItem(),\n          const IPv6Item(),\n          const RespectRulesItem(),\n          const PreferH3Item(),\n          const DnsModeItem(),\n          const FakeIpRangeItem(),\n          const FakeIpFilterItem(),\n          const DefaultNameserverItem(),\n          const NameserverPolicyItem(),\n          const NameserverItem(),\n          const FallbackItem(),\n          const ProxyServerNameserverItem(),\n        ],\n      ),\n    );\n  }\n}\n\nclass FallbackFilterOptions extends StatelessWidget {\n  const FallbackFilterOptions({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: generateSection(\n        title: appLocalizations.fallbackFilter,\n        items: [\n          const GeoipItem(),\n          const GeoipCodeItem(),\n          const GeositeItem(),\n          const IpcidrItem(),\n          const DomainItem(),\n        ],\n      ),\n    );\n  }\n}\n\nconst dnsItems = <Widget>[\n  OverrideItem(),\n  DnsOptions(),\n  FallbackFilterOptions(),\n];\n\nclass DnsListView extends ConsumerWidget {\n  const DnsListView({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    return generateListView(dnsItems);\n  }\n}\n"
  },
  {
    "path": "lib/views/config/general.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass LogLevelItem extends ConsumerWidget {\n  const LogLevelItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final logLevel = ref.watch(\n      patchClashConfigProvider.select((state) => state.logLevel),\n    );\n    return ListItem<LogLevel>.options(\n      leading: const Icon(Icons.info_outline),\n      title: Text(appLocalizations.logLevel),\n      subtitle: Text(logLevel.name),\n      delegate: OptionsDelegate<LogLevel>(\n        title: appLocalizations.logLevel,\n        options: LogLevel.values,\n        onChanged: (LogLevel? value) {\n          if (value == null) {\n            return;\n          }\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith(logLevel: value));\n        },\n        textBuilder: (logLevel) => logLevel.name,\n        value: logLevel,\n      ),\n    );\n  }\n}\n\nclass UaItem extends ConsumerWidget {\n  const UaItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final globalUa = ref.watch(\n      patchClashConfigProvider.select((state) => state.globalUa),\n    );\n    return ListItem<String?>.options(\n      leading: const Icon(Icons.computer_outlined),\n      title: const Text('UA'),\n      subtitle: Text(globalUa ?? appLocalizations.defaultText),\n      delegate: OptionsDelegate<String?>(\n        title: 'UA',\n        options: [null, 'clash-verge/v2.4.2', 'ClashforWindows/0.19.23'],\n        value: globalUa,\n        onChanged: (value) {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith(globalUa: value));\n        },\n        textBuilder: (ua) => ua ?? appLocalizations.defaultText,\n      ),\n    );\n  }\n}\n\nclass KeepAliveIntervalItem extends ConsumerWidget {\n  const KeepAliveIntervalItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final keepAliveInterval = ref.watch(\n      patchClashConfigProvider.select((state) => state.keepAliveInterval),\n    );\n    return ListItem.input(\n      leading: const Icon(Icons.timer_outlined),\n      title: Text(appLocalizations.keepAliveIntervalDesc),\n      subtitle: Text('$keepAliveInterval ${appLocalizations.seconds}'),\n      delegate: InputDelegate(\n        title: appLocalizations.keepAliveIntervalDesc,\n        suffixText: appLocalizations.seconds,\n        resetValue: '$defaultKeepAliveInterval',\n        value: '$keepAliveInterval',\n        validator: (String? value) {\n          if (value == null || value.isEmpty) {\n            return appLocalizations.emptyTip(appLocalizations.interval);\n          }\n          final intValue = int.tryParse(value);\n          if (intValue == null) {\n            return appLocalizations.numberTip(appLocalizations.interval);\n          }\n          return null;\n        },\n        onChanged: (String? value) {\n          if (value == null) {\n            return;\n          }\n          final intValue = int.parse(value);\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith(keepAliveInterval: intValue));\n        },\n      ),\n    );\n  }\n}\n\nclass TestUrlItem extends ConsumerWidget {\n  const TestUrlItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final testUrl = ref.watch(\n      appSettingProvider.select((state) => state.testUrl),\n    );\n    return ListItem.input(\n      leading: const Icon(Icons.timeline),\n      title: Text(appLocalizations.testUrl),\n      subtitle: Text(testUrl),\n      delegate: InputDelegate(\n        resetValue: defaultTestUrl,\n        title: appLocalizations.testUrl,\n        value: testUrl,\n        validator: (String? value) {\n          if (value == null || value.isEmpty) {\n            return appLocalizations.emptyTip(appLocalizations.testUrl);\n          }\n          if (!value.isUrl) {\n            return appLocalizations.urlTip(appLocalizations.testUrl);\n          }\n          return null;\n        },\n        onChanged: (String? value) {\n          if (value == null) {\n            return;\n          }\n          ref\n              .read(appSettingProvider.notifier)\n              .update((state) => state.copyWith(testUrl: value));\n        },\n      ),\n    );\n  }\n}\n\nclass PortItem extends ConsumerWidget {\n  const PortItem({super.key});\n\n  Future<void> handleShowPortDialog() async {\n    await globalState.showCommonDialog(child: _PortDialog());\n    // inputDelegate.onChanged(value);\n  }\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final mixedPort = ref.watch(\n      patchClashConfigProvider.select((state) => state.mixedPort),\n    );\n    return ListItem(\n      leading: const Icon(Icons.adjust_outlined),\n      title: Text(appLocalizations.port),\n      subtitle: Text('$mixedPort'),\n      onTap: () {\n        handleShowPortDialog();\n      },\n      // delegate: InputDelegate(\n      //   title: appLocalizations.port,\n      //   value: \"$mixedPort\",\n      //   validator: (String? value) {\n      //     if (value == null || value.isEmpty) {\n      //       return appLocalizations.emptyTip(appLocalizations.proxyPort);\n      //     }\n      //     final mixedPort = int.tryParse(value);\n      //     if (mixedPort == null) {\n      //       return appLocalizations.numberTip(appLocalizations.proxyPort);\n      //     }\n      //     if (mixedPort < 1024 || mixedPort > 49151) {\n      //       return appLocalizations.proxyPortTip;\n      //     }\n      //     return null;\n      //   },\n      //   onChanged: (String? value) {\n      //     if (value == null) {\n      //       return;\n      //     }\n      //     final mixedPort = int.parse(value);\n      //     ref.read(patchClashConfigProvider.notifier).update(\n      //           (state) => state.copyWith(\n      //             mixedPort: mixedPort,\n      //           ),\n      //         );\n      //   },\n      //   resetValue: \"$defaultMixedPort\",\n      // ),\n    );\n  }\n}\n\nclass HostsItem extends ConsumerWidget {\n  const HostsItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final hosts = ref.watch(\n      patchClashConfigProvider.select((state) => state.hosts),\n    );\n    return ListItem.open(\n      leading: const Icon(Icons.view_list_outlined),\n      title: const Text('Hosts'),\n      subtitle: Text(appLocalizations.hostsDesc),\n      delegate: OpenDelegate(\n        blur: false,\n        widget: MapInputPage(\n          title: 'Hosts',\n          map: hosts,\n          titleBuilder: (item) => Text(item.key),\n          subtitleBuilder: (item) => Text(item.value),\n        ),\n        onChanged: (value) {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith(hosts: value));\n        },\n      ),\n    );\n  }\n}\n\nclass Ipv6Item extends ConsumerWidget {\n  const Ipv6Item({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final ipv6 = ref.watch(\n      patchClashConfigProvider.select((state) => state.ipv6),\n    );\n    return ListItem.switchItem(\n      leading: const Icon(Icons.water_outlined),\n      title: const Text('IPv6'),\n      subtitle: Text(appLocalizations.ipv6Desc),\n      delegate: SwitchDelegate(\n        value: ipv6,\n        onChanged: (bool value) async {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith(ipv6: value));\n        },\n      ),\n    );\n  }\n}\n\nclass AppendSystemDNSItem extends ConsumerWidget {\n  const AppendSystemDNSItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final appendSystemDNS = ref.watch(\n      networkSettingProvider.select((state) => state.appendSystemDns),\n    );\n    return ListItem.switchItem(\n      leading: const Icon(Icons.dns_outlined),\n      title: Text(appLocalizations.appendSystemDns),\n      subtitle: Text(appLocalizations.appendSystemDnsTip),\n      delegate: SwitchDelegate(\n        value: appendSystemDNS,\n        onChanged: (bool value) async {\n          ref\n              .read(networkSettingProvider.notifier)\n              .update((state) => state.copyWith(appendSystemDns: value));\n        },\n      ),\n    );\n  }\n}\n\nclass AllowLanItem extends ConsumerWidget {\n  const AllowLanItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final allowLan = ref.watch(\n      patchClashConfigProvider.select((state) => state.allowLan),\n    );\n    return ListItem.switchItem(\n      leading: const Icon(Icons.device_hub),\n      title: Text(appLocalizations.allowLan),\n      subtitle: Text(appLocalizations.allowLanDesc),\n      delegate: SwitchDelegate(\n        value: allowLan,\n        onChanged: (bool value) async {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith(allowLan: value));\n        },\n      ),\n    );\n  }\n}\n\nclass UnifiedDelayItem extends ConsumerWidget {\n  const UnifiedDelayItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final unifiedDelay = ref.watch(\n      patchClashConfigProvider.select((state) => state.unifiedDelay),\n    );\n\n    return ListItem.switchItem(\n      leading: const Icon(Icons.compress_outlined),\n      title: Text(appLocalizations.unifiedDelay),\n      subtitle: Text(appLocalizations.unifiedDelayDesc),\n      delegate: SwitchDelegate(\n        value: unifiedDelay,\n        onChanged: (bool value) async {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith(unifiedDelay: value));\n        },\n      ),\n    );\n  }\n}\n\nclass FindProcessItem extends ConsumerWidget {\n  const FindProcessItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final findProcess = ref.watch(\n      patchClashConfigProvider.select(\n        (state) => state.findProcessMode == FindProcessMode.always,\n      ),\n    );\n\n    return ListItem.switchItem(\n      leading: const Icon(Icons.polymer_outlined),\n      title: Text(appLocalizations.findProcessMode),\n      subtitle: Text(appLocalizations.findProcessModeDesc),\n      delegate: SwitchDelegate(\n        value: findProcess,\n        onChanged: (bool value) async {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update(\n                (state) => state.copyWith(\n                  findProcessMode: value\n                      ? FindProcessMode.always\n                      : FindProcessMode.off,\n                ),\n              );\n        },\n      ),\n    );\n  }\n}\n\nclass TcpConcurrentItem extends ConsumerWidget {\n  const TcpConcurrentItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final tcpConcurrent = ref.watch(\n      patchClashConfigProvider.select((state) => state.tcpConcurrent),\n    );\n    return ListItem.switchItem(\n      leading: const Icon(Icons.double_arrow_outlined),\n      title: Text(appLocalizations.tcpConcurrent),\n      subtitle: Text(appLocalizations.tcpConcurrentDesc),\n      delegate: SwitchDelegate(\n        value: tcpConcurrent,\n        onChanged: (value) async {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith(tcpConcurrent: value));\n        },\n      ),\n    );\n  }\n}\n\nclass GeodataLoaderItem extends ConsumerWidget {\n  const GeodataLoaderItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final isMemconservative = ref.watch(\n      patchClashConfigProvider.select(\n        (state) => state.geodataLoader == GeodataLoader.memconservative,\n      ),\n    );\n    return ListItem.switchItem(\n      leading: const Icon(Icons.memory),\n      title: Text(appLocalizations.geodataLoader),\n      subtitle: Text(appLocalizations.geodataLoaderDesc),\n      delegate: SwitchDelegate(\n        value: isMemconservative,\n        onChanged: (bool value) async {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update(\n                (state) => state.copyWith(\n                  geodataLoader: value\n                      ? GeodataLoader.memconservative\n                      : GeodataLoader.standard,\n                ),\n              );\n        },\n      ),\n    );\n  }\n}\n\nclass ExternalControllerItem extends ConsumerWidget {\n  const ExternalControllerItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final hasExternalController = ref.watch(\n      patchClashConfigProvider.select(\n        (state) => state.externalController == ExternalControllerStatus.open,\n      ),\n    );\n    return ListItem.switchItem(\n      leading: const Icon(Icons.api_outlined),\n      title: Text(appLocalizations.externalController),\n      subtitle: Text(appLocalizations.externalControllerDesc),\n      delegate: SwitchDelegate(\n        value: hasExternalController,\n        onChanged: (bool value) async {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update(\n                (state) => state.copyWith(\n                  externalController: value\n                      ? ExternalControllerStatus.open\n                      : ExternalControllerStatus.close,\n                ),\n              );\n        },\n      ),\n    );\n  }\n}\n\nfinal generalItems = <Widget>[\n  LogLevelItem(),\n  UaItem(),\n  if (system.isDesktop) KeepAliveIntervalItem(),\n  TestUrlItem(),\n  PortItem(),\n  HostsItem(),\n  Ipv6Item(),\n  AllowLanItem(),\n  UnifiedDelayItem(),\n  AppendSystemDNSItem(),\n  FindProcessItem(),\n  TcpConcurrentItem(),\n  GeodataLoaderItem(),\n  ExternalControllerItem(),\n].separated(const Divider(height: 0)).toList();\n\nclass _PortDialog extends ConsumerStatefulWidget {\n  const _PortDialog();\n\n  @override\n  ConsumerState<_PortDialog> createState() => _PortDialogState();\n}\n\nclass _PortDialogState extends ConsumerState<_PortDialog> {\n  final _formKey = GlobalKey<FormState>();\n  bool _isMore = false;\n\n  late final TextEditingController _mixedPortController;\n  late final TextEditingController _portController;\n  late final TextEditingController _socksPortController;\n  late final TextEditingController _redirPortController;\n  late final TextEditingController _tProxyPortController;\n\n  @override\n  void initState() {\n    super.initState();\n    final vm5 = ref.read(\n      patchClashConfigProvider.select((state) {\n        return VM5(\n          state.mixedPort,\n          state.port,\n          state.socksPort,\n          state.redirPort,\n          state.tproxyPort,\n        );\n      }),\n    );\n    _mixedPortController = TextEditingController(text: vm5.a.toString());\n    _portController = TextEditingController(text: vm5.b.toString());\n    _socksPortController = TextEditingController(text: vm5.c.toString());\n    _redirPortController = TextEditingController(text: vm5.d.toString());\n    _tProxyPortController = TextEditingController(text: vm5.e.toString());\n  }\n\n  Future<void> _handleReset() async {\n    final res = await globalState.showMessage(\n      message: TextSpan(text: appLocalizations.resetTip),\n    );\n    if (res != true) {\n      return;\n    }\n    ref\n        .read(patchClashConfigProvider.notifier)\n        .update(\n          (state) => state.copyWith(\n            mixedPort: 7890,\n            port: 0,\n            socksPort: 0,\n            redirPort: 0,\n            tproxyPort: 0,\n          ),\n        );\n    if (mounted) {\n      Navigator.of(context).pop();\n    }\n  }\n\n  void _handleUpdate() {\n    if (_formKey.currentState?.validate() == false) return;\n    ref\n        .read(patchClashConfigProvider.notifier)\n        .update(\n          (state) => state.copyWith(\n            mixedPort: int.parse(_mixedPortController.text),\n            port: int.parse(_portController.text),\n            socksPort: int.parse(_socksPortController.text),\n            redirPort: int.parse(_redirPortController.text),\n            tproxyPort: int.parse(_tProxyPortController.text),\n          ),\n        );\n    Navigator.of(context).pop();\n  }\n\n  void _handleMore() {\n    setState(() {\n      _isMore = !_isMore;\n    });\n  }\n\n  @override\n  void dispose() {\n    _mixedPortController.dispose();\n    _portController.dispose();\n    _socksPortController.dispose();\n    _redirPortController.dispose();\n    _tProxyPortController.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonDialog(\n      title: appLocalizations.port,\n      actions: [\n        Row(\n          mainAxisAlignment: MainAxisAlignment.spaceBetween,\n          children: [\n            IconButton.filledTonal(\n              onPressed: _handleMore,\n              icon: CommonExpandIcon(expand: _isMore),\n            ),\n            Row(\n              children: [\n                TextButton(\n                  onPressed: _handleReset,\n                  child: Text(appLocalizations.reset),\n                ),\n                const SizedBox(width: 4),\n                TextButton(\n                  onPressed: _handleUpdate,\n                  child: Text(appLocalizations.submit),\n                ),\n              ],\n            ),\n          ],\n        ),\n      ],\n      child: Form(\n        autovalidateMode: AutovalidateMode.onUserInteraction,\n        key: _formKey,\n        child: Padding(\n          padding: EdgeInsets.only(top: 8),\n          child: AnimatedSize(\n            duration: midDuration,\n            curve: Curves.easeOutQuad,\n            alignment: Alignment.topCenter,\n            child: Column(\n              spacing: 24,\n              children: [\n                TextFormField(\n                  keyboardType: TextInputType.url,\n                  maxLines: 1,\n                  minLines: 1,\n                  controller: _mixedPortController,\n                  onFieldSubmitted: (_) {\n                    _handleUpdate();\n                  },\n                  decoration: InputDecoration(\n                    border: const OutlineInputBorder(),\n                    labelText: appLocalizations.mixedPort,\n                  ),\n                  validator: (value) {\n                    if (value == null || value.isEmpty) {\n                      return appLocalizations.emptyTip(\n                        appLocalizations.mixedPort,\n                      );\n                    }\n                    final port = int.tryParse(value);\n                    if (port == null) {\n                      return appLocalizations.numberTip(\n                        appLocalizations.mixedPort,\n                      );\n                    }\n                    if (port < 1024 || port > 49151) {\n                      return appLocalizations.portTip(\n                        appLocalizations.mixedPort,\n                      );\n                    }\n                    final ports = [\n                      _portController.text,\n                      _socksPortController.text,\n                      _tProxyPortController.text,\n                      _redirPortController.text,\n                    ].map((item) => item.trim());\n                    if (ports.contains(value.trim())) {\n                      return appLocalizations.portConflictTip;\n                    }\n                    return null;\n                  },\n                ),\n                if (_isMore) ...[\n                  TextFormField(\n                    keyboardType: TextInputType.url,\n                    maxLines: 1,\n                    minLines: 1,\n                    controller: _portController,\n                    onFieldSubmitted: (_) {\n                      _handleUpdate();\n                    },\n                    decoration: InputDecoration(\n                      border: const OutlineInputBorder(),\n                      labelText: appLocalizations.port,\n                    ),\n                    validator: (value) {\n                      if (value == null || value.isEmpty) {\n                        return appLocalizations.emptyTip(appLocalizations.port);\n                      }\n                      final port = int.tryParse(value);\n                      if (port == null) {\n                        return appLocalizations.numberTip(\n                          appLocalizations.port,\n                        );\n                      }\n                      if (port == 0) {\n                        return null;\n                      }\n                      if (port < 1024 || port > 49151) {\n                        return appLocalizations.portTip(appLocalizations.port);\n                      }\n                      final ports = [\n                        _mixedPortController.text,\n                        _socksPortController.text,\n                        _tProxyPortController.text,\n                        _redirPortController.text,\n                      ].map((item) => item.trim());\n                      if (ports.contains(value.trim())) {\n                        return appLocalizations.portConflictTip;\n                      }\n                      return null;\n                    },\n                  ),\n                  TextFormField(\n                    keyboardType: TextInputType.url,\n                    maxLines: 1,\n                    minLines: 1,\n                    controller: _socksPortController,\n                    onFieldSubmitted: (_) {\n                      _handleUpdate();\n                    },\n                    decoration: InputDecoration(\n                      border: const OutlineInputBorder(),\n                      labelText: appLocalizations.socksPort,\n                    ),\n                    validator: (value) {\n                      if (value == null || value.isEmpty) {\n                        return appLocalizations.emptyTip(\n                          appLocalizations.socksPort,\n                        );\n                      }\n                      final port = int.tryParse(value);\n                      if (port == null) {\n                        return appLocalizations.numberTip(\n                          appLocalizations.socksPort,\n                        );\n                      }\n                      if (port == 0) {\n                        return null;\n                      }\n                      if (port < 1024 || port > 49151) {\n                        return appLocalizations.portTip(\n                          appLocalizations.socksPort,\n                        );\n                      }\n                      final ports = [\n                        _portController.text,\n                        _mixedPortController.text,\n                        _tProxyPortController.text,\n                        _redirPortController.text,\n                      ].map((item) => item.trim());\n                      if (ports.contains(value.trim())) {\n                        return appLocalizations.portConflictTip;\n                      }\n                      return null;\n                    },\n                  ),\n                  TextFormField(\n                    keyboardType: TextInputType.url,\n                    maxLines: 1,\n                    minLines: 1,\n                    controller: _redirPortController,\n                    onFieldSubmitted: (_) {\n                      _handleUpdate();\n                    },\n                    decoration: InputDecoration(\n                      border: const OutlineInputBorder(),\n                      labelText: appLocalizations.redirPort,\n                    ),\n                    validator: (value) {\n                      if (value == null || value.isEmpty) {\n                        return appLocalizations.emptyTip(\n                          appLocalizations.redirPort,\n                        );\n                      }\n                      final port = int.tryParse(value);\n                      if (port == null) {\n                        return appLocalizations.numberTip(\n                          appLocalizations.redirPort,\n                        );\n                      }\n                      if (port == 0) {\n                        return null;\n                      }\n                      if (port < 1024 || port > 49151) {\n                        return appLocalizations.portTip(\n                          appLocalizations.redirPort,\n                        );\n                      }\n                      final ports = [\n                        _portController.text,\n                        _socksPortController.text,\n                        _tProxyPortController.text,\n                        _mixedPortController.text,\n                      ].map((item) => item.trim());\n                      if (ports.contains(value.trim())) {\n                        return appLocalizations.portConflictTip;\n                      }\n                      return null;\n                    },\n                  ),\n                  TextFormField(\n                    keyboardType: TextInputType.url,\n                    maxLines: 1,\n                    minLines: 1,\n                    controller: _tProxyPortController,\n                    onFieldSubmitted: (_) {\n                      _handleUpdate();\n                    },\n                    decoration: InputDecoration(\n                      border: const OutlineInputBorder(),\n                      labelText: appLocalizations.tproxyPort,\n                    ),\n                    validator: (value) {\n                      if (value == null || value.isEmpty) {\n                        return appLocalizations.emptyTip(\n                          appLocalizations.tproxyPort,\n                        );\n                      }\n                      final port = int.tryParse(value);\n                      if (port == null) {\n                        return appLocalizations.numberTip(\n                          appLocalizations.tproxyPort,\n                        );\n                      }\n                      if (port == 0) {\n                        return null;\n                      }\n                      if (port < 1024 || port > 49151) {\n                        return appLocalizations.portTip(\n                          appLocalizations.tproxyPort,\n                        );\n                      }\n                      final ports = [\n                        _portController.text,\n                        _socksPortController.text,\n                        _mixedPortController.text,\n                        _redirPortController.text,\n                      ].map((item) => item.trim());\n                      if (ports.contains(value.trim())) {\n                        return appLocalizations.portConflictTip;\n                      }\n\n                      return null;\n                    },\n                  ),\n                ],\n              ],\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/config/network.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/providers/config.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:intl/intl.dart';\n\nclass VPNItem extends ConsumerWidget {\n  const VPNItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final enable = ref.watch(\n      vpnSettingProvider.select((state) => state.enable),\n    );\n    return ListItem.switchItem(\n      title: const Text('VPN'),\n      subtitle: Text(appLocalizations.vpnEnableDesc),\n      delegate: SwitchDelegate(\n        value: enable,\n        onChanged: (value) async {\n          ref\n              .read(vpnSettingProvider.notifier)\n              .update((state) => state.copyWith(enable: value));\n        },\n      ),\n    );\n  }\n}\n\nclass TUNItem extends ConsumerWidget {\n  const TUNItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final enable = ref.watch(\n      patchClashConfigProvider.select((state) => state.tun.enable),\n    );\n\n    return ListItem.switchItem(\n      title: Text(appLocalizations.tun),\n      subtitle: Text(appLocalizations.tunDesc),\n      delegate: SwitchDelegate(\n        value: enable,\n        onChanged: (value) async {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith.tun(enable: value));\n        },\n      ),\n    );\n  }\n}\n\nclass AllowBypassItem extends ConsumerWidget {\n  const AllowBypassItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final allowBypass = ref.watch(\n      vpnSettingProvider.select((state) => state.allowBypass),\n    );\n    return ListItem.switchItem(\n      title: Text(appLocalizations.allowBypass),\n      subtitle: Text(appLocalizations.allowBypassDesc),\n      delegate: SwitchDelegate(\n        value: allowBypass,\n        onChanged: (bool value) async {\n          ref\n              .read(vpnSettingProvider.notifier)\n              .update((state) => state.copyWith(allowBypass: value));\n        },\n      ),\n    );\n  }\n}\n\nclass VpnSystemProxyItem extends ConsumerWidget {\n  const VpnSystemProxyItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final systemProxy = ref.watch(\n      vpnSettingProvider.select((state) => state.systemProxy),\n    );\n    return ListItem.switchItem(\n      title: Text(appLocalizations.systemProxy),\n      subtitle: Text(appLocalizations.systemProxyDesc),\n      delegate: SwitchDelegate(\n        value: systemProxy,\n        onChanged: (bool value) async {\n          ref\n              .read(vpnSettingProvider.notifier)\n              .update((state) => state.copyWith(systemProxy: value));\n        },\n      ),\n    );\n  }\n}\n\nclass SystemProxyItem extends ConsumerWidget {\n  const SystemProxyItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final systemProxy = ref.watch(\n      networkSettingProvider.select((state) => state.systemProxy),\n    );\n\n    return ListItem.switchItem(\n      title: Text(appLocalizations.systemProxy),\n      subtitle: Text(appLocalizations.systemProxyDesc),\n      delegate: SwitchDelegate(\n        value: systemProxy,\n        onChanged: (bool value) async {\n          ref\n              .read(networkSettingProvider.notifier)\n              .update((state) => state.copyWith(systemProxy: value));\n        },\n      ),\n    );\n  }\n}\n\nclass Ipv6Item extends ConsumerWidget {\n  const Ipv6Item({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final ipv6 = ref.watch(vpnSettingProvider.select((state) => state.ipv6));\n    return ListItem.switchItem(\n      title: const Text('IPv6'),\n      subtitle: Text(appLocalizations.ipv6InboundDesc),\n      delegate: SwitchDelegate(\n        value: ipv6,\n        onChanged: (bool value) async {\n          ref\n              .read(vpnSettingProvider.notifier)\n              .update((state) => state.copyWith(ipv6: value));\n        },\n      ),\n    );\n  }\n}\n\nclass AutoSetSystemDnsItem extends ConsumerWidget {\n  const AutoSetSystemDnsItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final autoSetSystemDns = ref.watch(\n      networkSettingProvider.select((state) => state.autoSetSystemDns),\n    );\n    return ListItem.switchItem(\n      title: Text(appLocalizations.autoSetSystemDns),\n      delegate: SwitchDelegate(\n        value: autoSetSystemDns,\n        onChanged: (bool value) async {\n          ref\n              .read(networkSettingProvider.notifier)\n              .update((state) => state.copyWith(autoSetSystemDns: value));\n        },\n      ),\n    );\n  }\n}\n\nclass TunStackItem extends ConsumerWidget {\n  const TunStackItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final stack = ref.watch(\n      patchClashConfigProvider.select((state) => state.tun.stack),\n    );\n\n    return ListItem.options(\n      title: Text(appLocalizations.stackMode),\n      subtitle: Text(stack.name),\n      delegate: OptionsDelegate<TunStack>(\n        value: stack,\n        options: TunStack.values,\n        textBuilder: (value) => value.name,\n        onChanged: (value) {\n          if (value == null) {\n            return;\n          }\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update((state) => state.copyWith.tun(stack: value));\n        },\n        title: appLocalizations.stackMode,\n      ),\n    );\n  }\n}\n\nclass BypassDomainItem extends ConsumerWidget {\n  const BypassDomainItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final bypassDomain = ref.watch(\n      networkSettingProvider.select((state) => state.bypassDomain),\n    );\n    return ListItem.open(\n      title: Text(appLocalizations.bypassDomain),\n      subtitle: Text(appLocalizations.bypassDomainDesc),\n      delegate: OpenDelegate(\n        blur: false,\n        widget: ListInputPage(\n          title: appLocalizations.bypassDomain,\n          items: bypassDomain,\n          titleBuilder: (item) => Text(item),\n        ),\n        onChanged: (items) {\n          ref\n              .read(networkSettingProvider.notifier)\n              .update(\n                (state) => state.copyWith(bypassDomain: List.from(items)),\n              );\n        },\n      ),\n    );\n  }\n}\n\nclass DNSHijackingItem extends ConsumerWidget {\n  const DNSHijackingItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final dnsHijacking = ref.watch(\n      vpnSettingProvider.select((state) => state.dnsHijacking),\n    );\n    return ListItem<RouteMode>.switchItem(\n      title: Text(appLocalizations.dnsHijacking),\n      delegate: SwitchDelegate(\n        value: dnsHijacking,\n        onChanged: (value) async {\n          ref\n              .read(vpnSettingProvider.notifier)\n              .update((state) => state.copyWith(dnsHijacking: value));\n        },\n      ),\n    );\n  }\n}\n\nclass RouteModeItem extends ConsumerWidget {\n  const RouteModeItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final routeMode = ref.watch(\n      networkSettingProvider.select((state) => state.routeMode),\n    );\n    return ListItem<RouteMode>.options(\n      title: Text(appLocalizations.routeMode),\n      subtitle: Text(Intl.message('routeMode_${routeMode.name}')),\n      delegate: OptionsDelegate<RouteMode>(\n        title: appLocalizations.routeMode,\n        options: RouteMode.values,\n        onChanged: (RouteMode? value) {\n          if (value == null) {\n            return;\n          }\n          ref\n              .read(networkSettingProvider.notifier)\n              .update((state) => state.copyWith(routeMode: value));\n        },\n        textBuilder: (routeMode) => Intl.message('routeMode_${routeMode.name}'),\n        value: routeMode,\n      ),\n    );\n  }\n}\n\nclass RouteAddressItem extends ConsumerWidget {\n  const RouteAddressItem({super.key});\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final bypassPrivate = ref.watch(\n      networkSettingProvider.select(\n        (state) => state.routeMode == RouteMode.bypassPrivate,\n      ),\n    );\n    if (bypassPrivate) {\n      return Container();\n    }\n    final routeAddress = ref.watch(\n      patchClashConfigProvider.select((state) => state.tun.routeAddress),\n    );\n    return ListItem.open(\n      title: Text(appLocalizations.routeAddress),\n      subtitle: Text(appLocalizations.routeAddressDesc),\n      delegate: OpenDelegate(\n        blur: false,\n        maxWidth: 360,\n        widget: ListInputPage(\n          title: appLocalizations.routeAddress,\n          items: routeAddress,\n          titleBuilder: (item) => Text(item),\n        ),\n        onChanged: (items) {\n          ref\n              .read(patchClashConfigProvider.notifier)\n              .update(\n                (state) => state.copyWith.tun(routeAddress: List.from(items)),\n              );\n        },\n      ),\n    );\n  }\n}\n\nfinal networkItems = [\n  if (system.isAndroid) const VPNItem(),\n  if (system.isAndroid)\n    ...generateSection(\n      title: 'VPN',\n      items: [\n        const VpnSystemProxyItem(),\n        const BypassDomainItem(),\n        const AllowBypassItem(),\n        const Ipv6Item(),\n        const DNSHijackingItem(),\n      ],\n    ),\n  if (system.isDesktop)\n    ...generateSection(\n      title: appLocalizations.system,\n      items: [SystemProxyItem(), BypassDomainItem()],\n    ),\n  ...generateSection(\n    title: appLocalizations.options,\n    items: [\n      if (system.isDesktop) const TUNItem(),\n      if (system.isMacOS) const AutoSetSystemDnsItem(),\n      const TunStackItem(),\n      if (!system.isDesktop) ...[\n        const RouteModeItem(),\n        const RouteAddressItem(),\n      ],\n    ],\n  ),\n];\n\nclass NetworkListView extends StatelessWidget {\n  const NetworkListView({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return generateListView(networkItems);\n  }\n}\n"
  },
  {
    "path": "lib/views/config/rules.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/features/features.dart';\nimport 'package:fl_clash/models/clash_config.dart';\nimport 'package:fl_clash/providers/database.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass AddedRulesView extends ConsumerStatefulWidget {\n  const AddedRulesView({super.key});\n\n  @override\n  ConsumerState<AddedRulesView> createState() => _AddedRulesViewState();\n}\n\nclass _AddedRulesViewState extends ConsumerState<AddedRulesView> {\n  final _key = utils.id;\n\n  Future<void> _handleAddOrUpdate([Rule? rule]) async {\n    final res = await globalState.showCommonDialog<Rule>(\n      child: AddOrEditRuleDialog(rule: rule),\n    );\n    if (res == null) {\n      return;\n    }\n    ref.read(globalRulesProvider.notifier).put(res);\n  }\n\n  void _handleSelected(int ruleId) {\n    ref.read(selectedItemsProvider(_key).notifier).update((selectedRules) {\n      final newSelectedRules = Set<int>.from(selectedRules)\n        ..addOrRemove(ruleId);\n      return newSelectedRules;\n    });\n  }\n\n  void _handleSelectAll() {\n    final ids =\n        ref.read(globalRulesProvider).value?.map((item) => item.id).toSet() ??\n        {};\n    ref.read(selectedItemsProvider(_key).notifier).update((selected) {\n      return selected.containsAll(ids) ? {} : ids;\n    });\n  }\n\n  Future<void> _handleDelete() async {\n    final res = await globalState.showMessage(\n      title: appLocalizations.tip,\n      message: TextSpan(\n        text: appLocalizations.deleteMultipTip(appLocalizations.rule),\n      ),\n    );\n    if (res != true) {\n      return;\n    }\n    final selectedRules = ref.read(selectedItemsProvider(_key));\n    ref.read(globalRulesProvider.notifier).delAll(selectedRules.cast<int>());\n    ref.read(selectedItemsProvider(_key).notifier).value = {};\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final rules = ref.watch(globalRulesProvider).value ?? [];\n    final selectedRules = ref.watch(selectedItemsProvider(_key));\n    return CommonPopScope(\n      onPop: (_) {\n        if (selectedRules.isNotEmpty) {\n          ref.read(selectedItemsProvider(_key).notifier).value = {};\n          return false;\n        }\n        Navigator.of(context).pop();\n        return false;\n      },\n      child: BaseScaffold(\n        title: appLocalizations.addedRules,\n        actions: [\n          if (selectedRules.isNotEmpty) ...[\n            CommonMinIconButtonTheme(\n              child: IconButton.filledTonal(\n                onPressed: _handleDelete,\n                icon: Icon(Icons.delete),\n              ),\n            ),\n            SizedBox(width: 2),\n          ],\n          CommonMinFilledButtonTheme(\n            child: selectedRules.isNotEmpty\n                ? FilledButton(\n                    onPressed: _handleSelectAll,\n                    child: Text(appLocalizations.selectAll),\n                  )\n                : FilledButton.tonal(\n                    onPressed: () {\n                      _handleAddOrUpdate();\n                    },\n                    child: Text(appLocalizations.add),\n                  ),\n          ),\n          SizedBox(width: 8),\n        ],\n        body: rules.isEmpty\n            ? NullStatus(\n                label: appLocalizations.nullTip(appLocalizations.rule),\n                illustration: RuleEmptyIllustration(),\n              )\n            : ReorderableList(\n                padding: EdgeInsets.symmetric(vertical: 16),\n                itemBuilder: (context, index) {\n                  final rule = rules[index];\n                  return ReorderableDelayedDragStartListener(\n                    key: ObjectKey(rule),\n                    index: index,\n                    child: RuleItem(\n                      isEditing: selectedRules.isNotEmpty,\n                      rule: rule,\n                      isSelected: selectedRules.contains(rule.id),\n                      onSelected: () {\n                        _handleSelected(rule.id);\n                      },\n                      onEdit: (Rule rule) {\n                        _handleAddOrUpdate(rule);\n                      },\n                    ),\n                  );\n                },\n                itemCount: rules.length,\n                onReorder: ref.read(globalRulesProvider.notifier).order,\n              ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/config/scripts.dart",
    "content": "import 'dart:io';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/pages/editor.dart';\nimport 'package:fl_clash/providers/app.dart';\nimport 'package:fl_clash/providers/database.dart';\nimport 'package:fl_clash/providers/state.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/input.dart';\nimport 'package:fl_clash/widgets/list.dart';\nimport 'package:fl_clash/widgets/null_status.dart';\nimport 'package:fl_clash/widgets/pop_scope.dart';\nimport 'package:fl_clash/widgets/scaffold.dart';\nimport 'package:fl_clash/widgets/theme.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass ScriptsView extends ConsumerStatefulWidget {\n  const ScriptsView({super.key});\n\n  @override\n  ConsumerState<ScriptsView> createState() => _ScriptsViewState();\n}\n\nclass _ScriptsViewState extends ConsumerState<ScriptsView> {\n  final _key = utils.id;\n\n  Future<void> _handleDelScript(int id) async {\n    final res = await globalState.showMessage(\n      message: TextSpan(\n        text: appLocalizations.deleteTip(appLocalizations.script),\n      ),\n    );\n    if (res != true) {\n      return;\n    }\n    ref.read(scriptsProvider.notifier).del(id);\n    ref.read(selectedItemProvider(_key).notifier).value = null;\n    _clearEffect(id);\n  }\n\n  Future<void> _clearEffect(int id) async {\n    final path = await appPath.getScriptPath(id.toString());\n    await File(path).safeDelete();\n  }\n\n  void _handleSelected(int id) {\n    ref.read(selectedItemProvider(_key).notifier).update((value) {\n      if (value == id) {\n        return null;\n      }\n      return id;\n    });\n  }\n\n  Widget _buildContent(List<Script> scripts, int? selectedScriptId) {\n    if (scripts.isEmpty) {\n      return NullStatus(\n        illustration: ScriptEmptyIllustration(),\n        label: appLocalizations.nullTip(appLocalizations.script),\n      );\n    }\n    return ListView.builder(\n      padding: EdgeInsets.symmetric(vertical: 16),\n      itemCount: scripts.length,\n      itemBuilder: (_, index) {\n        final script = scripts[index];\n        return CommonSelectedListItem(\n          isSelected: selectedScriptId == script.id,\n          title: Text(\n            script.label,\n            style: context.textTheme.bodyLarge,\n            maxLines: 3,\n          ),\n          onSelected: () {\n            _handleSelected(script.id);\n          },\n          onPressed: () {\n            _handleSelected(script.id);\n          },\n        );\n      },\n    );\n  }\n\n  Future<void> _handleEditorSave(\n    BuildContext _,\n    String title,\n    String content, {\n    Script? script,\n  }) async {\n    Script newScript =\n        (script?.copyWith(label: title) ?? Script.create(label: title));\n    newScript = await newScript.save(content);\n    if (newScript.label.isEmpty) {\n      final res = await globalState.showCommonDialog<String>(\n        child: InputDialog(\n          title: appLocalizations.save,\n          value: '',\n          hintText: appLocalizations.pleaseEnterScriptName,\n          validator: (value) {\n            if (value == null || value.isEmpty) {\n              return appLocalizations.emptyTip(appLocalizations.name);\n            }\n            if (value != script?.label) {\n              final isExits = ref.read(scriptsProvider.notifier).isExits(value);\n              if (isExits) {\n                return appLocalizations.existsTip(appLocalizations.name);\n              }\n            }\n            return null;\n          },\n        ),\n      );\n      if (res == null || res.isEmpty) {\n        return;\n      }\n      newScript = newScript.copyWith(label: res);\n    }\n    if (newScript.label != script?.label) {\n      final isExits = ref\n          .read(scriptsProvider.notifier)\n          .isExits(newScript.label);\n      if (isExits) {\n        globalState.showMessage(\n          message: TextSpan(\n            text: appLocalizations.existsTip(appLocalizations.name),\n          ),\n        );\n        return;\n      }\n    }\n    ref.read(scriptsProvider.notifier).put(newScript);\n    if (mounted) {\n      Navigator.of(context).pop();\n    }\n  }\n\n  Future<bool> _handleEditorPop(\n    BuildContext _,\n    String title,\n    String content,\n    String raw, {\n    Script? script,\n  }) async {\n    if (content == raw) {\n      return true;\n    }\n    final res = await globalState.showMessage(\n      message: TextSpan(text: appLocalizations.saveChanges),\n    );\n    if (res == true && mounted) {\n      _handleEditorSave(context, title, content, script: script);\n    } else {\n      return true;\n    }\n    return false;\n  }\n\n  void _handleToEditor([int? id]) async {\n    final script = await ref.read(scriptProvider(id).future);\n    final title = script?.label ?? '';\n    final raw = (await script?.content) ?? scriptTemplate;\n    if (!mounted) {\n      return;\n    }\n    BaseNavigator.push(\n      context,\n      EditorPage(\n        titleEditable: true,\n        title: title,\n        supportRemoteDownload: true,\n        onSave: (context, title, content) {\n          _handleEditorSave(context, title, content, script: script);\n        },\n        onPop: (context, title, content) {\n          return _handleEditorPop(context, title, content, raw, script: script);\n        },\n        languages: const [Language.javaScript],\n        content: raw,\n      ),\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final scripts = ref.watch(scriptsProvider).value ?? [];\n    final selectedScriptId = ref.watch(selectedItemProvider(_key));\n    return CommonPopScope(\n      onPop: (_) {\n        if (selectedScriptId != null) {\n          ref.read(selectedItemProvider(_key).notifier).value = null;\n          return false;\n        }\n        Navigator.of(context).pop();\n        return false;\n      },\n      child: CommonScaffold(\n        actions: [\n          if (selectedScriptId != null) ...[\n            CommonMinIconButtonTheme(\n              child: IconButton.filledTonal(\n                onPressed: () {\n                  _handleDelScript(selectedScriptId);\n                },\n                icon: Icon(Icons.delete),\n              ),\n            ),\n            SizedBox(width: 2),\n          ],\n          CommonMinFilledButtonTheme(\n            child: selectedScriptId != null\n                ? FilledButton(\n                    onPressed: () {\n                      _handleToEditor(selectedScriptId);\n                    },\n                    child: Text(appLocalizations.edit),\n                  )\n                : FilledButton.tonal(\n                    onPressed: () {\n                      _handleToEditor();\n                    },\n                    child: Text(appLocalizations.add),\n                  ),\n          ),\n          SizedBox(width: 8),\n        ],\n        body: _buildContent(scripts, selectedScriptId),\n        title: appLocalizations.script,\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/connection/connections.dart",
    "content": "import 'dart:async';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/core/controller.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:super_sliver_list/super_sliver_list.dart';\n\nimport 'item.dart';\n\nclass ConnectionsView extends ConsumerStatefulWidget {\n  const ConnectionsView({super.key});\n\n  @override\n  ConsumerState<ConnectionsView> createState() => _ConnectionsViewState();\n}\n\nclass _ConnectionsViewState extends ConsumerState<ConnectionsView> {\n  final _connectionsStateNotifier = ValueNotifier<TrackerInfosState>(\n    const TrackerInfosState(),\n  );\n  final ScrollController _scrollController = ScrollController();\n\n  Timer? timer;\n\n  List<Widget> _buildActions() {\n    return [\n      IconButton(\n        onPressed: () async {\n          coreController.closeConnections();\n          await _updateConnections();\n        },\n        icon: const Icon(Icons.delete_sweep_outlined),\n      ),\n    ];\n  }\n\n  void _onSearch(String value) {\n    _connectionsStateNotifier.value = _connectionsStateNotifier.value.copyWith(\n      query: value,\n    );\n  }\n\n  void _onKeywordsUpdate(List<String> keywords) {\n    _connectionsStateNotifier.value = _connectionsStateNotifier.value.copyWith(\n      keywords: keywords,\n    );\n  }\n\n  Future<void> _updateConnectionsTask() async {\n    WidgetsBinding.instance.addPostFrameCallback((_) async {\n      if (mounted) {\n        await _updateConnections();\n        timer = Timer(Duration(seconds: 1), () async {\n          _updateConnectionsTask();\n        });\n      }\n    });\n  }\n\n  @override\n  void initState() {\n    super.initState();\n    _updateConnectionsTask();\n  }\n\n  Future<void> _updateConnections() async {\n    _connectionsStateNotifier.value = _connectionsStateNotifier.value.copyWith(\n      trackerInfos: await coreController.getConnections(),\n    );\n  }\n\n  Future<void> _handleBlockConnection(String id) async {\n    coreController.closeConnection(id);\n    await _updateConnections();\n  }\n\n  @override\n  void dispose() {\n    timer?.cancel();\n    _connectionsStateNotifier.dispose();\n    _scrollController.dispose();\n    timer = null;\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonScaffold(\n      title: appLocalizations.connections,\n      onKeywordsUpdate: _onKeywordsUpdate,\n      searchState: AppBarSearchState(onSearch: _onSearch),\n      actions: _buildActions(),\n      body: ValueListenableBuilder<TrackerInfosState>(\n        valueListenable: _connectionsStateNotifier,\n        builder: (context, state, _) {\n          final connections = state.list;\n          if (connections.isEmpty) {\n            return NullStatus(\n              label: appLocalizations.nullTip(appLocalizations.connections),\n              illustration: ConnectionEmptyIllustration(),\n            );\n          }\n          final items = connections\n              .map<Widget>(\n                (trackerInfo) => TrackerInfoItem(\n                  key: Key(trackerInfo.id),\n                  trackerInfo: trackerInfo,\n                  onClickKeyword: (value) {\n                    context.commonScaffoldState?.addKeyword(value);\n                  },\n                  trailing: IconButton(\n                    padding: EdgeInsets.zero,\n                    visualDensity: VisualDensity.compact,\n                    style: IconButton.styleFrom(minimumSize: Size.zero),\n                    icon: const Icon(Icons.block),\n                    onPressed: () {\n                      _handleBlockConnection(trackerInfo.id);\n                    },\n                  ),\n                  detailTitle: appLocalizations.details(\n                    appLocalizations.connection,\n                  ),\n                ),\n              )\n              .separated(const Divider(height: 0))\n              .toList();\n          return SuperListView.builder(\n            controller: _scrollController,\n            itemBuilder: (context, index) {\n              return items[index];\n            },\n            itemCount: connections.length,\n          );\n        },\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/connection/item.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/plugins/app.dart';\nimport 'package:fl_clash/providers/config.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass TrackerInfoItem extends ConsumerWidget {\n  final TrackerInfo trackerInfo;\n  final Function(String)? onClickKeyword;\n  final Widget? trailing;\n  final String detailTitle;\n\n  const TrackerInfoItem({\n    super.key,\n    required this.trackerInfo,\n    this.onClickKeyword,\n    this.trailing,\n    required this.detailTitle,\n  });\n\n  static double get subTitleHeight {\n    return globalState.measure.bodySmallHeight + 20;\n  }\n\n  Future<ImageProvider?> _getPackageIcon(TrackerInfo connection) async {\n    return await app?.getPackageIcon(connection.metadata.process);\n  }\n\n  String _getSourceText(TrackerInfo trackerInfo) {\n    final progress = trackerInfo.progressText.isNotEmpty\n        ? '${trackerInfo.progressText} · '\n        : '';\n    final traffic = Traffic(up: trackerInfo.upload, down: trackerInfo.download);\n    return '${trackerInfo.start.lastUpdateTimeDesc} · $progress${traffic.desc}';\n  }\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final value = ref.watch(\n      patchClashConfigProvider.select(\n        (state) =>\n            state.findProcessMode == FindProcessMode.always && system.isAndroid,\n      ),\n    );\n    final title = Column(\n      crossAxisAlignment: CrossAxisAlignment.start,\n      children: [\n        Text(trackerInfo.desc, style: context.textTheme.bodyLarge),\n        // Row(\n        //   mainAxisSize: MainAxisSize.max,\n        //   mainAxisAlignment: MainAxisAlignment.spaceBetween,\n        //   spacing: 8,\n        //   children: [\n        //     Flexible(\n        //       child: Text(trackerInfo.desc, style: context.textTheme.bodyLarge),\n        //     ),\n        //     Text(\n        //       trackerInfo.start.lastUpdateTimeDesc,\n        //       style: context.textTheme.bodySmall?.copyWith(\n        //         color: context.colorScheme.onSurface.opacity60,\n        //       ),\n        //     ),\n        //   ],\n        // ),\n        const SizedBox(height: 6),\n        Text(\n          _getSourceText(trackerInfo),\n          maxLines: 1,\n          overflow: TextOverflow.ellipsis,\n          style: context.textTheme.bodyMedium?.copyWith(\n            color: context.colorScheme.onSurfaceVariant,\n          ),\n        ),\n      ],\n    );\n    final subTitle = SizedBox(\n      height: subTitleHeight,\n      child: Row(\n        spacing: 8,\n        mainAxisSize: MainAxisSize.min,\n        mainAxisAlignment: MainAxisAlignment.spaceBetween,\n        children: [\n          Flexible(\n            child: ListView.separated(\n              separatorBuilder: (_, _) => SizedBox(width: 6),\n              padding: EdgeInsets.zero,\n              scrollDirection: Axis.horizontal,\n              itemCount: trackerInfo.chains.length,\n              itemBuilder: (_, index) {\n                final chain = trackerInfo.chains[index];\n                return CommonChip(\n                  label: chain,\n                  labelStyle: context.textTheme.bodySmall?.copyWith(\n                    color: context.colorScheme.onSurfaceVariant,\n                  ),\n                  onPressed: () {\n                    if (onClickKeyword == null) return;\n                    onClickKeyword!(chain);\n                  },\n                );\n              },\n            ),\n          ),\n          if (trailing != null) trailing!,\n        ],\n      ),\n    );\n    final icon = value\n        ? GestureDetector(\n            onTap: () {\n              if (onClickKeyword == null) return;\n              final process = trackerInfo.metadata.process;\n              if (process.isEmpty) return;\n              onClickKeyword!(process);\n            },\n            child: Container(\n              margin: const EdgeInsets.only(top: 4),\n              width: 42,\n              height: 42,\n              child: FutureBuilder<ImageProvider?>(\n                future: _getPackageIcon(trackerInfo),\n                builder: (_, snapshot) {\n                  if (!snapshot.hasData && snapshot.data == null) {\n                    return Container();\n                  } else {\n                    return Image(\n                      image: snapshot.data!,\n                      gaplessPlayback: true,\n                      width: 42,\n                      height: 42,\n                    );\n                  }\n                },\n              ),\n            ),\n          )\n        : null;\n    return ListItem(\n      padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 4),\n      onTap: () {\n        showExtend(\n          context,\n          builder: (_, type) {\n            return AdaptiveSheetScaffold(\n              type: type,\n              body: TrackerInfoDetailView(trackerInfo: trackerInfo),\n              title: detailTitle,\n            );\n          },\n        );\n      },\n      title: Column(\n        mainAxisSize: MainAxisSize.min,\n        crossAxisAlignment: CrossAxisAlignment.start,\n        children: [\n          Row(\n            mainAxisSize: MainAxisSize.min,\n            mainAxisAlignment: MainAxisAlignment.center,\n            spacing: 12,\n            children: [\n              if (icon != null) icon,\n              Flexible(child: title),\n            ],\n          ),\n          const SizedBox(height: 8),\n          subTitle,\n        ],\n      ),\n    );\n  }\n}\n\nclass TrackerInfoDetailView extends StatelessWidget {\n  final TrackerInfo trackerInfo;\n\n  const TrackerInfoDetailView({super.key, required this.trackerInfo});\n\n  String _getRuleText() {\n    final rule = trackerInfo.rule;\n    final rulePayload = trackerInfo.rulePayload;\n    if (rulePayload.isNotEmpty) {\n      return '$rule($rulePayload)';\n    }\n    return rule;\n  }\n\n  String _getProcessText() {\n    final process = trackerInfo.metadata.process;\n    final uid = trackerInfo.metadata.uid;\n    if (uid != 0) {\n      return '$process($uid)';\n    }\n    return process;\n  }\n\n  String _getSourceText() {\n    final sourceIP = trackerInfo.metadata.sourceIP;\n    if (sourceIP.isEmpty) {\n      return '';\n    }\n    final sourcePort = trackerInfo.metadata.sourcePort;\n    if (sourcePort.isNotEmpty) {\n      return '$sourceIP:$sourcePort';\n    }\n    return sourceIP;\n  }\n\n  String _getDestinationText() {\n    final destinationIP = trackerInfo.metadata.destinationIP;\n    if (destinationIP.isEmpty) {\n      return '';\n    }\n    final destinationPort = trackerInfo.metadata.destinationPort;\n    if (destinationPort.isNotEmpty) {\n      return '$destinationIP:$destinationPort';\n    }\n    return destinationIP;\n  }\n\n  Widget _buildChains() {\n    final chains = Wrap(\n      spacing: 8,\n      runSpacing: 8,\n      alignment: WrapAlignment.end,\n      children: [\n        for (final chain in trackerInfo.chains)\n          CommonChip(label: chain, onPressed: () {}),\n      ],\n    );\n    return ListItem(\n      title: Row(\n        mainAxisAlignment: MainAxisAlignment.spaceBetween,\n        crossAxisAlignment: CrossAxisAlignment.start,\n        spacing: 20,\n        children: [\n          Text(appLocalizations.proxyChains),\n          Flexible(child: chains),\n        ],\n      ),\n    );\n  }\n\n  Widget _buildItem({\n    required String title,\n    required String desc,\n    bool quickCopy = false,\n  }) {\n    return ListItem(\n      title: Row(\n        spacing: 16,\n        mainAxisAlignment: MainAxisAlignment.spaceBetween,\n        crossAxisAlignment: CrossAxisAlignment.start,\n        children: [\n          Row(\n            spacing: 4,\n            children: [\n              Text(title),\n              if (quickCopy)\n                Padding(\n                  padding: EdgeInsets.only(top: 4),\n                  child: IconButton(\n                    visualDensity: VisualDensity.compact,\n                    padding: EdgeInsets.zero,\n                    icon: Icon(Icons.content_copy, size: 18),\n                    onPressed: () {},\n                  ),\n                ),\n            ],\n          ),\n          Flexible(child: Text(desc, textAlign: TextAlign.end)),\n        ],\n      ),\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final items = [\n      _buildItem(\n        title: appLocalizations.creationTime,\n        desc: trackerInfo.start.showFull,\n      ),\n      if (_getProcessText().isNotEmpty)\n        _buildItem(title: appLocalizations.process, desc: _getProcessText()),\n      _buildItem(\n        title: appLocalizations.networkType,\n        desc: trackerInfo.metadata.network,\n      ),\n      _buildItem(title: appLocalizations.rule, desc: _getRuleText()),\n      if (trackerInfo.metadata.host.isNotEmpty)\n        _buildItem(\n          title: appLocalizations.host,\n          desc: trackerInfo.metadata.host,\n        ),\n      if (_getSourceText().isNotEmpty)\n        _buildItem(title: appLocalizations.source, desc: _getSourceText()),\n      if (_getDestinationText().isNotEmpty)\n        _buildItem(\n          title: appLocalizations.destination,\n          desc: _getDestinationText(),\n        ),\n      _buildItem(\n        title: appLocalizations.upload,\n        desc: trackerInfo.upload.traffic.show,\n      ),\n      _buildItem(\n        title: appLocalizations.download,\n        desc: trackerInfo.download.traffic.show,\n      ),\n      if (trackerInfo.metadata.destinationGeoIP.isNotEmpty)\n        _buildItem(\n          title: appLocalizations.destinationGeoIP,\n          desc: trackerInfo.metadata.destinationGeoIP.join(' '),\n        ),\n      if (trackerInfo.metadata.destinationIPASN.isNotEmpty)\n        _buildItem(\n          title: appLocalizations.destinationIPASN,\n          desc: trackerInfo.metadata.destinationIPASN,\n        ),\n      if (trackerInfo.metadata.dnsMode != null)\n        _buildItem(\n          title: appLocalizations.dnsMode,\n          desc: trackerInfo.metadata.dnsMode!.name,\n        ),\n      if (trackerInfo.metadata.specialProxy.isNotEmpty)\n        _buildItem(\n          title: appLocalizations.specialProxy,\n          desc: trackerInfo.metadata.specialProxy,\n        ),\n      if (trackerInfo.metadata.specialRules.isNotEmpty)\n        _buildItem(\n          title: appLocalizations.specialRules,\n          desc: trackerInfo.metadata.specialRules,\n        ),\n      if (trackerInfo.metadata.remoteDestination.isNotEmpty)\n        _buildItem(\n          title: appLocalizations.remoteDestination,\n          desc: trackerInfo.metadata.remoteDestination,\n        ),\n      _buildChains(),\n    ];\n    return SelectionArea(\n      child: ListView.builder(\n        padding: EdgeInsets.symmetric(vertical: 12),\n        itemCount: items.length,\n        itemBuilder: (_, index) {\n          return items[index];\n        },\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/connection/requests.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:super_sliver_list/super_sliver_list.dart';\n\nimport 'item.dart';\n\nclass RequestsView extends ConsumerStatefulWidget {\n  const RequestsView({super.key});\n\n  @override\n  ConsumerState<RequestsView> createState() => _RequestsViewState();\n}\n\nclass _RequestsViewState extends ConsumerState<RequestsView> {\n  final _requestsStateNotifier = ValueNotifier<TrackerInfosState>(\n    const TrackerInfosState(),\n  );\n  List<TrackerInfo> _requests = [];\n  late final ScrollController _scrollController;\n\n  void _onSearch(String value) {\n    _requestsStateNotifier.value = _requestsStateNotifier.value.copyWith(\n      query: value,\n    );\n  }\n\n  void _onKeywordsUpdate(List<String> keywords) {\n    _requestsStateNotifier.value = _requestsStateNotifier.value.copyWith(\n      keywords: keywords,\n    );\n  }\n\n  @override\n  void initState() {\n    super.initState();\n    _requests = ref.read(requestsProvider).list;\n    _scrollController = ScrollController(initialScrollOffset: double.maxFinite);\n    _requestsStateNotifier.value = _requestsStateNotifier.value.copyWith(\n      trackerInfos: _requests,\n    );\n    ref.listenManual(requestsProvider.select((state) => state.list), (\n      prev,\n      next,\n    ) {\n      _requests = next;\n      updateRequestsThrottler();\n    });\n  }\n\n  @override\n  void dispose() {\n    _requestsStateNotifier.dispose();\n    _scrollController.dispose();\n    super.dispose();\n  }\n\n  void updateRequestsThrottler() {\n    throttler.call(FunctionTag.requests, () {\n      if (!mounted) {\n        return;\n      }\n      final isEquality = trackerInfoListEquality.equals(\n        _requests,\n        _requestsStateNotifier.value.trackerInfos,\n      );\n      if (isEquality) {\n        return;\n      }\n      WidgetsBinding.instance.addPostFrameCallback((_) {\n        if (mounted) {\n          _requestsStateNotifier.value = _requestsStateNotifier.value.copyWith(\n            trackerInfos: _requests,\n          );\n        }\n      });\n    }, duration: commonDuration);\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonScaffold(\n      title: appLocalizations.requests,\n      searchState: AppBarSearchState(onSearch: _onSearch),\n      onKeywordsUpdate: _onKeywordsUpdate,\n      floatingActionButton: ValueListenableBuilder(\n        valueListenable: _requestsStateNotifier,\n        builder: (_, state, _) {\n          final autoScrollToEnd = state.autoScrollToEnd;\n          return FadeRotationScaleBox(\n            child: FloatingActionButton(\n              key: ValueKey(autoScrollToEnd),\n              onPressed: () {\n                _requestsStateNotifier.value = _requestsStateNotifier.value\n                    .copyWith(\n                      autoScrollToEnd:\n                          !_requestsStateNotifier.value.autoScrollToEnd,\n                    );\n              },\n              child: autoScrollToEnd\n                  ? const Icon(Icons.block)\n                  : const Icon(Icons.vertical_align_top),\n            ),\n          );\n        },\n      ),\n      body: ValueListenableBuilder<TrackerInfosState>(\n        valueListenable: _requestsStateNotifier,\n        builder: (context, state, _) {\n          final requests = state.list;\n          if (requests.isEmpty) {\n            return NullStatus(\n              label: appLocalizations.nullTip(appLocalizations.requests),\n            );\n          }\n          final items = requests\n              .map<Widget>(\n                (trackerInfo) => TrackerInfoItem(\n                  key: Key(trackerInfo.id),\n                  trackerInfo: trackerInfo,\n                  onClickKeyword: (value) {\n                    context.commonScaffoldState?.addKeyword(value);\n                  },\n                  detailTitle: appLocalizations.details(\n                    appLocalizations.request,\n                  ),\n                ),\n              )\n              .separated(const Divider(height: 0))\n              .toList();\n          return Align(\n            alignment: Alignment.topCenter,\n            child: CommonScrollBar(\n              trackVisibility: false,\n              controller: _scrollController,\n              child: ScrollToEndBox(\n                controller: _scrollController,\n                dataSource: requests,\n                enable: state.autoScrollToEnd,\n                onCancelToEnd: () {\n                  _requestsStateNotifier.value = _requestsStateNotifier.value\n                      .copyWith(autoScrollToEnd: false);\n                },\n                child: SuperListView.builder(\n                  reverse: true,\n                  shrinkWrap: true,\n                  physics: NextClampingScrollPhysics(),\n                  controller: _scrollController,\n                  itemBuilder: (_, index) {\n                    return items[index];\n                  },\n                  itemCount: items.length,\n                ),\n              ),\n            ),\n          );\n        },\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/dashboard/dashboard.dart",
    "content": "import 'dart:math';\n\nimport 'package:defer_pointer/defer_pointer.dart';\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nimport 'widgets/start_button.dart';\n\ntypedef _IsEditWidgetBuilder = Widget Function(bool isEdit);\n\nclass DashboardView extends ConsumerStatefulWidget {\n  const DashboardView({super.key});\n\n  @override\n  ConsumerState<DashboardView> createState() => _DashboardViewState();\n}\n\nclass _DashboardViewState extends ConsumerState<DashboardView> {\n  final key = GlobalKey<SuperGridState>();\n  final _isEditNotifier = ValueNotifier<bool>(false);\n  final _addedWidgetsNotifier = ValueNotifier<List<GridItem>>([]);\n\n  @override\n  dispose() {\n    _isEditNotifier.dispose();\n    _addedWidgetsNotifier.dispose();\n    super.dispose();\n  }\n\n  Widget _buildIsEdit(_IsEditWidgetBuilder builder) {\n    return ValueListenableBuilder(\n      valueListenable: _isEditNotifier,\n      builder: (_, isEdit, _) {\n        return builder(isEdit);\n      },\n    );\n  }\n\n  Future<void> _handleConnection() async {\n    final coreStatus = ref.read(coreStatusProvider);\n    if (coreStatus == CoreStatus.connecting) {\n      return;\n    }\n    final tip = coreStatus == CoreStatus.connected\n        ? appLocalizations.forceRestartCoreTip\n        : appLocalizations.restartCoreTip;\n    final res = await globalState.showMessage(message: TextSpan(text: tip));\n    if (res != true) {\n      return;\n    }\n    appController.restartCore();\n  }\n\n  List<Widget> _buildActions(bool isEdit) {\n    return [\n      if (!isEdit)\n        Consumer(\n          builder: (_, ref, _) {\n            final coreStatus = ref.watch(coreStatusProvider);\n            return Tooltip(\n              message: appLocalizations.coreStatus,\n              child: FadeScaleBox(\n                alignment: Alignment.centerRight,\n                child: coreStatus == CoreStatus.connected\n                    ? IconButton.filled(\n                        visualDensity: VisualDensity.compact,\n                        iconSize: 20,\n                        padding: EdgeInsets.zero,\n                        style: IconButton.styleFrom(\n                          backgroundColor: Colors.greenAccent,\n                          foregroundColor: switch (Theme.brightnessOf(\n                            context,\n                          )) {\n                            Brightness.light =>\n                              context.colorScheme.onSurfaceVariant,\n                            Brightness.dark =>\n                              context.colorScheme.onPrimaryFixedVariant,\n                          },\n                        ),\n                        onPressed: _handleConnection,\n                        icon: Icon(Icons.check, fontWeight: FontWeight.w900),\n                      )\n                    : FilledButton.icon(\n                        key: ValueKey(coreStatus),\n                        onPressed: _handleConnection,\n                        style: FilledButton.styleFrom(\n                          visualDensity: VisualDensity.compact,\n                          padding: EdgeInsets.symmetric(horizontal: 12),\n                          backgroundColor: switch (coreStatus) {\n                            CoreStatus.connecting => null,\n                            CoreStatus.connected => Colors.greenAccent,\n                            CoreStatus.disconnected =>\n                              context.colorScheme.error,\n                          },\n                          foregroundColor: switch (coreStatus) {\n                            CoreStatus.connecting => null,\n                            CoreStatus.connected => switch (Theme.brightnessOf(\n                              context,\n                            )) {\n                              Brightness.light =>\n                                context.colorScheme.onSurfaceVariant,\n                              Brightness.dark => null,\n                            },\n                            CoreStatus.disconnected =>\n                              context.colorScheme.onError,\n                          },\n                        ),\n                        icon: SizedBox(\n                          height: globalState.measure.bodyMediumHeight,\n                          width: globalState.measure.bodyMediumHeight,\n                          child: switch (coreStatus) {\n                            CoreStatus.connecting => Padding(\n                              padding: EdgeInsets.all(2),\n                              child: CircularProgressIndicator(\n                                strokeWidth: 3,\n                                color: context.colorScheme.onPrimary,\n                                backgroundColor: Colors.transparent,\n                              ),\n                            ),\n                            CoreStatus.connected => Icon(\n                              Icons.check_sharp,\n                              fontWeight: FontWeight.w900,\n                            ),\n                            CoreStatus.disconnected => Icon(\n                              Icons.restart_alt_sharp,\n                              fontWeight: FontWeight.w900,\n                            ),\n                          },\n                        ),\n                        label: Text(switch (coreStatus) {\n                          CoreStatus.connecting => appLocalizations.connecting,\n                          CoreStatus.connected => appLocalizations.connected,\n                          CoreStatus.disconnected =>\n                            appLocalizations.disconnected,\n                        }),\n                      ),\n              ),\n            );\n          },\n        ),\n      if (isEdit)\n        ValueListenableBuilder(\n          valueListenable: _addedWidgetsNotifier,\n          builder: (_, addedChildren, child) {\n            if (addedChildren.isEmpty) {\n              return Container();\n            }\n            return child!;\n          },\n          child: IconButton(\n            onPressed: () {\n              _showAddWidgetsModal();\n            },\n            icon: Icon(Icons.add_circle),\n          ),\n        ),\n      FadeRotationScaleBox(\n        child: isEdit\n            ? IconButton(\n                key: ValueKey(true),\n                icon: Icon(Icons.save, key: ValueKey('save-icon')),\n                onPressed: _handleUpdateIsEdit,\n              )\n            : IconButton(\n                key: ValueKey(false),\n                icon: Icon(Icons.edit, key: ValueKey('edit-icon')),\n                onPressed: _handleUpdateIsEdit,\n              ),\n      ),\n    ];\n  }\n\n  void _showAddWidgetsModal() {\n    showSheet(\n      builder: (_, type) {\n        return ValueListenableBuilder(\n          valueListenable: _addedWidgetsNotifier,\n          builder: (_, value, _) {\n            return AdaptiveSheetScaffold(\n              type: type,\n              body: _AddDashboardWidgetModal(\n                items: value,\n                onAdd: (gridItem) {\n                  key.currentState?.handleAdd(gridItem);\n                },\n              ),\n              title: appLocalizations.add,\n            );\n          },\n        );\n      },\n      context: context,\n    );\n  }\n\n  Future<void> _handleUpdateIsEdit() async {\n    if (_isEditNotifier.value == true) {\n      await _handleSave();\n    }\n    _isEditNotifier.value = !_isEditNotifier.value;\n  }\n\n  Future<void> _handleSave() async {\n    final currentState = key.currentState;\n    if (currentState == null) {\n      return;\n    }\n    if (mounted) {\n      await currentState.isTransformCompleter;\n      final dashboardWidgets = currentState.children\n          .map((item) => DashboardWidget.getDashboardWidget(item))\n          .toList();\n      ref\n          .read(appSettingProvider.notifier)\n          .update(\n            (state) => state.copyWith(dashboardWidgets: dashboardWidgets),\n          );\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final dashboardState = ref.watch(dashboardStateProvider);\n    final columns = max(4 * ((dashboardState.contentWidth / 280).ceil()), 8);\n    final spacing = 14.mAp;\n    final children = [\n      ...dashboardState.dashboardWidgets\n          .where(\n            (item) => item.platforms.contains(SupportPlatform.currentPlatform),\n          )\n          .map((item) => item.widget),\n    ];\n    WidgetsBinding.instance.addPostFrameCallback((_) {\n      _addedWidgetsNotifier.value = DashboardWidget.values\n          .where(\n            (item) =>\n                !children.contains(item.widget) &&\n                item.platforms.contains(SupportPlatform.currentPlatform),\n          )\n          .map((item) => item.widget)\n          .toList();\n    });\n    return _buildIsEdit(\n      (isEdit) => CommonScaffold(\n        title: appLocalizations.dashboard,\n        actions: _buildActions(isEdit),\n        floatingActionButton: const StartButton(),\n        body: Align(\n          alignment: Alignment.topCenter,\n          child: SingleChildScrollView(\n            padding: const EdgeInsets.all(16).copyWith(bottom: 88),\n            child: isEdit\n                ? SystemBackBlock(\n                    child: CommonPopScope(\n                      child: SuperGrid(\n                        key: key,\n                        crossAxisCount: columns,\n                        crossAxisSpacing: spacing,\n                        mainAxisSpacing: spacing,\n                        children: [\n                          ...dashboardState.dashboardWidgets\n                              .where(\n                                (item) => item.platforms.contains(\n                                  SupportPlatform.currentPlatform,\n                                ),\n                              )\n                              .map((item) => item.widget),\n                        ],\n                        onUpdate: () {\n                          _handleSave();\n                        },\n                      ),\n                      onPop: (context) {\n                        _handleUpdateIsEdit();\n                        return false;\n                      },\n                    ),\n                  )\n                : Grid(\n                    crossAxisCount: columns,\n                    crossAxisSpacing: spacing,\n                    mainAxisSpacing: spacing,\n                    children: children,\n                  ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n\nclass _AddDashboardWidgetModal extends StatelessWidget {\n  final List<GridItem> items;\n  final Function(GridItem item) onAdd;\n\n  const _AddDashboardWidgetModal({required this.items, required this.onAdd});\n\n  @override\n  Widget build(BuildContext context) {\n    return DeferredPointerHandler(\n      child: SingleChildScrollView(\n        padding: EdgeInsets.all(16),\n        child: Grid(\n          crossAxisCount: 8,\n          crossAxisSpacing: 16,\n          mainAxisSpacing: 16,\n          children: items\n              .map(\n                (item) => item.wrap(\n                  builder: (child) {\n                    return _AddedContainer(\n                      onAdd: () {\n                        onAdd(item);\n                      },\n                      child: child,\n                    );\n                  },\n                ),\n              )\n              .toList(),\n        ),\n      ),\n    );\n  }\n}\n\nclass _AddedContainer extends StatefulWidget {\n  final Widget child;\n  final VoidCallback onAdd;\n\n  const _AddedContainer({required this.child, required this.onAdd});\n\n  @override\n  State<_AddedContainer> createState() => _AddedContainerState();\n}\n\nclass _AddedContainerState extends State<_AddedContainer> {\n  @override\n  void initState() {\n    super.initState();\n  }\n\n  @override\n  void didUpdateWidget(_AddedContainer oldWidget) {\n    super.didUpdateWidget(oldWidget);\n    if (oldWidget.child != widget.child) {}\n  }\n\n  Future<void> _handleAdd() async {\n    widget.onAdd();\n  }\n\n  @override\n  void dispose() {\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Stack(\n      clipBehavior: Clip.none,\n      children: [\n        ActivateBox(child: widget.child),\n        Positioned(\n          top: -8,\n          right: -8,\n          child: DeferPointer(\n            child: SizedBox(\n              width: 24,\n              height: 24,\n              child: IconButton.filled(\n                iconSize: 20,\n                padding: EdgeInsets.all(2),\n                onPressed: _handleAdd,\n                icon: Icon(Icons.add),\n              ),\n            ),\n          ),\n        ),\n      ],\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/dashboard/widgets/intranet_ip.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/providers/app.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass IntranetIP extends StatelessWidget {\n  const IntranetIP({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return SizedBox(\n      height: getWidgetHeight(1),\n      child: CommonCard(\n        info: Info(label: appLocalizations.intranetIP, iconData: Icons.devices),\n        onPressed: () {},\n        child: Container(\n          padding: baseInfoEdgeInsets.copyWith(top: 0),\n          child: Column(\n            mainAxisSize: MainAxisSize.max,\n            mainAxisAlignment: MainAxisAlignment.end,\n            children: [\n              SizedBox(\n                height: globalState.measure.bodyMediumHeight + 2,\n                child: Consumer(\n                  builder: (_, ref, _) {\n                    final localIp = ref.watch(localIpProvider);\n                    return FadeThroughBox(\n                      child: localIp != null\n                          ? TooltipText(\n                              text: Text(\n                                localIp.isNotEmpty\n                                    ? localIp\n                                    : appLocalizations.noNetwork,\n                                style: context.textTheme.bodyMedium?.toLight\n                                    .adjustSize(1),\n                                maxLines: 1,\n                                overflow: TextOverflow.ellipsis,\n                              ),\n                            )\n                          : Container(\n                              padding: EdgeInsets.all(2),\n                              child: AspectRatio(\n                                aspectRatio: 1,\n                                child: CommonCircleLoading(),\n                              ),\n                            ),\n                    );\n                  },\n                ),\n              ),\n            ],\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/dashboard/widgets/memory_info.dart",
    "content": "import 'dart:async';\nimport 'dart:io';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/core/controller.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\n\nfinal _memoryStateNotifier = ValueNotifier<num>(0);\n\nclass MemoryInfo extends StatefulWidget {\n  const MemoryInfo({super.key});\n\n  @override\n  State<MemoryInfo> createState() => _MemoryInfoState();\n}\n\nclass _MemoryInfoState extends State<MemoryInfo> {\n  Timer? timer;\n\n  @override\n  void initState() {\n    super.initState();\n    _updateMemory();\n  }\n\n  @override\n  void dispose() {\n    timer?.cancel();\n    super.dispose();\n  }\n\n  Future<void> _updateMemory() async {\n    WidgetsBinding.instance.addPostFrameCallback((_) async {\n      final rss = ProcessInfo.currentRss;\n      if (coreController.isCompleted) {\n        _memoryStateNotifier.value = await coreController.getMemory() + rss;\n      } else {\n        _memoryStateNotifier.value = rss;\n      }\n      timer = Timer(Duration(seconds: 2), () async {\n        _updateMemory();\n      });\n    });\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return SizedBox(\n      height: getWidgetHeight(1),\n      child: CommonCard(\n        info: Info(iconData: Icons.memory, label: appLocalizations.memoryInfo),\n        onPressed: () {\n          coreController.requestGc();\n        },\n        child: Container(\n          padding: baseInfoEdgeInsets.copyWith(top: 0),\n          child: Column(\n            mainAxisSize: MainAxisSize.max,\n            mainAxisAlignment: MainAxisAlignment.end,\n            crossAxisAlignment: CrossAxisAlignment.start,\n            children: [\n              SizedBox(\n                height: globalState.measure.bodyMediumHeight + 2,\n                child: ValueListenableBuilder(\n                  valueListenable: _memoryStateNotifier,\n                  builder: (_, memory, _) {\n                    final traffic = memory.traffic;\n                    return Row(\n                      mainAxisAlignment: MainAxisAlignment.start,\n                      children: [\n                        Text(\n                          traffic.value,\n                          style: context.textTheme.bodyMedium?.toLight\n                              .adjustSize(1),\n                        ),\n                        SizedBox(width: 8),\n                        Text(\n                          traffic.unit,\n                          style: context.textTheme.bodyMedium?.toLight\n                              .adjustSize(1),\n                        ),\n                      ],\n                    );\n                  },\n                ),\n              ),\n            ],\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/dashboard/widgets/network_detection.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/providers/app.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass NetworkDetection extends ConsumerStatefulWidget {\n  const NetworkDetection({super.key});\n\n  @override\n  ConsumerState<NetworkDetection> createState() => _NetworkDetectionState();\n}\n\nclass _NetworkDetectionState extends ConsumerState<NetworkDetection> {\n  String _countryCodeToEmoji(String countryCode) {\n    final String code = countryCode.toUpperCase();\n    if (code.length != 2) {\n      return countryCode;\n    }\n    final int firstLetter = code.codeUnitAt(0) - 0x41 + 0x1F1E6;\n    final int secondLetter = code.codeUnitAt(1) - 0x41 + 0x1F1E6;\n    return String.fromCharCode(firstLetter) + String.fromCharCode(secondLetter);\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final networkDetection = ref.watch(networkDetectionProvider);\n    final ipInfo = networkDetection.ipInfo;\n    final isLoading = networkDetection.isLoading;\n    final emojiTextStyle = context.textTheme.titleMedium?.toLight.copyWith(\n      fontFamily: FontFamily.twEmoji.value,\n    );\n    final titleTextStyle = context.colorScheme.onSurfaceVariant;\n    final descTextStyle = context.textTheme.titleSmall?.copyWith(\n      color: context.colorScheme.onSurfaceVariant,\n    );\n    return SizedBox(\n      height: getWidgetHeight(1),\n      child: CommonCard(\n        onPressed: () {},\n        child: Column(\n          mainAxisAlignment: MainAxisAlignment.spaceBetween,\n          children: [\n            Container(\n              height: globalState.measure.titleMediumHeight + 16,\n              padding: baseInfoEdgeInsets.copyWith(bottom: 0),\n              child: Row(\n                mainAxisSize: MainAxisSize.max,\n                children: [\n                  ipInfo != null\n                      ? Text(\n                          _countryCodeToEmoji(ipInfo.countryCode),\n                          style: emojiTextStyle,\n                        )\n                      : Icon(Icons.network_check, color: titleTextStyle),\n                  const SizedBox(width: 8),\n                  Flexible(\n                    flex: 1,\n                    child: TooltipText(\n                      text: Text(\n                        appLocalizations.networkDetection,\n                        maxLines: 1,\n                        overflow: TextOverflow.ellipsis,\n                        style: descTextStyle,\n                      ),\n                    ),\n                  ),\n                  SizedBox(width: 2),\n                  AspectRatio(\n                    aspectRatio: 1,\n                    child: IconButton(\n                      padding: EdgeInsets.zero,\n                      onPressed: () {\n                        globalState.showMessage(\n                          title: appLocalizations.tip,\n                          message: TextSpan(\n                            text: appLocalizations.detectionTip,\n                          ),\n                          cancelable: false,\n                        );\n                      },\n                      icon: Icon(\n                        size: 16.ap,\n                        Icons.info_outline,\n                        color: context.colorScheme.onSurfaceVariant,\n                      ),\n                    ),\n                  ),\n                ],\n              ),\n            ),\n            Container(\n              padding: baseInfoEdgeInsets.copyWith(top: 0),\n              child: SizedBox(\n                height: globalState.measure.bodyMediumHeight + 2,\n                child: FadeThroughBox(\n                  child: ipInfo != null\n                      ? TooltipText(\n                          text: Text(\n                            ipInfo.ip,\n                            style: context.textTheme.bodyMedium?.toLight\n                                .adjustSize(1),\n                            maxLines: 1,\n                            overflow: TextOverflow.ellipsis,\n                          ),\n                        )\n                      : isLoading == false && ipInfo == null\n                      ? Text(\n                          'timeout',\n                          style: context.textTheme.bodyMedium\n                              ?.copyWith(color: Colors.red)\n                              .adjustSize(1),\n                          maxLines: 1,\n                          overflow: TextOverflow.ellipsis,\n                        )\n                      : Container(\n                          padding: const EdgeInsets.all(2),\n                          child: const AspectRatio(\n                            aspectRatio: 1,\n                            child: CommonCircleLoading(),\n                          ),\n                        ),\n                ),\n              ),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/dashboard/widgets/network_speed.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/providers/app.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass NetworkSpeed extends StatefulWidget {\n  const NetworkSpeed({super.key});\n\n  @override\n  State<NetworkSpeed> createState() => _NetworkSpeedState();\n}\n\nclass _NetworkSpeedState extends State<NetworkSpeed> {\n  List<Point> initPoints = const [Point(0, 0), Point(1, 0)];\n\n  List<Point> _getPoints(List<Traffic> traffics) {\n    List<Point> trafficPoints = traffics\n        .toList()\n        .asMap()\n        .map(\n          (index, e) => MapEntry(\n            index,\n            Point((index + initPoints.length).toDouble(), e.speed.toDouble()),\n          ),\n        )\n        .values\n        .toList();\n\n    return [...initPoints, ...trafficPoints];\n  }\n\n  Traffic _getLastTraffic(List<Traffic> traffics) {\n    if (traffics.isEmpty) return Traffic();\n    return traffics.last;\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final color = context.colorScheme.onSurfaceVariant.opacity80;\n    return SizedBox(\n      height: getWidgetHeight(2),\n      child: RepaintBoundary(\n        child: CommonCard(\n          onPressed: () {},\n          child: Consumer(\n            builder: (_, ref, _) {\n              final traffics = ref.watch(trafficsProvider).list;\n              return Column(\n                children: [\n                  Padding(\n                    padding: baseInfoEdgeInsets.copyWith(bottom: 0),\n                    child: Row(\n                      mainAxisAlignment: MainAxisAlignment.spaceBetween,\n                      children: [\n                        Flexible(\n                          child: InfoHeader(\n                            padding: EdgeInsets.zero,\n                            info: Info(\n                              label: appLocalizations.networkSpeed,\n                              iconData: Icons.speed_sharp,\n                            ),\n                          ),\n                        ),\n                        SizedBox(width: 8),\n                        Text(\n                          _getLastTraffic(traffics).speedText,\n                          style: context.textTheme.bodySmall?.copyWith(\n                            color: color,\n                          ),\n                        ),\n                      ],\n                    ),\n                  ),\n                  Flexible(\n                    child: Padding(\n                      padding: EdgeInsets.all(\n                        16,\n                      ).copyWith(bottom: 0, left: 0, right: 0),\n                      child: LineChart(\n                        gradient: true,\n                        color: Theme.of(context).colorScheme.primary,\n                        points: _getPoints(traffics),\n                      ),\n                    ),\n                  ),\n                ],\n              );\n            },\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/dashboard/widgets/outbound_mode.dart",
    "content": "import 'dart:math';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/providers/config.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:intl/intl.dart';\n\nclass OutboundMode extends StatelessWidget {\n  const OutboundMode({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    final height = getWidgetHeight(2);\n    return SizedBox(\n      height: height,\n      child: Consumer(\n        builder: (_, ref, _) {\n          final mode = ref.watch(\n            patchClashConfigProvider.select((state) => state.mode),\n          );\n          return Theme(\n            data: Theme.of(context).copyWith(\n              splashColor: Colors.transparent,\n              highlightColor: Colors.transparent,\n              hoverColor: Colors.transparent,\n            ),\n            child: CommonCard(\n              onPressed: () {},\n              info: Info(\n                label: appLocalizations.outboundMode,\n                iconData: Icons.call_split_sharp,\n              ),\n              child: Padding(\n                padding: const EdgeInsets.only(top: 12, bottom: 12),\n                child: RadioGroup<Mode>(\n                  groupValue: mode,\n                  onChanged: (value) {\n                    if (value == null) {\n                      return;\n                    }\n                    appController.changeMode(value);\n                  },\n                  child: LayoutBuilder(\n                    builder: (_, constraints) {\n                      final maxHeight = constraints.maxHeight;\n                      return Column(\n                        mainAxisSize: MainAxisSize.max,\n                        crossAxisAlignment: CrossAxisAlignment.start,\n                        mainAxisAlignment: MainAxisAlignment.start,\n                        children: [\n                          for (final item in Mode.values)\n                            ListItem.radio(\n                              horizontalTitleGap: 8,\n                              tileTitleAlignment: ListTileTitleAlignment.center,\n                              minTileHeight: min(\n                                maxHeight / 3,\n                                globalState.measure.bodyMediumHeight + 16,\n                              ),\n                              minVerticalPadding: 0,\n                              padding: EdgeInsets.only(\n                                left: 12.ap,\n                                right: 16.ap,\n                              ),\n                              delegate: RadioDelegate(\n                                onTab: () {\n                                  appController.changeMode(item);\n                                },\n                                value: item,\n                              ),\n                              title: Text(\n                                Intl.message(item.name),\n                                style: Theme.of(\n                                  context,\n                                ).textTheme.bodyMedium?.toSoftBold,\n                              ),\n                            ),\n                        ],\n                      );\n                    },\n                  ),\n                ),\n              ),\n            ),\n          );\n        },\n      ),\n    );\n  }\n}\n\nclass OutboundModeV2 extends StatelessWidget {\n  const OutboundModeV2({super.key});\n\n  Color _getTextColor(BuildContext context, Mode mode) {\n    return switch (mode) {\n      Mode.rule => context.colorScheme.onSecondaryContainer,\n      Mode.global => context.colorScheme.onPrimaryContainer,\n      Mode.direct => context.colorScheme.onTertiaryContainer,\n    };\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final height = getWidgetHeight(1);\n    return SizedBox(\n      height: height,\n      child: CommonCard(\n        padding: EdgeInsets.zero,\n        child: Consumer(\n          builder: (_, ref, _) {\n            final mode = ref.watch(\n              patchClashConfigProvider.select((state) => state.mode),\n            );\n            final thumbColor = switch (mode) {\n              Mode.rule => context.colorScheme.secondaryContainer,\n              Mode.global => globalState.theme.darken3PrimaryContainer,\n              Mode.direct => context.colorScheme.tertiaryContainer,\n            };\n            return LayoutBuilder(\n              builder: (_, constraints) {\n                return Column(\n                  mainAxisSize: MainAxisSize.max,\n                  children: [\n                    Expanded(\n                      child: Container(\n                        padding: EdgeInsets.all(12),\n                        constraints: BoxConstraints.expand(),\n                        child: CommonTabBar<Mode>(\n                          children: Map.fromEntries(\n                            Mode.values.map(\n                              (item) => MapEntry(\n                                item,\n                                Container(\n                                  clipBehavior: Clip.antiAlias,\n                                  alignment: Alignment.center,\n                                  decoration: BoxDecoration(),\n                                  height: height - 8.ap - 24,\n                                  padding: EdgeInsets.all(4),\n                                  child: Text(\n                                    Intl.message(item.name),\n                                    style: Theme.of(context)\n                                        .textTheme\n                                        .titleSmall\n                                        ?.adjustSize(1)\n                                        .copyWith(\n                                          color: item == mode\n                                              ? _getTextColor(context, item)\n                                              : null,\n                                        ),\n                                  ),\n                                ),\n                              ),\n                            ),\n                          ),\n                          padding: EdgeInsets.symmetric(horizontal: 0),\n                          groupValue: mode,\n                          onValueChanged: (value) {\n                            if (value == null) {\n                              return;\n                            }\n                            appController.changeMode(value);\n                          },\n                          thumbColor: thumbColor,\n                        ),\n                      ),\n                    ),\n                    Container(\n                      color: thumbColor.opacity50,\n                      height: 8.ap,\n                      width: constraints.maxWidth,\n                      padding: EdgeInsets.symmetric(horizontal: 16),\n                      // child: Row(\n                      //   children: [\n                      //     Container(\n                      //       width: (constraints.maxWidth - 32) / 3,\n                      //       height: 3,\n                      //       decoration: BoxDecoration(\n                      //         color: _getTextColor(context, mode),\n                      //         borderRadius: BorderRadius.circular(2),\n                      //       ),\n                      //     ),\n                      //   ],\n                      // ),\n                    ),\n                  ],\n                );\n              },\n            );\n          },\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/dashboard/widgets/quick_options.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/providers/config.dart';\nimport 'package:fl_clash/views/config/network.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass TUNButton extends StatelessWidget {\n  const TUNButton({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return SizedBox(\n      height: getWidgetHeight(1),\n      child: CommonCard(\n        onPressed: () {\n          showSheet(\n            context: context,\n            builder: (_, type) {\n              return AdaptiveSheetScaffold(\n                type: type,\n                body: generateListView(\n                  generateSection(\n                    items: [\n                      if (system.isDesktop) const TUNItem(),\n                      if (system.isMacOS) const AutoSetSystemDnsItem(),\n                      const TunStackItem(),\n                    ],\n                  ),\n                ),\n                title: appLocalizations.tun,\n              );\n            },\n          );\n        },\n        info: Info(\n          label: appLocalizations.tun,\n          iconData: Icons.stacked_line_chart,\n        ),\n        child: Container(\n          padding: baseInfoEdgeInsets.copyWith(top: 4, bottom: 8, right: 8),\n          child: Row(\n            mainAxisSize: MainAxisSize.max,\n            mainAxisAlignment: MainAxisAlignment.spaceBetween,\n            children: [\n              Flexible(\n                flex: 1,\n                child: TooltipText(\n                  text: Text(\n                    appLocalizations.options,\n                    maxLines: 1,\n                    overflow: TextOverflow.ellipsis,\n                    style: Theme.of(\n                      context,\n                    ).textTheme.titleSmall?.adjustSize(-2).toLight,\n                  ),\n                ),\n              ),\n              Consumer(\n                builder: (_, ref, _) {\n                  final enable = ref.watch(\n                    patchClashConfigProvider.select(\n                      (state) => state.tun.enable,\n                    ),\n                  );\n                  return Switch(\n                    value: enable,\n                    onChanged: (value) {\n                      ref\n                          .read(patchClashConfigProvider.notifier)\n                          .update((state) => state.copyWith.tun(enable: value));\n                    },\n                  );\n                },\n              ),\n            ],\n          ),\n        ),\n      ),\n    );\n  }\n}\n\nclass SystemProxyButton extends StatelessWidget {\n  const SystemProxyButton({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return SizedBox(\n      height: getWidgetHeight(1),\n      child: CommonCard(\n        onPressed: () {\n          showSheet(\n            context: context,\n            builder: (_, type) {\n              return AdaptiveSheetScaffold(\n                type: type,\n                body: generateListView(\n                  generateSection(\n                    items: [SystemProxyItem(), BypassDomainItem()],\n                  ),\n                ),\n                title: appLocalizations.systemProxy,\n              );\n            },\n          );\n        },\n        info: Info(\n          label: appLocalizations.systemProxy,\n          iconData: Icons.shuffle,\n        ),\n        child: Container(\n          padding: baseInfoEdgeInsets.copyWith(top: 4, bottom: 8, right: 8),\n          child: Row(\n            mainAxisSize: MainAxisSize.max,\n            mainAxisAlignment: MainAxisAlignment.spaceBetween,\n            children: [\n              Flexible(\n                flex: 1,\n                child: TooltipText(\n                  text: Text(\n                    appLocalizations.options,\n                    maxLines: 1,\n                    overflow: TextOverflow.ellipsis,\n                    style: Theme.of(\n                      context,\n                    ).textTheme.titleSmall?.adjustSize(-2).toLight,\n                  ),\n                ),\n              ),\n              Consumer(\n                builder: (_, ref, _) {\n                  final systemProxy = ref.watch(\n                    networkSettingProvider.select((state) => state.systemProxy),\n                  );\n                  return Switch(\n                    materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,\n                    value: systemProxy,\n                    onChanged: (value) {\n                      ref\n                          .read(networkSettingProvider.notifier)\n                          .update(\n                            (state) => state.copyWith(systemProxy: value),\n                          );\n                    },\n                  );\n                },\n              ),\n            ],\n          ),\n        ),\n      ),\n    );\n  }\n}\n\nclass VpnButton extends StatelessWidget {\n  const VpnButton({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return SizedBox(\n      height: getWidgetHeight(1),\n      child: CommonCard(\n        onPressed: () {\n          showSheet(\n            context: context,\n            builder: (_, type) {\n              return AdaptiveSheetScaffold(\n                type: type,\n                body: generateListView(\n                  generateSection(\n                    items: [\n                      const VPNItem(),\n                      const VpnSystemProxyItem(),\n                      const TunStackItem(),\n                    ],\n                  ),\n                ),\n                title: 'VPN',\n              );\n            },\n          );\n        },\n        info: Info(label: 'VPN', iconData: Icons.stacked_line_chart),\n        child: Container(\n          padding: baseInfoEdgeInsets.copyWith(top: 4, bottom: 8, right: 8),\n          child: Row(\n            mainAxisSize: MainAxisSize.max,\n            mainAxisAlignment: MainAxisAlignment.spaceBetween,\n            children: [\n              Flexible(\n                flex: 1,\n                child: TooltipText(\n                  text: Text(\n                    appLocalizations.options,\n                    maxLines: 1,\n                    overflow: TextOverflow.ellipsis,\n                    style: Theme.of(\n                      context,\n                    ).textTheme.titleSmall?.adjustSize(-2).toLight,\n                  ),\n                ),\n              ),\n              Consumer(\n                builder: (_, ref, _) {\n                  final enable = ref.watch(\n                    vpnSettingProvider.select((state) => state.enable),\n                  );\n                  return Switch(\n                    value: enable,\n                    onChanged: (value) {\n                      ref\n                          .read(vpnSettingProvider.notifier)\n                          .update((state) => state.copyWith(enable: value));\n                    },\n                  );\n                },\n              ),\n            ],\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/dashboard/widgets/start_button.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/providers/database.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass StartButton extends ConsumerStatefulWidget {\n  const StartButton({super.key});\n\n  @override\n  ConsumerState<StartButton> createState() => _StartButtonState();\n}\n\nclass _StartButtonState extends ConsumerState<StartButton>\n    with SingleTickerProviderStateMixin {\n  AnimationController? _controller;\n  late Animation<double> _animation;\n  bool isStart = false;\n\n  @override\n  void initState() {\n    super.initState();\n    isStart = ref.read(isStartProvider);\n    _controller = AnimationController(\n      vsync: this,\n      value: isStart ? 1 : 0,\n      duration: const Duration(milliseconds: 200),\n    );\n    _animation = CurvedAnimation(\n      parent: _controller!,\n      curve: Curves.easeOutBack,\n    );\n    ref.listenManual(isStartProvider, (prev, next) {\n      if (next != isStart) {\n        isStart = next;\n        updateController();\n      }\n    }, fireImmediately: true);\n  }\n\n  @override\n  void dispose() {\n    _controller?.dispose();\n    _controller = null;\n    super.dispose();\n  }\n\n  void handleSwitchStart() {\n    isStart = !isStart;\n    updateController();\n    debouncer.call(FunctionTag.updateStatus, () {\n      appController.updateStatus(isStart, isInit: !ref.read(initProvider));\n    }, duration: commonDuration);\n  }\n\n  void updateController() {\n    WidgetsBinding.instance.addPostFrameCallback((_) {\n      if (isStart && mounted) {\n        _controller?.forward();\n      } else {\n        _controller?.reverse();\n      }\n    });\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final hasProfile = ref.watch(\n      profilesProvider.select((state) => state.isNotEmpty),\n    );\n    if (!hasProfile) {\n      return Container();\n    }\n    return Theme(\n      data: Theme.of(context).copyWith(\n        floatingActionButtonTheme: Theme.of(context).floatingActionButtonTheme\n            .copyWith(\n              sizeConstraints: BoxConstraints(minWidth: 56, maxWidth: 200),\n            ),\n      ),\n      child: AnimatedBuilder(\n        animation: _controller!.view,\n        builder: (_, child) {\n          final textWidth =\n              globalState.measure\n                  .computeTextSize(\n                    Text(\n                      utils.getTimeDifference(DateTime.now()),\n                      style: context.textTheme.titleMedium?.toSoftBold,\n                    ),\n                  )\n                  .width +\n              16;\n          return FloatingActionButton(\n            clipBehavior: Clip.antiAlias,\n            materialTapTargetSize: MaterialTapTargetSize.padded,\n            heroTag: null,\n            onPressed: () {\n              handleSwitchStart();\n            },\n            child: Row(\n              mainAxisSize: MainAxisSize.min,\n              children: [\n                Container(\n                  height: 56,\n                  width: 56,\n                  alignment: Alignment.center,\n                  child: AnimatedIcon(\n                    icon: AnimatedIcons.play_pause,\n                    progress: _animation,\n                  ),\n                ),\n                SizedBox(width: textWidth * _animation.value, child: child!),\n              ],\n            ),\n          );\n        },\n        child: Consumer(\n          builder: (_, ref, _) {\n            final runTime = ref.watch(runTimeProvider);\n            final text = utils.getTimeText(runTime);\n            return Text(\n              text,\n              maxLines: 1,\n              overflow: TextOverflow.visible,\n              style: Theme.of(context).textTheme.titleMedium?.toSoftBold\n                  .copyWith(color: context.colorScheme.onPrimaryContainer),\n            );\n          },\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/dashboard/widgets/traffic_usage.dart",
    "content": "import 'dart:math';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/providers/app.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass TrafficUsage extends StatelessWidget {\n  const TrafficUsage({super.key});\n\n  Widget _buildTrafficDataItem(\n    BuildContext context,\n    Icon icon,\n    num trafficValue,\n  ) {\n    return Row(\n      mainAxisAlignment: MainAxisAlignment.spaceBetween,\n      mainAxisSize: MainAxisSize.max,\n      children: [\n        Flexible(\n          flex: 1,\n          child: Row(\n            mainAxisSize: MainAxisSize.max,\n            mainAxisAlignment: MainAxisAlignment.start,\n            children: [\n              icon,\n              const SizedBox(width: 8),\n              Flexible(\n                flex: 1,\n                child: Text(\n                  trafficValue.traffic.value,\n                  style: context.textTheme.bodySmall,\n                  maxLines: 1,\n                ),\n              ),\n            ],\n          ),\n        ),\n        Text(\n          trafficValue.traffic.unit,\n          style: context.textTheme.bodySmall?.toLighter,\n        ),\n      ],\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final primaryColor = globalState.theme.darken3PrimaryContainer;\n    final secondaryColor = globalState.theme.darken2SecondaryContainer;\n    return SizedBox(\n      height: getWidgetHeight(2),\n      child: CommonCard(\n        info: Info(\n          label: appLocalizations.trafficUsage,\n          iconData: Icons.data_saver_off,\n        ),\n        onPressed: () {},\n        child: Consumer(\n          builder: (_, ref, _) {\n            final totalTraffic = ref.watch(totalTrafficProvider);\n            final upTotalTrafficValue = totalTraffic.up;\n            final downTotalTrafficValue = totalTraffic.down;\n            return Padding(\n              padding: baseInfoEdgeInsets.copyWith(top: 0),\n              child: Column(\n                mainAxisSize: MainAxisSize.max,\n                mainAxisAlignment: MainAxisAlignment.end,\n                crossAxisAlignment: CrossAxisAlignment.start,\n                children: [\n                  Flexible(\n                    child: Container(\n                      padding: EdgeInsets.symmetric(vertical: 12),\n                      child: Row(\n                        mainAxisSize: MainAxisSize.max,\n                        mainAxisAlignment: MainAxisAlignment.spaceBetween,\n                        children: [\n                          AspectRatio(\n                            aspectRatio: 1,\n                            child: DonutChart(\n                              data: [\n                                DonutChartData(\n                                  value: upTotalTrafficValue.toDouble(),\n                                  color: primaryColor,\n                                ),\n                                DonutChartData(\n                                  value: downTotalTrafficValue.toDouble(),\n                                  color: secondaryColor,\n                                ),\n                              ],\n                            ),\n                          ),\n                          SizedBox(width: 8),\n                          Flexible(\n                            child: LayoutBuilder(\n                              builder: (_, container) {\n                                final uploadText = Text(\n                                  maxLines: 1,\n                                  appLocalizations.upload,\n                                  overflow: TextOverflow.ellipsis,\n                                  style: context.textTheme.bodySmall,\n                                );\n                                final downloadText = Text(\n                                  maxLines: 1,\n                                  appLocalizations.download,\n                                  overflow: TextOverflow.ellipsis,\n                                  style: context.textTheme.bodySmall,\n                                );\n                                final uploadTextSize = globalState.measure\n                                    .computeTextSize(uploadText);\n                                final downloadTextSize = globalState.measure\n                                    .computeTextSize(downloadText);\n                                final maxTextWidth = max(\n                                  uploadTextSize.width,\n                                  downloadTextSize.width,\n                                );\n                                if (maxTextWidth + 24 > container.maxWidth) {\n                                  return Container();\n                                }\n                                return Column(\n                                  crossAxisAlignment: CrossAxisAlignment.start,\n                                  children: [\n                                    Row(\n                                      mainAxisSize: MainAxisSize.min,\n                                      children: [\n                                        Container(\n                                          width: 20,\n                                          height: 8,\n                                          decoration: ShapeDecoration(\n                                            color: primaryColor,\n                                            shape: RoundedSuperellipseBorder(\n                                              borderRadius:\n                                                  BorderRadius.circular(3),\n                                            ),\n                                          ),\n                                        ),\n                                        SizedBox(width: 4),\n                                        Text(\n                                          maxLines: 1,\n                                          appLocalizations.upload,\n                                          overflow: TextOverflow.ellipsis,\n                                          style: context.textTheme.bodySmall,\n                                        ),\n                                      ],\n                                    ),\n                                    SizedBox(height: 4),\n                                    Row(\n                                      mainAxisSize: MainAxisSize.min,\n                                      children: [\n                                        Container(\n                                          width: 20,\n                                          height: 8,\n                                          decoration: ShapeDecoration(\n                                            color: secondaryColor,\n                                            shape: RoundedSuperellipseBorder(\n                                              borderRadius:\n                                                  BorderRadius.circular(3),\n                                            ),\n                                          ),\n                                        ),\n                                        SizedBox(width: 4),\n                                        Text(\n                                          maxLines: 1,\n                                          appLocalizations.download,\n                                          overflow: TextOverflow.ellipsis,\n                                          style: context.textTheme.bodySmall,\n                                        ),\n                                      ],\n                                    ),\n                                  ],\n                                );\n                              },\n                            ),\n                          ),\n                        ],\n                      ),\n                    ),\n                  ),\n                  _buildTrafficDataItem(\n                    context,\n                    Icon(Icons.arrow_upward, color: primaryColor, size: 14),\n                    upTotalTrafficValue,\n                  ),\n                  const SizedBox(height: 8),\n                  _buildTrafficDataItem(\n                    context,\n                    Icon(Icons.arrow_downward, color: secondaryColor, size: 14),\n                    downTotalTrafficValue,\n                  ),\n                ],\n              ),\n            );\n          },\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/dashboard/widgets/widgets.dart",
    "content": "export 'intranet_ip.dart';\nexport 'network_detection.dart';\nexport 'network_speed.dart';\nexport 'outbound_mode.dart';\nexport 'quick_options.dart';\nexport 'traffic_usage.dart';\nexport 'memory_info.dart';"
  },
  {
    "path": "lib/views/developer.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/core/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/common.dart';\nimport 'package:fl_clash/providers/config.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass DeveloperView extends ConsumerWidget {\n  const DeveloperView({super.key});\n\n  Widget _getDeveloperList(BuildContext context, WidgetRef ref) {\n    return generateSectionV2(\n      title: appLocalizations.options,\n      items: [\n        ListItem(\n          title: Text(appLocalizations.messageTest),\n          minVerticalPadding: 12,\n          onTap: () {\n            context.showNotifier(appLocalizations.messageTestTip);\n          },\n        ),\n        ListItem(\n          title: Text(appLocalizations.logsTest),\n          minVerticalPadding: 12,\n          onTap: () {\n            for (int i = 0; i < 1000; i++) {\n              appController.addLog(\n                Log.app(\n                  '[$i]${utils.generateRandomString(maxLength: 200, minLength: 20)}',\n                ),\n              );\n            }\n          },\n        ),\n        if (globalState.isPre)\n          ListItem(\n            title: Text(appLocalizations.crashTest),\n            minVerticalPadding: 12,\n            onTap: () async {\n              final res = await globalState.showMessage(\n                message: TextSpan(text: appLocalizations.confirmForceCrashCore),\n              );\n              if (res != true) {\n                return;\n              }\n              coreController.crash();\n            },\n          ),\n        ListItem(\n          title: Text(appLocalizations.clearData),\n          minVerticalPadding: 12,\n          onTap: () async {\n            final res = await globalState.showMessage(\n              message: TextSpan(text: appLocalizations.confirmClearAllData),\n            );\n            if (res != true) {\n              return;\n            }\n            await appController.handleClear();\n          },\n        ),\n        // ListItem(\n        //   title: Text(appLocalizations.loadTest),\n        //   minVerticalPadding: 12,\n        //   onTap: () {\n        //     ref.read(loadingProvider.notifier).value = !ref.read(\n        //       loadingProvider,\n        //     );\n        //   },\n        // ),\n        ListItem(\n          title: Text(appLocalizations.pruneCache),\n          minVerticalPadding: 12,\n          onTap: () {\n            appController.shakingStore();\n          },\n        ),\n      ],\n    );\n  }\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final enable = ref.watch(\n      appSettingProvider.select((state) => state.developerMode),\n    );\n    return BaseScaffold(\n      title: appLocalizations.developerMode,\n      body: SingleChildScrollView(\n        padding: baseInfoEdgeInsets,\n        child: Column(\n          children: [\n            CommonCard(\n              type: CommonCardType.filled,\n              radius: 18,\n              child: ListItem.switchItem(\n                padding: const EdgeInsets.only(left: 16, right: 16),\n                title: Text(appLocalizations.developerMode),\n                delegate: SwitchDelegate(\n                  value: enable,\n                  onChanged: (value) {\n                    ref\n                        .read(appSettingProvider.notifier)\n                        .update(\n                          (state) => state.copyWith(developerMode: value),\n                        );\n                  },\n                ),\n              ),\n            ),\n            SizedBox(height: 16),\n            _getDeveloperList(context, ref),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/hotkey.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/card.dart';\nimport 'package:fl_clash/widgets/dialog.dart';\nimport 'package:fl_clash/widgets/list.dart';\nimport 'package:fl_clash/widgets/scaffold.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/services.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:intl/intl.dart';\n\nextension IntlExt on Intl {\n  static String actionMessage(String messageText) =>\n      Intl.message('action_$messageText');\n}\n\nclass HotKeyView extends StatelessWidget {\n  const HotKeyView({super.key});\n\n  String getSubtitle(HotKeyAction hotKeyAction) {\n    final key = hotKeyAction.key;\n    if (key == null) {\n      return appLocalizations.noHotKey;\n    }\n    final modifierLabels = hotKeyAction.modifiers.map(\n      (item) => item.physicalKeys.first.label,\n    );\n    var text = '';\n    if (modifierLabels.isNotEmpty) {\n      text += \"${modifierLabels.join(\" \")}+\";\n    }\n    text += PhysicalKeyboardKey(key).label;\n    return text;\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return BaseScaffold(\n      title: appLocalizations.hotkeyManagement,\n      body: ListView.builder(\n        itemCount: HotAction.values.length,\n        itemBuilder: (_, index) {\n          final hotAction = HotAction.values[index];\n          return Consumer(\n            builder: (_, ref, _) {\n              final hotKeyAction = ref.watch(\n                getHotKeyActionProvider(hotAction),\n              );\n              return ListItem(\n                title: Text(IntlExt.actionMessage(hotAction.name)),\n                subtitle: Text(\n                  getSubtitle(hotKeyAction),\n                  style: context.textTheme.bodyMedium?.copyWith(\n                    color: context.colorScheme.primary,\n                  ),\n                ),\n                onTap: () {\n                  globalState.showCommonDialog(\n                    child: HotKeyRecorder(hotKeyAction: hotKeyAction),\n                  );\n                },\n              );\n            },\n          );\n        },\n      ),\n    );\n  }\n}\n\nclass HotKeyRecorder extends ConsumerStatefulWidget {\n  final HotKeyAction hotKeyAction;\n\n  const HotKeyRecorder({super.key, required this.hotKeyAction});\n\n  @override\n  ConsumerState<HotKeyRecorder> createState() => _HotKeyRecorderState();\n}\n\nclass _HotKeyRecorderState extends ConsumerState<HotKeyRecorder> {\n  late ValueNotifier<HotKeyAction> hotKeyActionNotifier;\n\n  @override\n  void initState() {\n    super.initState();\n    hotKeyActionNotifier = ValueNotifier<HotKeyAction>(\n      widget.hotKeyAction.copyWith(),\n    );\n    HardwareKeyboard.instance.addHandler(_handleKeyEvent);\n  }\n\n  bool _handleKeyEvent(KeyEvent keyEvent) {\n    if (keyEvent is KeyUpEvent) return false;\n    final keys = HardwareKeyboard.instance.physicalKeysPressed;\n\n    final key = keyEvent.physicalKey;\n\n    final modifiers = KeyboardModifier.values\n        .where(\n          (e) =>\n              e.physicalKeys.any(keys.contains) &&\n              !e.physicalKeys.contains(key),\n        )\n        .toSet();\n    hotKeyActionNotifier.value = hotKeyActionNotifier.value.copyWith(\n      modifiers: modifiers,\n      key: key.usbHidUsage,\n    );\n    return false;\n  }\n\n  @override\n  void dispose() {\n    HardwareKeyboard.instance.removeHandler(_handleKeyEvent);\n    super.dispose();\n  }\n\n  void _handleRemove() {\n    Navigator.of(context).pop();\n    _updateOrAddHotKeyAction(\n      hotKeyActionNotifier.value.copyWith(modifiers: {}, key: null),\n    );\n  }\n\n  void _handleConfirm() {\n    Navigator.of(context).pop();\n    final hotKeyActions = ref.read(hotKeyActionsProvider);\n    final currentHotkeyAction = hotKeyActionNotifier.value;\n    if (currentHotkeyAction.key == null ||\n        currentHotkeyAction.modifiers.isEmpty) {\n      globalState.showMessage(\n        title: appLocalizations.tip,\n        message: TextSpan(text: appLocalizations.inputCorrectHotkey),\n      );\n      return;\n    }\n    final index = hotKeyActions.indexWhere(\n      (item) =>\n          item.key == currentHotkeyAction.key &&\n          keyboardModifierListEquality.equals(\n            item.modifiers,\n            currentHotkeyAction.modifiers,\n          ),\n    );\n    if (index != -1) {\n      globalState.showMessage(\n        title: appLocalizations.tip,\n        message: TextSpan(text: appLocalizations.hotkeyConflict),\n      );\n      return;\n    }\n    _updateOrAddHotKeyAction(currentHotkeyAction);\n  }\n\n  void _updateOrAddHotKeyAction(HotKeyAction hotKeyAction) {\n    final hotKeyActions = ref.read(hotKeyActionsProvider);\n    final index = hotKeyActions.indexWhere(\n      (item) => item.action == hotKeyAction.action,\n    );\n    if (index == -1) {\n      ref.read(hotKeyActionsProvider.notifier).value = List.from(hotKeyActions)\n        ..add(hotKeyAction);\n    } else {\n      ref.read(hotKeyActionsProvider.notifier).value = List.from(hotKeyActions)\n        ..[index] = hotKeyAction;\n    }\n\n    ref.read(hotKeyActionsProvider.notifier).value = index == -1\n        ? (List.from(hotKeyActions)..add(hotKeyAction))\n        : (List.from(hotKeyActions)..[index] = hotKeyAction);\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Focus(\n      onKeyEvent: (_, _) {\n        return KeyEventResult.handled;\n      },\n      autofocus: true,\n      child: CommonDialog(\n        title: IntlExt.actionMessage(widget.hotKeyAction.action.name),\n        actions: [\n          TextButton(\n            onPressed: () {\n              _handleRemove();\n            },\n            child: Text(appLocalizations.remove),\n          ),\n          const SizedBox(width: 8),\n          TextButton(\n            onPressed: () {\n              _handleConfirm();\n            },\n            child: Text(appLocalizations.confirm),\n          ),\n        ],\n        child: ValueListenableBuilder(\n          valueListenable: hotKeyActionNotifier,\n          builder: (_, hotKeyAction, _) {\n            final key = hotKeyAction.key;\n            final modifiers = hotKeyAction.modifiers;\n            return SizedBox(\n              width: dialogCommonWidth,\n              child: key != null\n                  ? Wrap(\n                      spacing: 8,\n                      crossAxisAlignment: WrapCrossAlignment.center,\n                      children: [\n                        for (final modifier in modifiers)\n                          KeyboardKeyBox(\n                            keyboardKey: modifier.physicalKeys.first,\n                          ),\n                        if (modifiers.isNotEmpty)\n                          Text('+', style: context.textTheme.titleMedium),\n                        KeyboardKeyBox(keyboardKey: PhysicalKeyboardKey(key)),\n                      ],\n                    )\n                  : Text(\n                      appLocalizations.pressKeyboard,\n                      style: context.textTheme.titleMedium,\n                    ),\n            );\n          },\n        ),\n      ),\n    );\n  }\n}\n\nclass KeyboardKeyBox extends StatelessWidget {\n  final KeyboardKey keyboardKey;\n\n  const KeyboardKeyBox({super.key, required this.keyboardKey});\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonCard(\n      type: CommonCardType.filled,\n      child: Padding(\n        padding: const EdgeInsets.all(12),\n        child: Text(keyboardKey.label, style: const TextStyle(fontSize: 16)),\n      ),\n      onPressed: () {},\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/logs.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:super_sliver_list/super_sliver_list.dart';\n\nclass LogsView extends ConsumerStatefulWidget {\n  const LogsView({super.key});\n\n  @override\n  ConsumerState<LogsView> createState() => _LogsViewState();\n}\n\nclass _LogsViewState extends ConsumerState<LogsView> {\n  final _logsStateNotifier = ValueNotifier<LogsState>(LogsState());\n  late ScrollController _scrollController;\n\n  List<Log> _logs = [];\n\n  @override\n  void initState() {\n    super.initState();\n    _logs = ref.read(logsProvider).list;\n    _scrollController = ScrollController(initialScrollOffset: double.maxFinite);\n    _logsStateNotifier.value = _logsStateNotifier.value.copyWith(logs: _logs);\n    ref.listenManual(logsProvider.select((state) => state.list), (prev, next) {\n      if (prev != next) {\n        final isEquality = logListEquality.equals(prev, next);\n        if (!isEquality) {\n          _logs = next;\n          updateLogsThrottler();\n        }\n      }\n    });\n  }\n\n  List<Widget> _buildActions() {\n    return [\n      IconButton(\n        onPressed: () {\n          _handleExport();\n        },\n        icon: const Icon(Icons.save_as_outlined),\n      ),\n    ];\n  }\n\n  void _onSearch(String value) {\n    _logsStateNotifier.value = _logsStateNotifier.value.copyWith(query: value);\n  }\n\n  void _onKeywordsUpdate(List<String> keywords) {\n    _logsStateNotifier.value = _logsStateNotifier.value.copyWith(\n      keywords: keywords,\n    );\n  }\n\n  @override\n  void dispose() {\n    _logsStateNotifier.dispose();\n    _scrollController.dispose();\n    super.dispose();\n  }\n\n  Future<void> _handleExport() async {\n    final res = await appController.safeRun<bool>(() async {\n      return await appController.exportLogs();\n    }, title: appLocalizations.exportLogs);\n    if (res != true) return;\n    globalState.showMessage(\n      title: appLocalizations.tip,\n      message: TextSpan(text: appLocalizations.exportSuccess),\n    );\n  }\n\n  void updateLogsThrottler() {\n    throttler.call(FunctionTag.logs, () {\n      if (!mounted) {\n        return;\n      }\n      final isEquality = logListEquality.equals(\n        _logs,\n        _logsStateNotifier.value.logs,\n      );\n      if (isEquality) {\n        return;\n      }\n      WidgetsBinding.instance.addPostFrameCallback((_) {\n        if (mounted) {\n          _logsStateNotifier.value = _logsStateNotifier.value.copyWith(\n            logs: _logs,\n          );\n        }\n      });\n    }, duration: commonDuration);\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonScaffold(\n      actions: _buildActions(),\n      onKeywordsUpdate: _onKeywordsUpdate,\n      searchState: AppBarSearchState(onSearch: _onSearch),\n      title: appLocalizations.logs,\n      floatingActionButton: ValueListenableBuilder(\n        valueListenable: _logsStateNotifier,\n        builder: (_, state, _) {\n          final autoScrollToEnd = state.autoScrollToEnd;\n          return FadeRotationScaleBox(\n            child: FloatingActionButton(\n              key: ValueKey(autoScrollToEnd),\n              onPressed: () {\n                _logsStateNotifier.value = _logsStateNotifier.value.copyWith(\n                  autoScrollToEnd: !_logsStateNotifier.value.autoScrollToEnd,\n                );\n              },\n              child: autoScrollToEnd\n                  ? const Icon(Icons.block)\n                  : const Icon(Icons.vertical_align_top),\n            ),\n          );\n        },\n      ),\n      body: ValueListenableBuilder<LogsState>(\n        valueListenable: _logsStateNotifier,\n        builder: (context, state, _) {\n          final logs = state.list;\n          if (logs.isEmpty) {\n            return NullStatus(\n              illustration: LogEmptyIllustration(),\n              label: appLocalizations.nullTip(appLocalizations.logs),\n            );\n          }\n          final items = logs\n              .map<Widget>(\n                (log) => LogItem(\n                  key: Key(log.dateTime),\n                  log: log,\n                  onClick: (value) {\n                    context.commonScaffoldState?.addKeyword(value);\n                  },\n                ),\n              )\n              .separated(const Divider(height: 0))\n              .toList();\n          return Align(\n            alignment: Alignment.topCenter,\n            child: ScrollToEndBox(\n              onCancelToEnd: () {\n                _logsStateNotifier.value = _logsStateNotifier.value.copyWith(\n                  autoScrollToEnd: false,\n                );\n              },\n              controller: _scrollController,\n              enable: state.autoScrollToEnd,\n              dataSource: logs,\n              child: CommonScrollBar(\n                controller: _scrollController,\n                child: SuperListView.builder(\n                  physics: NextClampingScrollPhysics(),\n                  reverse: true,\n                  shrinkWrap: true,\n                  controller: _scrollController,\n                  itemBuilder: (_, index) {\n                    return items[index];\n                  },\n                  itemCount: items.length,\n                ),\n              ),\n            ),\n          );\n        },\n      ),\n    );\n  }\n}\n\nclass LogItem extends StatelessWidget {\n  final Log log;\n  final Function(String)? onClick;\n\n  const LogItem({super.key, required this.log, this.onClick});\n\n  @override\n  Widget build(BuildContext context) {\n    return ListItem(\n      padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 4),\n      onTap: () {},\n      title: SelectableText(\n        log.payload,\n        style: context.textTheme.bodyLarge?.copyWith(color: log.logLevel.color),\n      ),\n      subtitle: Column(\n        children: [\n          SizedBox(height: 16),\n          Row(\n            mainAxisAlignment: MainAxisAlignment.spaceBetween,\n            children: [\n              CommonChip(\n                onPressed: () {\n                  if (onClick == null) return;\n                  onClick!(log.logLevel.name);\n                },\n                label: log.logLevel.name,\n              ),\n              Text(\n                log.dateTime,\n                style: context.textTheme.bodySmall?.copyWith(\n                  color: context.colorScheme.onSurface.opacity80,\n                ),\n              ),\n            ],\n          ),\n        ],\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/profiles/add.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/pages/scan.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\n\nclass AddProfileView extends StatelessWidget {\n  final BuildContext context;\n\n  const AddProfileView({super.key, required this.context});\n\n  Future<void> _handleAddProfileFormFile() async {\n    appController.addProfileFormFile();\n  }\n\n  Future<void> _handleAddProfileFormURL(String url) async {\n    appController.addProfileFormURL(url);\n  }\n\n  Future<void> _toScan() async {\n    if (system.isDesktop) {\n      appController.addProfileFormQrCode();\n      return;\n    }\n    final url = await BaseNavigator.push(context, const ScanPage());\n    if (url != null) {\n      WidgetsBinding.instance.addPostFrameCallback((_) {\n        _handleAddProfileFormURL(url);\n      });\n    }\n  }\n\n  Future<void> _toAdd() async {\n    final url = await globalState.showCommonDialog<String>(\n      child: InputDialog(\n        autovalidateMode: AutovalidateMode.onUnfocus,\n        title: appLocalizations.importFromURL,\n        labelText: appLocalizations.url,\n        value: '',\n        validator: (value) {\n          if (value == null || value.isEmpty) {\n            return appLocalizations.emptyTip('').trim();\n          }\n          if (!value.isUrl) {\n            return appLocalizations.urlTip('').trim();\n          }\n          return null;\n        },\n      ),\n    );\n    if (url != null) {\n      _handleAddProfileFormURL(url);\n    }\n  }\n\n  @override\n  Widget build(context) {\n    return ListView(\n      children: [\n        ListItem(\n          leading: const Icon(Icons.qr_code_sharp),\n          title: Text(appLocalizations.qrcode),\n          subtitle: Text(appLocalizations.qrcodeDesc),\n          onTap: _toScan,\n        ),\n        ListItem(\n          leading: const Icon(Icons.upload_file_sharp),\n          title: Text(appLocalizations.file),\n          subtitle: Text(appLocalizations.fileDesc),\n          onTap: _handleAddProfileFormFile,\n        ),\n        ListItem(\n          leading: const Icon(Icons.cloud_download_sharp),\n          title: Text(appLocalizations.url),\n          subtitle: Text(appLocalizations.urlDesc),\n          onTap: _toAdd,\n        ),\n      ],\n    );\n  }\n}\n\nclass URLFormDialog extends StatefulWidget {\n  const URLFormDialog({super.key});\n\n  @override\n  State<URLFormDialog> createState() => _URLFormDialogState();\n}\n\nclass _URLFormDialogState extends State<URLFormDialog> {\n  final _urlController = TextEditingController();\n\n  Future<void> _handleAddProfileFormURL() async {\n    final url = _urlController.value.text;\n    if (url.isEmpty) return;\n    Navigator.of(context).pop<String>(url);\n  }\n\n  @override\n  void dispose() {\n    _urlController.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonDialog(\n      title: appLocalizations.importFromURL,\n      actions: [\n        TextButton(\n          onPressed: _handleAddProfileFormURL,\n          child: Text(appLocalizations.submit),\n        ),\n      ],\n      child: SizedBox(\n        width: 300,\n        child: Wrap(\n          runSpacing: 16,\n          children: [\n            TextField(\n              keyboardType: TextInputType.url,\n              minLines: 1,\n              maxLines: 5,\n              onSubmitted: (_) {\n                _handleAddProfileFormURL();\n              },\n              onEditingComplete: _handleAddProfileFormURL,\n              controller: _urlController,\n              decoration: InputDecoration(\n                border: const OutlineInputBorder(),\n                labelText: appLocalizations.url,\n              ),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/profiles/edit.dart",
    "content": "import 'dart:convert';\nimport 'dart:io';\nimport 'dart:typed_data';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/core/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/pages/editor.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\n\nclass EditProfileView extends StatefulWidget {\n  final Profile profile;\n  final BuildContext context;\n\n  const EditProfileView({\n    super.key,\n    required this.context,\n    required this.profile,\n  });\n\n  @override\n  State<EditProfileView> createState() => _EditProfileViewState();\n}\n\nclass _EditProfileViewState extends State<EditProfileView> {\n  late final TextEditingController _labelController;\n  late final TextEditingController _urlController;\n  late final TextEditingController _autoUpdateDurationController;\n  late bool _autoUpdate;\n  String? _rawText;\n  final GlobalKey<FormState> _formKey = GlobalKey<FormState>();\n  final _fileInfoNotifier = ValueNotifier<FileInfo?>(null);\n  Uint8List? _fileData;\n\n  @override\n  void initState() {\n    super.initState();\n    _labelController = TextEditingController(text: widget.profile.label);\n    _urlController = TextEditingController(text: widget.profile.url);\n    _autoUpdate = widget.profile.autoUpdate;\n    _autoUpdateDurationController = TextEditingController(\n      text: widget.profile.autoUpdateDuration.inMinutes.toString(),\n    );\n    _updateFileInfo();\n  }\n\n  Future<void> _updateFileInfo() async {\n    final file = await widget.profile.file;\n    if (!await file.exists()) {\n      return;\n    }\n    final lastModified = await file.lastModified();\n    final size = await file.length();\n    if (!mounted) {\n      return;\n    }\n    _fileInfoNotifier.value = FileInfo(size: size, lastModified: lastModified);\n  }\n\n  Future<void> _handleConfirm() async {\n    if (!_formKey.currentState!.validate()) return;\n    var profile = widget.profile.copyWith(\n      url: _urlController.text,\n      label: _labelController.text,\n      autoUpdate: _autoUpdate,\n      autoUpdateDuration: Duration(\n        minutes: int.parse(_autoUpdateDurationController.text),\n      ),\n    );\n    final hasUpdate = widget.profile.url != profile.url;\n    if (_fileData != null) {\n      if (profile.type == ProfileType.url && _autoUpdate) {\n        final res = await globalState.showMessage(\n          title: appLocalizations.tip,\n          message: TextSpan(text: appLocalizations.profileHasUpdate),\n        );\n        if (res == true) {\n          profile = profile.copyWith(autoUpdate: false);\n        }\n      }\n      appController.putProfile(await profile.saveFile(_fileData!));\n    } else if (!hasUpdate) {\n      appController.putProfile(profile);\n    } else {\n      appController.safeRun(() async {\n        await Future.delayed(commonDuration);\n        if (hasUpdate) {\n          await appController.updateProfile(profile);\n        }\n      });\n    }\n    if (mounted) {\n      Navigator.of(context).pop();\n    }\n  }\n\n  void _setAutoUpdate(bool value) {\n    if (_autoUpdate == value) return;\n    setState(() {\n      _autoUpdate = value;\n    });\n  }\n\n  Future<void> _handleSaveEdit(BuildContext context, String data) async {\n    final message = await appController.safeRun<String>(() async {\n      final message = await coreController.validateConfigWithData(data);\n      return message;\n    }, silence: false);\n    if (message?.isNotEmpty == true) {\n      globalState.showMessage(\n        title: appLocalizations.tip,\n        message: TextSpan(text: message),\n      );\n      return;\n    }\n    if (context.mounted) {\n      Navigator.of(context).pop(data);\n    }\n  }\n\n  Future<void> _editProfileFile() async {\n    if (_rawText == null) {\n      final profilePath = await appPath.getProfilePath(\n        widget.profile.id.toString(),\n      );\n      final file = File(profilePath);\n      if (await file.exists()) {\n        _rawText = await file.readAsString();\n      }\n    }\n    if (!mounted) return;\n    final title = widget.profile.label.takeFirstValid([\n      widget.profile.id.toString(),\n    ]);\n    final editorPage = EditorPage(\n      title: title,\n      content: _rawText!,\n      onSave: (context, _, content) {\n        _handleSaveEdit(context, content);\n      },\n      onPop: (context, _, content) async {\n        if (content == _rawText) {\n          return true;\n        }\n        final res = await globalState.showMessage(\n          title: title,\n          message: TextSpan(text: appLocalizations.hasCacheChange),\n        );\n        if (res == true && context.mounted) {\n          _handleSaveEdit(context, content);\n        } else {\n          return true;\n        }\n        return false;\n      },\n    );\n    final data = await BaseNavigator.push<String>(context, editorPage);\n    if (data == null) {\n      return;\n    }\n    _rawText = data;\n    _fileData = Uint8List.fromList(utf8.encode(data));\n    _fileInfoNotifier.value = _fileInfoNotifier.value?.copyWith(\n      size: _fileData?.length ?? 0,\n      lastModified: DateTime.now(),\n    );\n  }\n\n  Future<void> _uploadProfileFile() async {\n    final platformFile = await appController.safeRun(picker.pickerFile);\n    if (platformFile?.bytes == null) return;\n    _fileData = platformFile?.bytes;\n    if (!mounted) {\n      return;\n    }\n    _fileInfoNotifier.value = _fileInfoNotifier.value?.copyWith(\n      size: _fileData?.length ?? 0,\n      lastModified: DateTime.now(),\n    );\n  }\n\n  Future<void> _handleBack() async {\n    final res = await globalState.showMessage(\n      title: appLocalizations.tip,\n      message: TextSpan(text: appLocalizations.fileIsUpdate),\n    );\n    if (res == true) {\n      _handleConfirm();\n    } else {\n      if (mounted) {\n        Navigator.of(context).pop();\n      }\n    }\n  }\n\n  @override\n  void dispose() {\n    _labelController.dispose();\n    _urlController.dispose();\n    _fileInfoNotifier.dispose();\n    _autoUpdateDurationController.dispose();\n    super.dispose();\n    appController.autoApplyProfile();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final items = [\n      ListItem(\n        title: TextFormField(\n          textInputAction: TextInputAction.next,\n          controller: _labelController,\n          decoration: InputDecoration(\n            border: const OutlineInputBorder(),\n            labelText: appLocalizations.name,\n          ),\n          validator: (String? value) {\n            if (value == null || value.isEmpty) {\n              return appLocalizations.profileNameNullValidationDesc;\n            }\n            return null;\n          },\n        ),\n      ),\n      if (widget.profile.type == ProfileType.url) ...[\n        ListItem(\n          title: TextFormField(\n            textInputAction: TextInputAction.next,\n            keyboardType: TextInputType.url,\n            controller: _urlController,\n            maxLines: 5,\n            minLines: 1,\n            decoration: InputDecoration(\n              border: const OutlineInputBorder(),\n              labelText: appLocalizations.url,\n            ),\n            validator: (String? value) {\n              if (value == null || value.isEmpty) {\n                return appLocalizations.profileUrlNullValidationDesc;\n              }\n              if (!value.isUrl) {\n                return appLocalizations.profileUrlInvalidValidationDesc;\n              }\n              return null;\n            },\n          ),\n        ),\n        ListItem.switchItem(\n          title: Text(appLocalizations.autoUpdate),\n          delegate: SwitchDelegate<bool>(\n            value: _autoUpdate,\n            onChanged: _setAutoUpdate,\n          ),\n        ),\n        if (_autoUpdate)\n          ListItem(\n            title: TextFormField(\n              textInputAction: TextInputAction.next,\n              controller: _autoUpdateDurationController,\n              decoration: InputDecoration(\n                border: const OutlineInputBorder(),\n                labelText: appLocalizations.autoUpdateInterval,\n              ),\n              validator: (String? value) {\n                if (value == null || value.isEmpty) {\n                  return appLocalizations\n                      .profileAutoUpdateIntervalNullValidationDesc;\n                }\n                try {\n                  int.parse(value);\n                } catch (_) {\n                  return appLocalizations\n                      .profileAutoUpdateIntervalInvalidValidationDesc;\n                }\n                return null;\n              },\n            ),\n          ),\n      ],\n      ValueListenableBuilder<FileInfo?>(\n        valueListenable: _fileInfoNotifier,\n        builder: (_, fileInfo, _) {\n          return FadeThroughBox(\n            alignment: Alignment.centerLeft,\n            child: fileInfo == null\n                ? Container()\n                : ListItem(\n                    title: Text(appLocalizations.profile),\n                    subtitle: Column(\n                      crossAxisAlignment: CrossAxisAlignment.start,\n                      children: [\n                        const SizedBox(height: 4),\n                        Text(fileInfo.desc),\n                        const SizedBox(height: 8),\n                        Wrap(\n                          runSpacing: 6,\n                          spacing: 12,\n                          children: [\n                            CommonChip(\n                              avatar: const Icon(Icons.edit),\n                              label: appLocalizations.edit,\n                              onPressed: _editProfileFile,\n                            ),\n                            CommonChip(\n                              avatar: const Icon(Icons.upload),\n                              label: appLocalizations.upload,\n                              onPressed: _uploadProfileFile,\n                            ),\n                          ],\n                        ),\n                      ],\n                    ),\n                  ),\n          );\n        },\n      ),\n    ];\n    return CommonPopScope(\n      onPop: (context) {\n        if (_fileData == null) {\n          return true;\n        }\n        _handleBack();\n        return false;\n      },\n      child: FloatLayout(\n        floatingWidget: FloatWrapper(\n          child: FloatingActionButton.extended(\n            heroTag: null,\n            onPressed: _handleConfirm,\n            label: Text(appLocalizations.save),\n            icon: const Icon(Icons.save),\n          ),\n        ),\n        child: Form(\n          key: _formKey,\n          child: Padding(\n            padding: const EdgeInsets.symmetric(vertical: 16),\n            child: ListView.separated(\n              padding: kMaterialListPadding.copyWith(bottom: 72),\n              itemBuilder: (_, index) {\n                return items[index];\n              },\n              separatorBuilder: (_, _) {\n                return const SizedBox(height: 24);\n              },\n              itemCount: items.length,\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/profiles/overwrite.dart",
    "content": "// ignore_for_file: deprecated_member_use\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/features/overwrite/rule.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/pages/editor.dart';\nimport 'package:fl_clash/providers/database.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/views/config/scripts.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass OverwriteView extends ConsumerStatefulWidget {\n  final int profileId;\n\n  const OverwriteView({super.key, required this.profileId});\n\n  @override\n  ConsumerState<OverwriteView> createState() => _OverwriteViewState();\n}\n\nclass _OverwriteViewState extends ConsumerState<OverwriteView> {\n  @override\n  void initState() {\n    super.initState();\n  }\n\n  Future<void> _handlePreview() async {\n    final profile = ref.read(profileProvider(widget.profileId));\n    if (profile == null) {\n      return;\n    }\n    final configMap = await appController.getProfileWithId(profile.id);\n    final content = await encodeYamlTask(configMap);\n    if (!mounted) {\n      return;\n    }\n    final previewPage = EditorPage(title: profile.realLabel, content: content);\n    BaseNavigator.push<String>(context, previewPage);\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonScaffold(\n      title: appLocalizations.override,\n      actions: [\n        CommonMinFilledButtonTheme(\n          child: FilledButton(\n            onPressed: _handlePreview,\n            child: Text(appLocalizations.preview),\n          ),\n        ),\n        SizedBox(width: 8),\n      ],\n      body: CustomScrollView(\n        slivers: [_Title(widget.profileId), _Content(widget.profileId)],\n      ),\n    );\n  }\n\n  @override\n  void dispose() {\n    super.dispose();\n    appController.autoApplyProfile();\n  }\n}\n\nclass _Title extends ConsumerWidget {\n  final int profileId;\n\n  const _Title(this.profileId);\n\n  String _getTitle(OverwriteType type) {\n    return switch (type) {\n      OverwriteType.standard => appLocalizations.standard,\n      OverwriteType.script => appLocalizations.script,\n      // OverwriteType.custom => appLocalizations.overwriteTypeCustom,\n    };\n  }\n\n  IconData _getIcon(OverwriteType type) {\n    return switch (type) {\n      OverwriteType.standard => Icons.stars,\n      OverwriteType.script => Icons.rocket,\n      // OverwriteType.custom => Icons.dashboard_customize,\n    };\n  }\n\n  String _getDesc(OverwriteType type) {\n    return switch (type) {\n      OverwriteType.standard => appLocalizations.standardModeDesc,\n      OverwriteType.script => appLocalizations.scriptModeDesc,\n      // OverwriteType.custom => appLocalizations.overwriteTypeCustomDesc,\n    };\n  }\n\n  void _handleChangeType(WidgetRef ref, OverwriteType type) {\n    ref.read(profilesProvider.notifier).updateProfile(profileId, (state) {\n      return state.copyWith(overwriteType: type);\n    });\n  }\n\n  @override\n  Widget build(context, ref) {\n    final overwriteType = ref.watch(overwriteTypeProvider(profileId));\n    return SliverToBoxAdapter(\n      child: Column(\n        crossAxisAlignment: CrossAxisAlignment.start,\n        children: [\n          InfoHeader(info: Info(label: appLocalizations.overrideMode)),\n          SingleChildScrollView(\n            scrollDirection: Axis.horizontal,\n            padding: EdgeInsets.symmetric(horizontal: 16),\n            child: Wrap(\n              spacing: 16,\n              children: [\n                for (final type in OverwriteType.values)\n                  CommonCard(\n                    isSelected: overwriteType == type,\n                    onPressed: () {\n                      _handleChangeType(ref, type);\n                    },\n                    child: Padding(\n                      padding: const EdgeInsets.all(16),\n                      child: Row(\n                        mainAxisSize: MainAxisSize.min,\n                        mainAxisAlignment: MainAxisAlignment.start,\n                        children: [\n                          Icon(_getIcon(type)),\n                          const SizedBox(width: 8),\n                          Flexible(child: Text(_getTitle(type))),\n                        ],\n                      ),\n                    ),\n                  ),\n              ],\n            ),\n          ),\n          SizedBox(height: 12),\n          Padding(\n            padding: EdgeInsets.symmetric(horizontal: 16),\n            child: Text(\n              _getDesc(overwriteType),\n              style: context.textTheme.bodySmall?.copyWith(\n                color: context.colorScheme.onSurfaceVariant.opacity80,\n              ),\n            ),\n          ),\n        ],\n      ),\n    );\n  }\n}\n\nclass _Content extends ConsumerWidget {\n  final int profileId;\n\n  const _Content(this.profileId);\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final overwriteType = ref.watch(overwriteTypeProvider(profileId));\n    return switch (overwriteType) {\n      OverwriteType.standard => _StandardContent(profileId),\n      OverwriteType.script => _ScriptContent(profileId),\n      // OverwriteType.custom => SliverToBoxAdapter(),\n    };\n  }\n}\n\nclass _StandardContent extends ConsumerStatefulWidget {\n  final int profileId;\n\n  const _StandardContent(this.profileId);\n\n  @override\n  ConsumerState createState() => __StandardContentState();\n}\n\nclass __StandardContentState extends ConsumerState<_StandardContent> {\n  final _key = utils.id;\n\n  Future<void> _handleAddOrUpdate([Rule? rule]) async {\n    final res = await globalState.showCommonDialog<Rule>(\n      child: AddOrEditRuleDialog(rule: rule),\n    );\n    if (res == null) {\n      return;\n    }\n    ref.read(profileAddedRulesProvider(widget.profileId).notifier).put(res);\n  }\n\n  void _handleSelected(int ruleId) {\n    ref.read(selectedItemsProvider(_key).notifier).update((selectedRules) {\n      final newSelectedRules = Set<int>.from(selectedRules)\n        ..addOrRemove(ruleId);\n      return newSelectedRules;\n    });\n  }\n\n  void _handleSelectAll() {\n    final ids =\n        ref\n            .read(profileAddedRulesProvider(widget.profileId))\n            .value\n            ?.map((item) => item.id)\n            .toSet() ??\n        {};\n    ref.read(selectedItemsProvider(_key).notifier).update((selected) {\n      return selected.containsAll(ids) ? {} : ids;\n    });\n  }\n\n  Future<void> _handleDelete() async {\n    final res = await globalState.showMessage(\n      title: appLocalizations.tip,\n      message: TextSpan(\n        text: appLocalizations.deleteMultipTip(appLocalizations.rule),\n      ),\n    );\n    if (res != true) {\n      return;\n    }\n    final selectedRules = ref.read(selectedItemsProvider(_key));\n    ref\n        .read(profileAddedRulesProvider(widget.profileId).notifier)\n        .delAll(selectedRules.cast<int>());\n    ref.read(selectedItemsProvider(_key).notifier).value = {};\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final addedRules =\n        ref.watch(profileAddedRulesProvider(widget.profileId)).value ?? [];\n    final selectedRules = ref.watch(selectedItemsProvider(_key));\n    return CommonPopScope(\n      onPop: (_) {\n        if (selectedRules.isNotEmpty) {\n          ref.read(selectedItemsProvider(_key).notifier).value = {};\n          return false;\n        }\n        Navigator.of(context).pop();\n        return false;\n      },\n      child: SliverMainAxisGroup(\n        slivers: [\n          SliverToBoxAdapter(child: SizedBox(height: 24)),\n          SliverToBoxAdapter(\n            child: Column(\n              children: [\n                InfoHeader(\n                  info: Info(label: appLocalizations.addedRules),\n                  actions: [\n                    if (selectedRules.isNotEmpty) ...[\n                      CommonMinIconButtonTheme(\n                        child: IconButton.filledTonal(\n                          onPressed: () {\n                            _handleDelete();\n                          },\n                          icon: Icon(Icons.delete),\n                        ),\n                      ),\n                      SizedBox(width: 8),\n                    ],\n                    CommonMinFilledButtonTheme(\n                      child: selectedRules.isNotEmpty\n                          ? FilledButton(\n                              onPressed: () {\n                                _handleSelectAll();\n                              },\n                              child: Text(appLocalizations.selectAll),\n                            )\n                          : FilledButton.tonal(\n                              onPressed: () {\n                                _handleAddOrUpdate();\n                              },\n                              child: Text(appLocalizations.add),\n                            ),\n                    ),\n                  ],\n                ),\n              ],\n            ),\n          ),\n          SliverToBoxAdapter(child: SizedBox(height: 8)),\n          Consumer(\n            builder: (_, ref, _) {\n              return SliverReorderableList(\n                itemCount: addedRules.length,\n                itemBuilder: (_, index) {\n                  final rule = addedRules[index];\n                  return ReorderableDelayedDragStartListener(\n                    key: ObjectKey(rule),\n                    index: index,\n                    child: RuleItem(\n                      isEditing: selectedRules.isNotEmpty,\n                      isSelected: selectedRules.contains(rule.id),\n                      rule: rule,\n                      onSelected: () {\n                        _handleSelected(rule.id);\n                      },\n                      onEdit: (rule) {\n                        _handleAddOrUpdate(rule);\n                      },\n                    ),\n                  );\n                },\n                onReorder: ref\n                    .read(profileAddedRulesProvider(widget.profileId).notifier)\n                    .order,\n              );\n            },\n          ),\n          SliverToBoxAdapter(\n            child: Padding(\n              padding: EdgeInsets.symmetric(horizontal: 16, vertical: 4),\n              child: CommonCard(\n                padding: EdgeInsets.zero,\n                radius: 18,\n                child: ListTile(\n                  minTileHeight: 0,\n                  minVerticalPadding: 0,\n                  titleTextStyle: context.textTheme.bodyMedium?.toJetBrainsMono,\n                  contentPadding: const EdgeInsets.symmetric(\n                    horizontal: 16,\n                    vertical: 16,\n                  ),\n                  title: Row(\n                    crossAxisAlignment: CrossAxisAlignment.center,\n                    children: [\n                      Flexible(\n                        child: Text(\n                          appLocalizations.controlGlobalAddedRules,\n                          style: context.textTheme.bodyLarge,\n                        ),\n                      ),\n                      SizedBox(width: 4),\n                      Icon(Icons.arrow_forward, size: 18),\n                    ],\n                  ),\n                ),\n                onPressed: () {\n                  BaseNavigator.push(\n                    context,\n                    _EditGlobalAddedRules(profileId: widget.profileId),\n                  );\n                },\n              ),\n            ),\n          ),\n        ],\n      ),\n    );\n  }\n}\n\nclass _ScriptContent extends ConsumerWidget {\n  final int profileId;\n\n  const _ScriptContent(this.profileId);\n\n  void _handleChange(WidgetRef ref, int scriptId) {\n    ref.read(profilesProvider.notifier).updateProfile(profileId, (state) {\n      return state.copyWith(\n        scriptId: state.scriptId == scriptId ? null : scriptId,\n      );\n    });\n  }\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final scriptId = ref.watch(\n      profileProvider(profileId).select((state) => state?.scriptId),\n    );\n    final scripts = ref.watch(scriptsProvider).value ?? [];\n    return SliverMainAxisGroup(\n      slivers: [\n        SliverToBoxAdapter(child: SizedBox(height: 24)),\n        SliverToBoxAdapter(\n          child: Column(\n            children: [\n              InfoHeader(info: Info(label: appLocalizations.overrideScript)),\n            ],\n          ),\n        ),\n        SliverToBoxAdapter(child: SizedBox(height: 8)),\n        Consumer(\n          builder: (_, ref, _) {\n            return SliverPadding(\n              padding: EdgeInsets.symmetric(horizontal: 16),\n              sliver: SliverList.builder(\n                itemCount: scripts.length,\n                itemBuilder: (_, index) {\n                  final script = scripts[index];\n                  return Container(\n                    margin: EdgeInsets.symmetric(vertical: 4),\n                    child: CommonCard(\n                      padding: EdgeInsets.zero,\n                      type: CommonCardType.filled,\n                      radius: 18,\n                      child: ListTile(\n                        minLeadingWidth: 0,\n                        minTileHeight: 0,\n                        minVerticalPadding: 16,\n                        contentPadding: const EdgeInsets.symmetric(\n                          horizontal: 14,\n                        ),\n                        title: Row(\n                          children: [\n                            SizedBox(\n                              width: 24,\n                              height: 24,\n                              child: Radio(\n                                materialTapTargetSize:\n                                    MaterialTapTargetSize.shrinkWrap,\n                                visualDensity: VisualDensity.compact,\n                                toggleable: true,\n                                value: script.id,\n                                groupValue: scriptId,\n                                onChanged: (_) {\n                                  _handleChange(ref, script.id);\n                                },\n                              ),\n                            ),\n                            SizedBox(width: 8),\n                            Flexible(child: Text(script.label)),\n                          ],\n                        ),\n                        onTap: () {\n                          _handleChange(ref, script.id);\n                        },\n                      ),\n                    ),\n                  );\n                },\n              ),\n            );\n          },\n        ),\n        SliverToBoxAdapter(\n          child: Padding(\n            padding: EdgeInsets.symmetric(horizontal: 16, vertical: 4),\n            child: CommonCard(\n              padding: EdgeInsets.zero,\n              radius: 18,\n              child: ListTile(\n                minTileHeight: 0,\n                minVerticalPadding: 0,\n                titleTextStyle: context.textTheme.bodyMedium?.toJetBrainsMono,\n                contentPadding: const EdgeInsets.symmetric(\n                  horizontal: 16,\n                  vertical: 16,\n                ),\n                title: Row(\n                  crossAxisAlignment: CrossAxisAlignment.center,\n                  children: [\n                    Flexible(\n                      child: Text(\n                        appLocalizations.goToConfigureScript,\n                        style: context.textTheme.bodyLarge,\n                      ),\n                    ),\n                    SizedBox(width: 4),\n                    Icon(Icons.arrow_forward, size: 18),\n                  ],\n                ),\n              ),\n              onPressed: () {\n                BaseNavigator.push(context, const ScriptsView());\n              },\n            ),\n          ),\n        ),\n      ],\n    );\n  }\n}\n\nclass _EditGlobalAddedRules extends ConsumerWidget {\n  final int profileId;\n\n  const _EditGlobalAddedRules({required this.profileId});\n\n  void _handleChange(WidgetRef ref, bool status, int ruleId) {\n    if (status) {\n      ref.read(profileDisabledRuleIdsProvider(profileId).notifier).put(ruleId);\n    } else {\n      ref.read(profileDisabledRuleIdsProvider(profileId).notifier).del(ruleId);\n    }\n  }\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final disabledRuleIds =\n        ref.watch(profileDisabledRuleIdsProvider(profileId)).value ?? [];\n    final rules = ref.watch(globalRulesProvider).value ?? [];\n    return BaseScaffold(\n      title: appLocalizations.editGlobalRules,\n      body: rules.isEmpty\n          ? NullStatus(\n              label: appLocalizations.nullTip(appLocalizations.rule),\n              illustration: RuleEmptyIllustration(),\n            )\n          : ListView.builder(\n              padding: EdgeInsets.all(16),\n              itemBuilder: (context, index) {\n                final rule = rules[index];\n                return RuleStatusItem(\n                  status: !disabledRuleIds.contains(rule.id),\n                  rule: rule,\n                  onChange: (status) {\n                    _handleChange(ref, !status, rule.id);\n                  },\n                );\n              },\n              itemCount: rules.length,\n            ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/profiles/profiles.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/pages/editor.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/views/profiles/overwrite.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/services.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nimport 'add.dart';\nimport 'edit.dart';\n\nclass ProfilesView extends StatefulWidget {\n  const ProfilesView({super.key});\n\n  @override\n  State<ProfilesView> createState() => _ProfilesViewState();\n}\n\nclass _ProfilesViewState extends State<ProfilesView> {\n  Function? applyConfigDebounce;\n  bool _isUpdating = false;\n\n  void _handleShowAddExtendPage() {\n    showExtend(\n      globalState.navigatorKey.currentState!.context,\n      builder: (_, type) {\n        return AdaptiveSheetScaffold(\n          type: type,\n          body: AddProfileView(\n            context: globalState.navigatorKey.currentState!.context,\n          ),\n          title: '${appLocalizations.add}${appLocalizations.profile}',\n        );\n      },\n    );\n  }\n\n  Future<void> _updateProfiles(List<Profile> profiles) async {\n    if (_isUpdating == true) {\n      return;\n    }\n    _isUpdating = true;\n    final List<UpdatingMessage> messages = [];\n    final updateProfiles = profiles.map<Future>((profile) async {\n      if (profile.type == ProfileType.file) return;\n      try {\n        await appController.updateProfile(profile, showLoading: true);\n      } catch (e) {\n        messages.add(\n          UpdatingMessage(label: profile.realLabel, message: e.toString()),\n        );\n      }\n    });\n    await Future.wait(updateProfiles);\n    if (messages.isNotEmpty) {\n      globalState.showAllUpdatingMessagesDialog(messages);\n    }\n    _isUpdating = false;\n  }\n\n  List<Widget> _buildActions(List<Profile> profiles) {\n    return profiles.isNotEmpty\n        ? [\n            IconButton(\n              onPressed: () {\n                _updateProfiles(profiles);\n              },\n              icon: const Icon(Icons.sync),\n            ),\n            IconButton(\n              onPressed: () {\n                showSheet(\n                  context: context,\n                  builder: (_, type) {\n                    return ReorderableProfilesSheet(\n                      type: type,\n                      profiles: profiles,\n                    );\n                  },\n                );\n              },\n              icon: const Icon(Icons.sort),\n              iconSize: 26,\n            ),\n          ]\n        : [];\n  }\n\n  Widget _buildFAB() {\n    return CommonFloatingActionButton(\n      onPressed: _handleShowAddExtendPage,\n      icon: const Icon(Icons.add),\n      label: context.appLocalizations.addProfile,\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Consumer(\n      builder: (_, ref, _) {\n        final isLoading = ref.watch(loadingProvider(LoadingTag.profiles));\n        final state = ref.watch(profilesStateProvider);\n        final spacing = 14.mAp;\n        return CommonScaffold(\n          isLoading: isLoading,\n          title: appLocalizations.profiles,\n          floatingActionButton: _buildFAB(),\n          actions: _buildActions(state.profiles),\n          body: state.profiles.isEmpty\n              ? NullStatus(\n                  label: appLocalizations.nullProfileDesc,\n                  illustration: ProfileEmptyIllustration(),\n                )\n              : Align(\n                  alignment: Alignment.topCenter,\n                  child: SingleChildScrollView(\n                    key: profilesStoreKey,\n                    padding: const EdgeInsets.only(\n                      left: 16,\n                      right: 16,\n                      top: 16,\n                      bottom: 88,\n                    ),\n                    child: Grid(\n                      mainAxisSpacing: spacing,\n                      crossAxisSpacing: spacing,\n                      crossAxisCount: state.columns,\n                      children: [\n                        for (int i = 0; i < state.profiles.length; i++)\n                          GridItem(\n                            child: ProfileItem(\n                              key: Key(state.profiles[i].id.toString()),\n                              profile: state.profiles[i],\n                              groupValue: state.currentProfileId,\n                              onChanged: (profileId) {\n                                ref\n                                        .read(currentProfileIdProvider.notifier)\n                                        .value =\n                                    profileId;\n                              },\n                            ),\n                          ),\n                      ],\n                    ),\n                  ),\n                ),\n        );\n      },\n    );\n  }\n}\n\nclass ProfileItem extends StatelessWidget {\n  final Profile profile;\n  final int? groupValue;\n  final void Function(int? value) onChanged;\n\n  const ProfileItem({\n    super.key,\n    required this.profile,\n    required this.groupValue,\n    required this.onChanged,\n  });\n\n  Future<void> _handleDeleteProfile(BuildContext context) async {\n    final res = await globalState.showMessage(\n      title: appLocalizations.tip,\n      message: TextSpan(\n        text: appLocalizations.deleteTip(appLocalizations.profile),\n      ),\n    );\n    if (res != true) {\n      return;\n    }\n    await appController.deleteProfile(profile.id);\n  }\n\n  Future<void> _handlePreview(BuildContext context) async {\n    final configMap = await appController.getProfileWithId(profile.id);\n    final content = await encodeYamlTask(configMap);\n    if (!context.mounted) {\n      return;\n    }\n\n    final previewPage = EditorPage(title: profile.realLabel, content: content);\n    BaseNavigator.push<String>(context, previewPage);\n  }\n\n  Future updateProfile() async {\n    if (profile.type == ProfileType.file) return;\n    try {} finally {}\n    await appController.loadingRun(() async {\n      await appController.updateProfile(profile, showLoading: true);\n    }, tag: LoadingTag.profiles);\n  }\n\n  void _handleShowEditExtendPage(BuildContext context) {\n    showExtend(\n      context,\n      builder: (_, type) {\n        return AdaptiveSheetScaffold(\n          type: type,\n          body: EditProfileView(profile: profile, context: context),\n          title: '${appLocalizations.edit}${appLocalizations.profile}',\n        );\n      },\n    );\n  }\n\n  List<Widget> _buildUrlProfileInfo(BuildContext context) {\n    final subscriptionInfo = profile.subscriptionInfo;\n    return [\n      const SizedBox(height: 8),\n      if (subscriptionInfo != null)\n        SubscriptionInfoView(subscriptionInfo: subscriptionInfo),\n      Text(\n        profile.lastUpdateDate?.lastUpdateTimeDesc ?? '',\n        style: context.textTheme.labelMedium?.toLighter,\n      ),\n    ];\n  }\n\n  List<Widget> _buildFileProfileInfo(BuildContext context) {\n    return [\n      const SizedBox(height: 8),\n      Text(\n        profile.lastUpdateDate?.lastUpdateTimeDesc ?? '',\n        style: context.textTheme.labelMedium?.toLight,\n      ),\n    ];\n  }\n\n  Future<void> _handleCopyLink(BuildContext context) async {\n    await Clipboard.setData(ClipboardData(text: profile.url));\n    if (context.mounted) {\n      context.showNotifier(appLocalizations.copySuccess);\n    }\n  }\n\n  Future<void> _handleExportFile(BuildContext context) async {\n    final res = await appController.safeRun<bool>(() async {\n      final mFile = await profile.file;\n      final value = await picker.saveFile(\n        profile.realLabel,\n        mFile.readAsBytesSync(),\n      );\n      if (value == null) return false;\n      return true;\n    }, title: appLocalizations.tip);\n    if (res == true && context.mounted) {\n      context.showNotifier(appLocalizations.exportSuccess);\n    }\n  }\n\n  void _handlePushGenProfilePage(BuildContext context, int id) {\n    BaseNavigator.push(context, OverwriteView(profileId: id));\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonCard(\n      isSelected: profile.id == groupValue,\n      onPressed: () {\n        onChanged(profile.id);\n      },\n      child: ListItem(\n        key: Key(profile.id.toString()),\n        horizontalTitleGap: 16,\n        padding: const EdgeInsets.symmetric(horizontal: 16),\n        trailing: SizedBox(\n          height: 40,\n          width: 40,\n          child: Consumer(\n            builder: (_, ref, _) {\n              final isUpdating = ref.watch(\n                isUpdatingProvider(profile.updatingKey),\n              );\n              return FadeThroughBox(\n                child: isUpdating\n                    ? const Padding(\n                        key: ValueKey('loading'),\n                        padding: EdgeInsets.all(8),\n                        child: CircularProgressIndicator(),\n                      )\n                    : CommonPopupBox(\n                        key: ValueKey('menu'),\n                        popup: CommonPopupMenu(\n                          items: [\n                            PopupMenuItemData(\n                              icon: Icons.edit_outlined,\n                              label: appLocalizations.edit,\n                              onPressed: () {\n                                _handleShowEditExtendPage(context);\n                              },\n                            ),\n                            PopupMenuItemData(\n                              icon: Icons.visibility_outlined,\n                              label: appLocalizations.preview,\n                              onPressed: () {\n                                _handlePreview(context);\n                              },\n                            ),\n                            if (profile.type == ProfileType.url) ...[\n                              PopupMenuItemData(\n                                icon: Icons.sync_alt_sharp,\n                                label: appLocalizations.sync,\n                                onPressed: () {\n                                  updateProfile();\n                                },\n                              ),\n                            ],\n                            PopupMenuItemData(\n                              icon: Icons.emergency_outlined,\n                              label: appLocalizations.more,\n                              subItems: [\n                                PopupMenuItemData(\n                                  icon: Icons.extension_outlined,\n                                  label: appLocalizations.override,\n                                  onPressed: () {\n                                    _handlePushGenProfilePage(\n                                      context,\n                                      profile.id,\n                                    );\n                                  },\n                                ),\n                                // PopupMenuItemData(\n                                //   icon: Icons.extension_outlined,\n                                //   label: appLocalizations.override + \"1\",\n                                //   onPressed: () {\n                                //     final overrideProfileView = OverrideProfileView(\n                                //       profileId: profile.id,\n                                //     );\n                                //     BaseNavigator.push(\n                                //       context,\n                                //       overrideProfileView,\n                                //     );\n                                //   },\n                                // ),\n                                if (profile.type == ProfileType.url) ...[\n                                  PopupMenuItemData(\n                                    icon: Icons.copy,\n                                    label: appLocalizations.copyLink,\n                                    onPressed: () {\n                                      _handleCopyLink(context);\n                                    },\n                                  ),\n                                ],\n                                PopupMenuItemData(\n                                  icon: Icons.file_copy_outlined,\n                                  label: appLocalizations.exportFile,\n                                  onPressed: () {\n                                    _handleExportFile(context);\n                                  },\n                                ),\n                              ],\n                            ),\n                            PopupMenuItemData(\n                              danger: true,\n                              icon: Icons.delete_outlined,\n                              label: appLocalizations.delete,\n                              onPressed: () {\n                                _handleDeleteProfile(context);\n                              },\n                            ),\n                          ],\n                        ),\n                        targetBuilder: (open) {\n                          return IconButton(\n                            onPressed: () {\n                              open();\n                            },\n                            icon: Icon(Icons.more_vert),\n                          );\n                        },\n                      ),\n              );\n            },\n          ),\n        ),\n        title: Container(\n          padding: const EdgeInsets.symmetric(vertical: 4),\n          child: Column(\n            crossAxisAlignment: CrossAxisAlignment.start,\n            mainAxisAlignment: MainAxisAlignment.center,\n            children: [\n              Text(\n                profile.realLabel,\n                style: context.textTheme.titleMedium,\n                maxLines: 1,\n                overflow: TextOverflow.ellipsis,\n              ),\n              Column(\n                mainAxisSize: MainAxisSize.min,\n                crossAxisAlignment: CrossAxisAlignment.start,\n                mainAxisAlignment: MainAxisAlignment.center,\n                children: [\n                  ...switch (profile.type) {\n                    ProfileType.file => _buildFileProfileInfo(context),\n                    ProfileType.url => _buildUrlProfileInfo(context),\n                  },\n                ],\n              ),\n            ],\n          ),\n        ),\n        tileTitleAlignment: ListTileTitleAlignment.titleHeight,\n      ),\n    );\n  }\n}\n\nclass ReorderableProfilesSheet extends StatefulWidget {\n  final List<Profile> profiles;\n  final SheetType type;\n\n  const ReorderableProfilesSheet({\n    super.key,\n    required this.profiles,\n    required this.type,\n  });\n\n  @override\n  State<ReorderableProfilesSheet> createState() =>\n      _ReorderableProfilesSheetState();\n}\n\nclass _ReorderableProfilesSheetState extends State<ReorderableProfilesSheet> {\n  late List<Profile> profiles;\n\n  @override\n  void initState() {\n    super.initState();\n    profiles = List.from(widget.profiles);\n  }\n\n  Widget _buildItem(int index, [bool isDecorator = false]) {\n    final isLast = index == profiles.length - 1;\n    final isFirst = index == 0;\n    final profile = profiles[index];\n    return CommonInputListItem(\n      key: Key(profile.id.toString()),\n      trailing: ReorderableDelayedDragStartListener(\n        index: index,\n        child: const Icon(Icons.drag_handle),\n      ),\n      title: Text(profile.realLabel),\n      isFirst: isFirst,\n      isLast: isLast,\n      isDecorator: isDecorator,\n    );\n  }\n\n  void _handleSave() {\n    Navigator.of(context).pop();\n    appController.reorder(profiles);\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return AdaptiveSheetScaffold(\n      type: widget.type,\n      actions: [\n        if (widget.type == SheetType.bottomSheet)\n          IconButton.filledTonal(\n            onPressed: _handleSave,\n            style: IconButton.styleFrom(\n              visualDensity: VisualDensity.comfortable,\n              tapTargetSize: MaterialTapTargetSize.padded,\n              padding: EdgeInsets.all(8),\n              iconSize: 20,\n            ),\n            icon: Icon(Icons.check),\n          )\n        else\n          IconButton.filledTonal(\n            icon: Icon(Icons.check),\n            onPressed: _handleSave,\n          ),\n      ],\n      body: Padding(\n        padding: EdgeInsets.only(bottom: 32, top: 12),\n        child: ReorderableListView.builder(\n          buildDefaultDragHandles: false,\n          padding: const EdgeInsets.symmetric(horizontal: 16),\n          proxyDecorator: (child, index, animation) {\n            return commonProxyDecorator(\n              _buildItem(index, true),\n              index,\n              animation,\n            );\n          },\n          onReorder: (oldIndex, newIndex) {\n            setState(() {\n              if (oldIndex < newIndex) {\n                newIndex -= 1;\n              }\n              final profile = profiles.removeAt(oldIndex);\n              profiles.insert(newIndex, profile);\n            });\n          },\n          itemBuilder: (_, index) {\n            return _buildItem(index);\n          },\n          itemCount: profiles.length,\n        ),\n      ),\n      title: appLocalizations.profilesSort,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/proxies/card.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/views/proxies/common.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass ProxyCard extends StatelessWidget {\n  final String groupName;\n  final Proxy proxy;\n  final GroupType groupType;\n  final ProxyCardType type;\n  final String? testUrl;\n\n  const ProxyCard({\n    super.key,\n    required this.groupName,\n    required this.testUrl,\n    required this.proxy,\n    required this.groupType,\n    required this.type,\n  });\n\n  Measure get measure => globalState.measure;\n\n  void _handleTestCurrentDelay() {\n    proxyDelayTest(proxy, testUrl);\n  }\n\n  Widget _buildDelayText() {\n    return SizedBox(\n      height: measure.labelSmallHeight,\n      child: Consumer(\n        builder: (context, ref, _) {\n          final delay = ref.watch(\n            getDelayProvider(proxyName: proxy.name, testUrl: testUrl),\n          );\n          return FadeThroughBox(\n            alignment: type == ProxyCardType.expand\n                ? Alignment.centerLeft\n                : Alignment.centerRight,\n            child: delay == 0 || delay == null\n                ? SizedBox(\n                    height: measure.labelSmallHeight,\n                    width: measure.labelSmallHeight,\n                    child: delay == 0\n                        ? const CircularProgressIndicator(strokeWidth: 2)\n                        : IconButton(\n                            icon: const Icon(Icons.bolt),\n                            iconSize: globalState.measure.labelSmallHeight,\n                            padding: EdgeInsets.zero,\n                            onPressed: _handleTestCurrentDelay,\n                          ),\n                  )\n                : GestureDetector(\n                    onTap: _handleTestCurrentDelay,\n                    child: Text(\n                      delay > 0 ? '$delay ms' : 'Timeout',\n                      style: context.textTheme.labelSmall?.copyWith(\n                        overflow: TextOverflow.ellipsis,\n                        color: utils.getDelayColor(delay),\n                      ),\n                    ),\n                  ),\n          );\n        },\n      ),\n    );\n  }\n\n  Widget _buildProxyNameText(BuildContext context) {\n    if (type == ProxyCardType.min) {\n      return SizedBox(\n        height: measure.bodyMediumHeight * 1,\n        child: EmojiText(\n          proxy.name,\n          maxLines: 1,\n          overflow: TextOverflow.ellipsis,\n          style: context.textTheme.bodyMedium,\n        ),\n      );\n    } else {\n      return SizedBox(\n        height: measure.bodyMediumHeight * 2,\n        child: EmojiText(\n          proxy.name,\n          maxLines: 2,\n          overflow: TextOverflow.ellipsis,\n          style: context.textTheme.bodyMedium,\n        ),\n      );\n    }\n  }\n\n  Future<void> _changeProxy(WidgetRef ref) async {\n    final isComputedSelected = groupType.isComputedSelected;\n    final isSelector = groupType == GroupType.Selector;\n    if (isComputedSelected || isSelector) {\n      final currentProxyName = ref.read(getProxyNameProvider(groupName));\n      final nextProxyName = switch (isComputedSelected) {\n        true => currentProxyName == proxy.name ? '' : proxy.name,\n        false => proxy.name,\n      };\n      appController.updateCurrentSelectedMap(groupName, nextProxyName);\n      appController.changeProxyDebounce(groupName, nextProxyName);\n      return;\n    }\n    globalState.showNotifier(appLocalizations.notSelectedTip);\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final measure = globalState.measure;\n    final delayText = _buildDelayText();\n    final proxyNameText = _buildProxyNameText(context);\n    return Stack(\n      children: [\n        Consumer(\n          builder: (_, ref, child) {\n            final selectedProxyName = ref.watch(\n              getSelectedProxyNameProvider(groupName),\n            );\n            return CommonCard(\n              key: key,\n              onPressed: () {\n                _changeProxy(ref);\n              },\n              isSelected: selectedProxyName == proxy.name,\n              child: child!,\n            );\n          },\n          child: Container(\n            alignment: Alignment.centerLeft,\n            padding: const EdgeInsets.symmetric(horizontal: 12),\n            child: Column(\n              mainAxisSize: MainAxisSize.min,\n              crossAxisAlignment: CrossAxisAlignment.start,\n              children: [\n                proxyNameText,\n                const SizedBox(height: 8),\n                if (type == ProxyCardType.expand) ...[\n                  SizedBox(\n                    height: measure.bodySmallHeight,\n                    child: _ProxyDesc(proxy: proxy),\n                  ),\n                  const SizedBox(height: 6),\n                  delayText,\n                ] else\n                  SizedBox(\n                    height: measure.bodySmallHeight,\n                    child: Row(\n                      mainAxisAlignment: MainAxisAlignment.spaceBetween,\n                      crossAxisAlignment: CrossAxisAlignment.center,\n                      children: [\n                        Flexible(\n                          flex: 1,\n                          child: TooltipText(\n                            text: Text(\n                              proxy.type,\n                              style: context.textTheme.bodySmall?.copyWith(\n                                overflow: TextOverflow.ellipsis,\n                                color: context\n                                    .textTheme\n                                    .bodySmall\n                                    ?.color\n                                    ?.opacity80,\n                              ),\n                            ),\n                          ),\n                        ),\n                        delayText,\n                      ],\n                    ),\n                  ),\n              ],\n            ),\n          ),\n        ),\n        if (groupType.isComputedSelected)\n          Positioned(\n            top: 0,\n            right: 0,\n            child: _ProxyComputedMark(groupName: groupName, proxy: proxy),\n          ),\n      ],\n    );\n  }\n}\n\nclass _ProxyDesc extends ConsumerWidget {\n  final Proxy proxy;\n\n  const _ProxyDesc({required this.proxy});\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final desc = ref.watch(getProxyDescProvider(proxy));\n    return EmojiText(\n      desc,\n      overflow: TextOverflow.ellipsis,\n      style: context.textTheme.bodySmall?.copyWith(\n        color: context.textTheme.bodySmall?.color?.opacity80,\n      ),\n    );\n  }\n}\n\nclass _ProxyComputedMark extends ConsumerWidget {\n  final String groupName;\n  final Proxy proxy;\n\n  const _ProxyComputedMark({required this.groupName, required this.proxy});\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final proxyName = ref.watch(getProxyNameProvider(groupName));\n    if (proxyName != proxy.name) {\n      return SizedBox();\n    }\n    return Container(\n      alignment: Alignment.topRight,\n      margin: const EdgeInsets.all(8),\n      child: Container(\n        padding: const EdgeInsets.all(4),\n        decoration: BoxDecoration(\n          shape: BoxShape.circle,\n          color: Theme.of(context).colorScheme.secondaryContainer,\n        ),\n        child: const SelectIcon(),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/proxies/common.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/core/core.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/state.dart';\n\ndouble get listHeaderHeight {\n  final measure = globalState.measure;\n  return 20 + measure.titleMediumHeight + 4 + measure.bodyMediumHeight + 2;\n}\n\ndouble getItemHeight(ProxyCardType proxyCardType) {\n  final measure = globalState.measure;\n  final baseHeight =\n      16 + measure.bodyMediumHeight * 2 + measure.bodySmallHeight + 8 + 4;\n  return switch (proxyCardType) {\n    ProxyCardType.expand => baseHeight + measure.labelSmallHeight + 6,\n    ProxyCardType.shrink => baseHeight,\n    ProxyCardType.min => baseHeight - measure.bodyMediumHeight,\n  };\n}\n\nFuture<void> proxyDelayTest(Proxy proxy, [String? testUrl]) async {\n  final groups = appController.groups;\n  final selectedMap = appController.currentProfile?.selectedMap ?? {};\n  final state = computeRealSelectedProxyState(\n    proxy.name,\n    groups: groups,\n    selectedMap: selectedMap,\n  );\n  final currentTestUrl = state.testUrl.takeFirstValid([\n    appController.getRealTestUrl(testUrl),\n  ]);\n  if (state.proxyName.isEmpty) {\n    return;\n  }\n  appController.setDelay(\n    Delay(url: currentTestUrl, name: state.proxyName, value: 0),\n  );\n  appController.setDelay(\n    await coreController.getDelay(currentTestUrl, state.proxyName),\n  );\n}\n\nFuture<void> delayTest(List<Proxy> proxies, [String? testUrl]) async {\n  final proxyNames = proxies.map((proxy) => proxy.name).toSet().toList();\n\n  final delayProxies = proxyNames.map<Future>((proxyName) async {\n    final groups = appController.groups;\n    final selectedMap = appController.currentProfile?.selectedMap ?? {};\n    final state = computeRealSelectedProxyState(\n      proxyName,\n      groups: groups,\n      selectedMap: selectedMap,\n    );\n    final url = state.testUrl.takeFirstValid([\n      appController.getRealTestUrl(testUrl),\n    ]);\n    final name = state.proxyName;\n    if (name.isEmpty) {\n      return;\n    }\n    appController.setDelay(Delay(url: url, name: name, value: 0));\n    appController.setDelay(await coreController.getDelay(url, name));\n  }).toList();\n\n  final batchesDelayProxies = delayProxies.batch(100);\n  for (final batchDelayProxies in batchesDelayProxies) {\n    await Future.wait(batchDelayProxies);\n  }\n  appController.addSortNum();\n}\n\ndouble getScrollToSelectedOffset({\n  required String groupName,\n  required List<Proxy> proxies,\n}) {\n  final columns = appController.getProxiesColumns();\n  final proxyCardType = appController.config.proxiesStyleProps.cardType;\n  final selectedProxyName = appController.getSelectedProxyName(groupName);\n  final findSelectedIndex = proxies.indexWhere(\n    (proxy) => proxy.name == selectedProxyName,\n  );\n  final selectedIndex = findSelectedIndex != -1 ? findSelectedIndex : 0;\n  final rows = (selectedIndex / columns).floor();\n  return rows * getItemHeight(proxyCardType) + (rows - 1) * 8;\n}\n"
  },
  {
    "path": "lib/views/proxies/list.dart",
    "content": "import 'dart:math';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/providers/config.dart';\nimport 'package:fl_clash/providers/state.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nimport 'card.dart';\nimport 'common.dart';\n\ntypedef GroupNameProxiesMap = Map<String, List<Proxy>>;\n\nclass ProxiesListView extends StatefulWidget {\n  const ProxiesListView({super.key});\n\n  @override\n  State<ProxiesListView> createState() => _ProxiesListViewState();\n}\n\nclass _ProxiesListViewState extends State<ProxiesListView> {\n  final _controller = ScrollController();\n  final _headerStateNotifier = ValueNotifier<ProxiesListHeaderSelectorState?>(\n    null,\n  );\n  List<double> _headerOffset = [];\n  double containerHeight = 0;\n\n  @override\n  void initState() {\n    super.initState();\n    _controller.addListener(_adjustHeader);\n    WidgetsBinding.instance.addPostFrameCallback((_) {\n      _adjustHeader();\n    });\n  }\n\n  ProxiesListHeaderSelectorState _getProxiesListHeaderSelectorState(\n    double initOffset,\n  ) {\n    final index = _headerOffset.findInterval(initOffset);\n    final currentIndex = index;\n    double headerOffset = 0.0;\n    if (index + 1 <= _headerOffset.length - 1) {\n      final endOffset = _headerOffset[index + 1];\n      final startOffset = endOffset - listHeaderHeight - 8;\n      if (initOffset > startOffset && initOffset < endOffset) {\n        headerOffset = initOffset - startOffset;\n      }\n    }\n    return ProxiesListHeaderSelectorState(\n      offset: max(headerOffset, 0),\n      currentIndex: currentIndex,\n    );\n  }\n\n  void _adjustHeader() {\n    _headerStateNotifier.value = _getProxiesListHeaderSelectorState(\n      !_controller.hasClients ? 0 : _controller.offset,\n    );\n  }\n\n  double _getListItemHeight(Type type, ProxyCardType proxyCardType) {\n    return switch (type) {\n      const (SizedBox) => 8,\n      const (ListHeader) => listHeaderHeight,\n      Type() => getItemHeight(proxyCardType),\n    };\n  }\n\n  @override\n  void dispose() {\n    _headerStateNotifier.dispose();\n    _controller.removeListener(_adjustHeader);\n    _controller.dispose();\n    super.dispose();\n  }\n\n  void _handleChange(Set<String> currentUnfoldSet, String groupName) {\n    _autoScrollToGroup(groupName);\n    final tempUnfoldSet = Set<String>.from(currentUnfoldSet);\n    if (tempUnfoldSet.contains(groupName)) {\n      tempUnfoldSet.remove(groupName);\n    } else {\n      tempUnfoldSet.add(groupName);\n    }\n    appController.updateCurrentUnfoldSet(tempUnfoldSet);\n    WidgetsBinding.instance.addPostFrameCallback((_) {\n      _adjustHeader();\n    });\n  }\n\n  List<double> _getItemHeightList(\n    List<Widget> items,\n    ProxyCardType proxyCardType,\n  ) {\n    final itemHeightList = <double>[];\n    List<double> headerOffset = [];\n    double currentHeight = 0;\n    for (final item in items) {\n      if (item.runtimeType == ListHeader) {\n        headerOffset.add(currentHeight);\n      }\n      final itemHeight = _getListItemHeight(item.runtimeType, proxyCardType);\n      itemHeightList.add(itemHeight);\n      currentHeight = currentHeight + itemHeight;\n    }\n    _headerOffset = headerOffset;\n    return itemHeightList;\n  }\n\n  List<Widget> _buildItems(\n    WidgetRef ref, {\n    required List<Group> groups,\n    required int columns,\n    required Set<String> currentUnfoldSet,\n    required ProxyCardType cardType,\n  }) {\n    final items = <Widget>[];\n    for (final group in groups) {\n      final groupName = group.name;\n      final isExpand = currentUnfoldSet.contains(groupName);\n      items.addAll([\n        ListHeader(\n          onScrollToSelected: _scrollToGroupSelected,\n          isExpand: isExpand,\n          group: group,\n          onChange: (String groupName) {\n            _handleChange(currentUnfoldSet, groupName);\n          },\n        ),\n        const SizedBox(height: 8),\n      ]);\n      if (isExpand) {\n        final proxies = group.all;\n        final chunks = proxies.chunks(columns);\n        final rows = chunks\n            .map<Widget>((proxies) {\n              final children = proxies\n                  .map<Widget>(\n                    (proxy) => Flexible(\n                      child: SizedBox(\n                        height: getItemHeight(cardType),\n                        child: ProxyCard(\n                          testUrl: group.testUrl,\n                          type: cardType,\n                          groupType: group.type,\n                          key: ValueKey('$groupName.${proxy.name}'),\n                          proxy: proxy,\n                          groupName: groupName,\n                        ),\n                      ),\n                    ),\n                  )\n                  .fill(\n                    columns,\n                    filler: (_) => const Flexible(child: SizedBox()),\n                  )\n                  .separated(const SizedBox(width: 8));\n\n              return Row(children: children.toList());\n            })\n            .separated(const SizedBox(height: 8));\n        items.addAll([...rows, const SizedBox(height: 8)]);\n      }\n    }\n    return items;\n  }\n\n  Widget _buildHeader(\n    WidgetRef ref, {\n    required Group group,\n    required Set<String> currentUnfoldSet,\n  }) {\n    final groupName = group.name;\n    final isExpand = currentUnfoldSet.contains(groupName);\n    return SizedBox(\n      height: listHeaderHeight,\n      child: ListHeader(\n        enterAnimated: false,\n        onScrollToSelected: _scrollToGroupSelected,\n        key: Key(groupName),\n        isExpand: isExpand,\n        group: group,\n        onChange: (String groupName) {\n          _handleChange(currentUnfoldSet, groupName);\n        },\n      ),\n    );\n  }\n\n  double _getGroupOffset(String groupName) {\n    if (_controller.position.maxScrollExtent == 0) {\n      return 0;\n    }\n    final currentGroups = appController.getCurrentGroups();\n    final findIndex = currentGroups.indexWhere(\n      (item) => item.name == groupName,\n    );\n    final index = findIndex != -1 ? findIndex : 0;\n    return _headerOffset[index];\n  }\n\n  void _scrollToMakeVisibleWithPadding({\n    required double containerHeight,\n    required double pixels,\n    required double start,\n    required double end,\n    double padding = 24,\n  }) {\n    final visibleStart = pixels;\n    final visibleEnd = pixels + containerHeight;\n\n    final isElementVisible = start >= visibleStart && end <= visibleEnd;\n    if (isElementVisible) {\n      return;\n    }\n\n    double targetScrollOffset;\n\n    if (end <= visibleStart) {\n      targetScrollOffset = start;\n    } else if (start >= visibleEnd) {\n      targetScrollOffset = end - containerHeight + padding;\n    } else {\n      final visibleTopPart = end - visibleStart;\n      final visibleBottomPart = visibleEnd - start;\n      if (visibleTopPart.abs() >= visibleBottomPart.abs()) {\n        targetScrollOffset = end - containerHeight + padding;\n      } else {\n        targetScrollOffset = start;\n      }\n    }\n\n    targetScrollOffset = targetScrollOffset.clamp(\n      _controller.position.minScrollExtent,\n      _controller.position.maxScrollExtent,\n    );\n\n    _controller.jumpTo(targetScrollOffset);\n  }\n\n  void _autoScrollToGroup(String groupName) {\n    final pixels = _controller.position.pixels;\n    final offset = _getGroupOffset(groupName);\n    _scrollToMakeVisibleWithPadding(\n      containerHeight: containerHeight,\n      pixels: pixels,\n      start: offset,\n      end: offset + listHeaderHeight,\n    );\n  }\n\n  void _scrollToGroupSelected(String groupName) {\n    final currentInitOffset = _getGroupOffset(groupName);\n    final currentGroups = appController.getCurrentGroups();\n    final proxies = currentGroups.getGroup(groupName)?.all;\n    _jumpTo(\n      currentInitOffset +\n          8 +\n          getScrollToSelectedOffset(\n            groupName: groupName,\n            proxies: proxies ?? [],\n          ),\n    );\n  }\n\n  void _jumpTo(double offset) {\n    if (mounted && _controller.hasClients) {\n      _controller.animateTo(\n        offset.clamp(\n          _controller.position.minScrollExtent,\n          _controller.position.maxScrollExtent,\n        ),\n        duration: const Duration(milliseconds: 300),\n        curve: Curves.easeIn,\n      );\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Consumer(\n      builder: (_, ref, _) {\n        final state = ref.watch(proxiesListStateProvider);\n        ref.watch(themeSettingProvider.select((state) => state.textScale));\n        if (state.groups.isEmpty) {\n          return NullStatus(\n            illustration: ProxyEmptyIllustration(),\n            label: appLocalizations.nullTip(appLocalizations.proxies),\n          );\n        }\n        final items = _buildItems(\n          ref,\n          groups: state.groups,\n          currentUnfoldSet: state.currentUnfoldSet,\n          columns: state.columns,\n          cardType: state.proxyCardType,\n        );\n        final itemsOffset = _getItemHeightList(items, state.proxyCardType);\n        return CommonScrollBar(\n          controller: _controller,\n          thumbVisibility: true,\n          trackVisibility: true,\n          child: Stack(\n            children: [\n              Positioned.fill(\n                child: ScrollConfiguration(\n                  behavior: HiddenBarScrollBehavior(),\n                  child: ListView.builder(\n                    key: proxiesListStoreKey,\n                    padding: const EdgeInsets.all(16),\n                    controller: _controller,\n                    itemExtentBuilder: (index, _) {\n                      return itemsOffset[index];\n                    },\n                    itemCount: items.length,\n                    itemBuilder: (_, index) {\n                      return items[index];\n                    },\n                  ),\n                ),\n              ),\n              LayoutBuilder(\n                builder: (_, container) {\n                  containerHeight = container.maxHeight;\n                  return ValueListenableBuilder(\n                    valueListenable: _headerStateNotifier,\n                    builder: (_, headerState, _) {\n                      if (headerState == null) {\n                        return SizedBox();\n                      }\n                      final index =\n                          headerState.currentIndex > state.groups.length - 1\n                          ? 0\n                          : headerState.currentIndex;\n                      if (index < 0 || state.groups.isEmpty) {\n                        return Container();\n                      }\n                      return Stack(\n                        children: [\n                          Positioned(\n                            top: -headerState.offset,\n                            child: Container(\n                              width: container.maxWidth,\n                              color: context.colorScheme.surface,\n                              padding: const EdgeInsets.only(\n                                top: 16,\n                                left: 16,\n                                right: 16,\n                                bottom: 8,\n                              ),\n                              child: _buildHeader(\n                                ref,\n                                group: state.groups[index],\n                                currentUnfoldSet: state.currentUnfoldSet,\n                              ),\n                            ),\n                          ),\n                        ],\n                      );\n                    },\n                  );\n                },\n              ),\n            ],\n          ),\n        );\n      },\n    );\n  }\n}\n\nclass ListHeader extends StatefulWidget {\n  final Group group;\n\n  final Function(String groupName) onChange;\n  final Function(String groupName) onScrollToSelected;\n  final bool isExpand;\n\n  final bool enterAnimated;\n\n  const ListHeader({\n    super.key,\n    this.enterAnimated = true,\n    required this.group,\n    required this.onChange,\n    required this.onScrollToSelected,\n    required this.isExpand,\n  });\n\n  @override\n  State<ListHeader> createState() => _ListHeaderState();\n}\n\nclass _ListHeaderState extends State<ListHeader> {\n  var isLock = false;\n\n  String get icon => widget.group.icon;\n\n  String get groupName => widget.group.name;\n\n  String get groupType => widget.group.type.name;\n\n  bool get isExpand => widget.isExpand;\n\n  Future<void> _delayTest() async {\n    if (isLock) return;\n    isLock = true;\n    await delayTest(widget.group.all, widget.group.testUrl);\n    isLock = false;\n  }\n\n  void _handleChange(String groupName) {\n    widget.onChange(groupName);\n  }\n\n  Widget _buildIcon() {\n    return Consumer(\n      builder: (_, ref, child) {\n        final iconStyle = ref.watch(\n          proxiesStyleSettingProvider.select((state) => state.iconStyle),\n        );\n        return switch (iconStyle) {\n          ProxiesIconStyle.standard => LayoutBuilder(\n            builder: (_, constraints) {\n              return Container(\n                margin: const EdgeInsets.only(right: 16),\n                child: AspectRatio(\n                  aspectRatio: 1,\n                  child: Container(\n                    height: constraints.maxHeight,\n                    width: constraints.maxWidth,\n                    alignment: Alignment.center,\n                    padding: EdgeInsets.all(6.ap),\n                    decoration: BoxDecoration(\n                      borderRadius: BorderRadius.circular(12),\n                      color: context.colorScheme.secondaryContainer,\n                    ),\n                    clipBehavior: Clip.antiAlias,\n                    child: CommonTargetIcon(\n                      src: icon,\n                      size: constraints.maxHeight - 12.ap,\n                    ),\n                  ),\n                ),\n              );\n            },\n          ),\n          ProxiesIconStyle.icon => Container(\n            margin: const EdgeInsets.only(right: 16),\n            child: LayoutBuilder(\n              builder: (_, constraints) {\n                return CommonTargetIcon(\n                  src: icon,\n                  size: constraints.maxHeight - 8,\n                );\n              },\n            ),\n          ),\n          ProxiesIconStyle.none => Container(),\n        };\n      },\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonCard(\n      enterAnimated: widget.enterAnimated,\n      key: widget.key,\n      radius: 18.ap,\n      type: CommonCardType.filled,\n      child: Padding(\n        padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),\n        child: Row(\n          mainAxisAlignment: MainAxisAlignment.spaceBetween,\n          children: [\n            Flexible(\n              child: Row(\n                children: [\n                  _buildIcon(),\n                  Flexible(\n                    child: Column(\n                      mainAxisSize: MainAxisSize.min,\n                      crossAxisAlignment: CrossAxisAlignment.start,\n                      children: [\n                        EmojiText(\n                          groupName,\n                          style: context.textTheme.titleMedium,\n                        ),\n                        const SizedBox(height: 4),\n                        Flexible(\n                          flex: 1,\n                          child: Row(\n                            mainAxisSize: MainAxisSize.min,\n                            mainAxisAlignment: MainAxisAlignment.start,\n                            crossAxisAlignment: CrossAxisAlignment.center,\n                            children: [\n                              Text(\n                                groupType,\n                                style: context.textTheme.labelMedium?.toLight,\n                              ),\n                              Flexible(\n                                flex: 1,\n                                child: Consumer(\n                                  builder: (_, ref, _) {\n                                    final proxyName = ref\n                                        .watch(\n                                          getSelectedProxyNameProvider(\n                                            groupName,\n                                          ),\n                                        )\n                                        .takeFirstValid([]);\n                                    return Row(\n                                      mainAxisSize: MainAxisSize.min,\n                                      mainAxisAlignment:\n                                          MainAxisAlignment.start,\n                                      crossAxisAlignment:\n                                          CrossAxisAlignment.center,\n                                      children: [\n                                        if (proxyName.isNotEmpty) ...[\n                                          Flexible(\n                                            flex: 1,\n                                            child: EmojiText(\n                                              overflow: TextOverflow.ellipsis,\n                                              ' · $proxyName',\n                                              style: context\n                                                  .textTheme\n                                                  .labelMedium\n                                                  ?.toLight,\n                                            ),\n                                          ),\n                                        ],\n                                      ],\n                                    );\n                                  },\n                                ),\n                              ),\n                            ],\n                          ),\n                        ),\n                        const SizedBox(width: 4),\n                      ],\n                    ),\n                  ),\n                ],\n              ),\n            ),\n            Row(\n              children: [\n                if (isExpand) ...[\n                  IconButton(\n                    visualDensity: VisualDensity.compact,\n                    padding: EdgeInsets.all(2),\n                    onPressed: () {\n                      widget.onScrollToSelected(groupName);\n                    },\n                    style: ButtonStyle(\n                      tapTargetSize: MaterialTapTargetSize.shrinkWrap,\n                    ),\n                    iconSize: 19,\n                    icon: const Icon(Icons.adjust),\n                  ),\n                  const SizedBox(width: 2),\n                  IconButton(\n                    iconSize: 20,\n                    visualDensity: VisualDensity.compact,\n                    padding: EdgeInsets.all(2),\n                    onPressed: _delayTest,\n                    style: ButtonStyle(\n                      tapTargetSize: MaterialTapTargetSize.shrinkWrap,\n                    ),\n                    icon: const Icon(Icons.network_ping),\n                  ),\n                  const SizedBox(width: 6),\n                ] else\n                  SizedBox(width: 6),\n                IconButton.filledTonal(\n                  visualDensity: VisualDensity.compact,\n                  padding: EdgeInsets.all(2),\n                  iconSize: 24,\n                  style: ButtonStyle(\n                    tapTargetSize: MaterialTapTargetSize.shrinkWrap,\n                  ),\n                  onPressed: () {\n                    _handleChange(groupName);\n                  },\n                  icon: CommonExpandIcon(expand: isExpand),\n                ),\n              ],\n            ),\n          ],\n        ),\n      ),\n      onPressed: () {\n        _handleChange(groupName);\n      },\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/proxies/providers.dart",
    "content": "import 'dart:convert';\nimport 'dart:io';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/core/core.dart';\nimport 'package:fl_clash/models/common.dart';\nimport 'package:fl_clash/models/core.dart';\nimport 'package:fl_clash/providers/app.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\ntypedef UpdatingMap = Map<String, bool>;\n\nclass ProvidersView extends ConsumerStatefulWidget {\n  final SheetType type;\n\n  const ProvidersView({super.key, required this.type});\n\n  @override\n  ConsumerState<ProvidersView> createState() => _ProvidersViewState();\n}\n\nclass _ProvidersViewState extends ConsumerState<ProvidersView> {\n  Future<void> _updateProviders() async {\n    final providers = ref.read(providersProvider);\n    final List<UpdatingMessage> messages = [];\n    final updateProviders = providers.map<Future>((provider) async {\n      final message = await appController.updateProvider(provider);\n      if (message.isNotEmpty) {\n        messages.add(UpdatingMessage(label: provider.name, message: message));\n      }\n    });\n    await Future.wait(updateProviders);\n    appController.updateGroupsDebounce();\n    if (messages.isNotEmpty) {\n      globalState.showAllUpdatingMessagesDialog(messages);\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final providers = ref.watch(providersProvider);\n    final proxyProviders = providers\n        .where((item) => item.type == 'Proxy')\n        .map((item) => ProviderItem(provider: item));\n    final ruleProviders = providers\n        .where((item) => item.type == 'Rule')\n        .map((item) => ProviderItem(provider: item));\n    final proxySection = generateSection(\n      title: appLocalizations.proxyProviders,\n      items: proxyProviders,\n    );\n    final ruleSection = generateSection(\n      title: appLocalizations.ruleProviders,\n      items: ruleProviders,\n    );\n    return AdaptiveSheetScaffold(\n      actions: [\n        IconButton(\n          onPressed: () {\n            _updateProviders();\n          },\n          icon: const Icon(Icons.sync),\n        ),\n      ],\n      type: widget.type,\n      body: generateListView([...proxySection, ...ruleSection]),\n      title: appLocalizations.providers,\n    );\n  }\n}\n\nclass ProviderItem extends StatelessWidget {\n  final ExternalProvider provider;\n\n  const ProviderItem({super.key, required this.provider});\n\n  Future<void> _handleUpdateProvider() async {\n    if (provider.vehicleType != 'HTTP') return;\n    await appController.safeRun(() async {\n      final message = await appController.updateProvider(provider);\n      if (message.isNotEmpty) throw message;\n    }, silence: false);\n    appController.updateGroupsDebounce();\n  }\n\n  Future<void> _handleSideLoadProvider() async {\n    await appController.safeRun<void>(() async {\n      final platformFile = await picker.pickerFile();\n      final bytes = platformFile?.bytes;\n      if (bytes == null || provider.path == null) return;\n      await File(provider.path!).safeWriteAsBytes(bytes);\n      final providerName = provider.name;\n      var message = await coreController.sideLoadExternalProvider(\n        providerName: providerName,\n        data: utf8.decode(bytes),\n      );\n      if (message.isNotEmpty) throw message;\n      appController.setProvider(\n        await coreController.getExternalProvider(provider.name),\n      );\n      if (message.isNotEmpty) throw message;\n    });\n    appController.updateGroupsDebounce();\n  }\n\n  String _buildProviderDesc() {\n    final baseInfo = provider.updateAt.lastUpdateTimeDesc;\n    final count = provider.count;\n    return switch (count == 0) {\n      true => baseInfo,\n      false => '$baseInfo  ·  $count${appLocalizations.entries}',\n    };\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return ListItem(\n      padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 4),\n      title: Text(provider.name),\n      subtitle: Column(\n        crossAxisAlignment: CrossAxisAlignment.start,\n        children: [\n          const SizedBox(height: 4),\n          if (provider.updateAt.microsecondsSinceEpoch > 0)\n            Text(_buildProviderDesc()),\n          const SizedBox(height: 4),\n          if (provider.subscriptionInfo != null)\n            SubscriptionInfoView(subscriptionInfo: provider.subscriptionInfo),\n          const SizedBox(height: 8),\n          Wrap(\n            runSpacing: 6,\n            spacing: 12,\n            runAlignment: WrapAlignment.center,\n            children: [\n              CommonChip(\n                avatar: const Icon(Icons.upload),\n                label: appLocalizations.upload,\n                onPressed: _handleSideLoadProvider,\n              ),\n              if (provider.vehicleType == 'HTTP')\n                Consumer(\n                  builder: (_, ref, _) {\n                    final isUpdating = ref.watch(\n                      isUpdatingProvider(provider.updatingKey),\n                    );\n                    return isUpdating\n                        ? SizedBox(\n                            height: 30,\n                            width: 30,\n                            child: const Padding(\n                              padding: EdgeInsets.all(2),\n                              child: CircularProgressIndicator(),\n                            ),\n                          )\n                        : CommonChip(\n                            avatar: const Icon(Icons.sync),\n                            label: appLocalizations.sync,\n                            onPressed: _handleUpdateProvider,\n                          );\n                  },\n                ),\n            ],\n          ),\n          const SizedBox(height: 4),\n        ],\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/proxies/proxies.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/common.dart';\nimport 'package:fl_clash/models/state.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/views/proxies/list.dart';\nimport 'package:fl_clash/views/proxies/providers.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nimport 'setting.dart';\nimport 'tab.dart';\n\nclass ProxiesView extends ConsumerStatefulWidget {\n  const ProxiesView({super.key});\n\n  @override\n  ConsumerState<ProxiesView> createState() => _ProxiesViewState();\n}\n\nclass _ProxiesViewState extends ConsumerState<ProxiesView> {\n  final GlobalKey<CommonScaffoldState> _scaffoldKey = GlobalKey();\n  final GlobalKey<ProxiesTabViewState> _proxiesTabKey = GlobalKey();\n  bool _hasProviders = false;\n  bool _isTab = false;\n\n  List<Widget> _buildActions() {\n    return [\n      if (_isTab)\n        IconButton(\n          onPressed: () {\n            _proxiesTabKey.currentState?.scrollToGroupSelected();\n          },\n          icon: Icon(Icons.adjust, weight: 1),\n        ),\n      CommonPopupBox(\n        targetBuilder: (open) {\n          return IconButton(\n            onPressed: () {\n              final isMobile = ref.read(isMobileViewProvider);\n              open(offset: Offset(0, isMobile ? 0 : 20));\n            },\n            icon: Icon(Icons.more_vert),\n          );\n        },\n        popup: CommonPopupMenu(\n          items: [\n            PopupMenuItemData(\n              icon: Icons.tune,\n              label: appLocalizations.settings,\n              onPressed: () {\n                showSheet(\n                  context: context,\n                  props: SheetProps(isScrollControlled: true),\n                  builder: (_, type) {\n                    return AdaptiveSheetScaffold(\n                      type: type,\n                      body: const ProxiesSetting(),\n                      title: appLocalizations.settings,\n                    );\n                  },\n                );\n              },\n            ),\n            if (_hasProviders)\n              PopupMenuItemData(\n                icon: Icons.poll_outlined,\n                label: appLocalizations.providers,\n                onPressed: () {\n                  showExtend(\n                    context,\n                    builder: (_, type) {\n                      return ProvidersView(type: type);\n                    },\n                  );\n                },\n              ),\n          ],\n        ),\n      ),\n    ];\n  }\n\n  Widget? _buildFAB() {\n    return _isTab\n        ? DelayTestButton(\n            onClick: () async {\n              await _proxiesTabKey.currentState?.delayTestCurrentGroup();\n            },\n          )\n        : null;\n  }\n\n  void _onSearch(String value) {\n    ref.read(queryProvider(QueryTag.proxies).notifier).value = value;\n  }\n\n  @override\n  void initState() {\n    super.initState();\n    ref.listenManual(providersProvider.select((state) => state.isNotEmpty), (\n      prev,\n      next,\n    ) {\n      if (prev != next) {\n        setState(() {\n          _hasProviders = next;\n        });\n      }\n    }, fireImmediately: true);\n    ref.listenManual(\n      proxiesStyleSettingProvider.select(\n        (state) => state.type == ProxiesType.tab,\n      ),\n      (prev, next) {\n        if (prev != next) {\n          setState(() {\n            _isTab = next;\n          });\n        }\n      },\n      fireImmediately: true,\n    );\n    ref.listenManual(\n      currentPageLabelProvider.select((state) => state == PageLabel.proxies),\n      (prev, next) {\n        if (prev != next && next == false) {\n          _scaffoldKey.currentState?.handleExitSearching();\n        }\n      },\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final proxiesType = ref.watch(\n      proxiesStyleSettingProvider.select((state) => state.type),\n    );\n    final isLoading = ref.watch(loadingProvider(LoadingTag.proxies));\n    return CommonScaffold(\n      key: _scaffoldKey,\n      isLoading: isLoading,\n      resizeToAvoidBottomInset: false,\n      floatingActionButton: _buildFAB(),\n      actions: _buildActions(),\n      title: appLocalizations.proxies,\n      searchState: AppBarSearchState(onSearch: _onSearch),\n      body: switch (proxiesType) {\n        ProxiesType.tab => ProxiesTabView(key: _proxiesTabKey),\n        ProxiesType.list => const ProxiesListView(),\n      },\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/proxies/setting.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/providers/config.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:intl/intl.dart';\n\nclass ProxiesSetting extends StatelessWidget {\n  const ProxiesSetting({super.key});\n\n  IconData _getIconWithProxiesType(ProxiesType type) {\n    return switch (type) {\n      ProxiesType.tab => Icons.view_carousel,\n      ProxiesType.list => Icons.view_list,\n    };\n  }\n\n  IconData _getIconWithProxiesSortType(ProxiesSortType type) {\n    return switch (type) {\n      ProxiesSortType.none => Icons.sort,\n      ProxiesSortType.delay => Icons.network_ping,\n      ProxiesSortType.name => Icons.sort_by_alpha,\n    };\n  }\n\n  String _getStringProxiesSortType(ProxiesSortType type) {\n    return switch (type) {\n      ProxiesSortType.none => appLocalizations.defaultText,\n      ProxiesSortType.delay => appLocalizations.delay,\n      ProxiesSortType.name => appLocalizations.name,\n    };\n  }\n\n  String getTextForProxiesLayout(ProxiesLayout proxiesLayout) {\n    return switch (proxiesLayout) {\n      ProxiesLayout.tight => appLocalizations.tight,\n      ProxiesLayout.standard => appLocalizations.standard,\n      ProxiesLayout.loose => appLocalizations.loose,\n    };\n  }\n\n  String _getTextWithProxiesIconStyle(ProxiesIconStyle style) {\n    return switch (style) {\n      ProxiesIconStyle.standard => appLocalizations.standard,\n      ProxiesIconStyle.none => appLocalizations.none,\n      ProxiesIconStyle.icon => appLocalizations.onlyIcon,\n    };\n  }\n\n  List<Widget> _buildStyleSetting() {\n    return generateSection(\n      isFirst: true,\n      title: appLocalizations.style,\n      items: [\n        SingleChildScrollView(\n          padding: const EdgeInsets.symmetric(horizontal: 16),\n          scrollDirection: Axis.horizontal,\n          child: Consumer(\n            builder: (_, ref, _) {\n              final proxiesType = ref.watch(\n                proxiesStyleSettingProvider.select((state) => state.type),\n              );\n              return Wrap(\n                spacing: 16,\n                children: [\n                  for (final item in ProxiesType.values)\n                    SettingInfoCard(\n                      Info(\n                        label: Intl.message(item.name),\n                        iconData: _getIconWithProxiesType(item),\n                      ),\n                      isSelected: proxiesType == item,\n                      onPressed: () {\n                        ref.read(proxiesStyleSettingProvider.notifier).update((\n                          state,\n                        ) {\n                          return state.copyWith(type: item);\n                        });\n                      },\n                    ),\n                ],\n              );\n            },\n          ),\n        ),\n      ],\n    );\n  }\n\n  List<Widget> _buildSortSetting() {\n    return generateSection(\n      title: appLocalizations.sort,\n      items: [\n        SingleChildScrollView(\n          padding: const EdgeInsets.symmetric(horizontal: 16),\n          scrollDirection: Axis.horizontal,\n          child: Consumer(\n            builder: (_, ref, _) {\n              final sortType = ref.watch(\n                proxiesStyleSettingProvider.select((state) => state.sortType),\n              );\n              return Wrap(\n                spacing: 16,\n                children: [\n                  for (final item in ProxiesSortType.values)\n                    SettingInfoCard(\n                      Info(\n                        label: _getStringProxiesSortType(item),\n                        iconData: _getIconWithProxiesSortType(item),\n                      ),\n                      isSelected: sortType == item,\n                      onPressed: () {\n                        ref.read(proxiesStyleSettingProvider.notifier).update((\n                          state,\n                        ) {\n                          return state.copyWith(sortType: item);\n                        });\n                      },\n                    ),\n                ],\n              );\n            },\n          ),\n        ),\n      ],\n    );\n  }\n\n  List<Widget> _buildSizeSetting() {\n    return generateSection(\n      title: appLocalizations.size,\n      items: [\n        SingleChildScrollView(\n          padding: const EdgeInsets.symmetric(horizontal: 16),\n          scrollDirection: Axis.horizontal,\n          child: Consumer(\n            builder: (_, ref, _) {\n              final cardType = ref.watch(\n                proxiesStyleSettingProvider.select((state) => state.cardType),\n              );\n              return Wrap(\n                spacing: 16,\n                children: [\n                  for (final item in ProxyCardType.values)\n                    SettingTextCard(\n                      Intl.message(item.name),\n                      isSelected: item == cardType,\n                      onPressed: () {\n                        ref.read(proxiesStyleSettingProvider.notifier).update((\n                          state,\n                        ) {\n                          return state.copyWith(cardType: item);\n                        });\n                      },\n                    ),\n                ],\n              );\n            },\n          ),\n        ),\n      ],\n    );\n  }\n\n  List<Widget> _buildLayoutSetting() {\n    return generateSection(\n      title: appLocalizations.layout,\n      items: [\n        SingleChildScrollView(\n          padding: const EdgeInsets.symmetric(horizontal: 16),\n          scrollDirection: Axis.horizontal,\n          child: Consumer(\n            builder: (_, ref, _) {\n              final layout = ref.watch(\n                proxiesStyleSettingProvider.select((state) => state.layout),\n              );\n              return Wrap(\n                spacing: 16,\n                children: [\n                  for (final item in ProxiesLayout.values)\n                    SettingTextCard(\n                      getTextForProxiesLayout(item),\n                      isSelected: item == layout,\n                      onPressed: () {\n                        ref.watch(proxiesStyleSettingProvider.notifier).update((\n                          state,\n                        ) {\n                          return state.copyWith(layout: item);\n                        });\n                      },\n                    ),\n                ],\n              );\n            },\n          ),\n        ),\n      ],\n    );\n  }\n\n  List<Widget> _buildGroupStyleSetting() {\n    return generateSection(\n      title: appLocalizations.iconStyle,\n      items: [\n        SingleChildScrollView(\n          padding: const EdgeInsets.symmetric(horizontal: 16),\n          scrollDirection: Axis.horizontal,\n          child: Consumer(\n            builder: (_, ref, _) {\n              final iconStyle = ref.watch(\n                proxiesStyleSettingProvider.select((state) => state.iconStyle),\n              );\n              return Wrap(\n                spacing: 16,\n                children: [\n                  for (final item in ProxiesIconStyle.values)\n                    SettingTextCard(\n                      _getTextWithProxiesIconStyle(item),\n                      isSelected: iconStyle == item,\n                      onPressed: () {\n                        ref.read(proxiesStyleSettingProvider.notifier).update((\n                          state,\n                        ) {\n                          return state.copyWith(iconStyle: item);\n                        });\n                      },\n                    ),\n                ],\n              );\n            },\n          ),\n        ),\n      ],\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return SingleChildScrollView(\n      padding: EdgeInsets.only(bottom: 32),\n      child: Column(\n        mainAxisSize: MainAxisSize.min,\n        crossAxisAlignment: CrossAxisAlignment.start,\n        children: [\n          ..._buildStyleSetting(),\n          ..._buildSortSetting(),\n          ..._buildLayoutSetting(),\n          ..._buildSizeSetting(),\n          Consumer(\n            builder: (_, ref, child) {\n              final isList = ref.watch(\n                proxiesStyleSettingProvider.select(\n                  (state) => state.type == ProxiesType.list,\n                ),\n              );\n              if (isList) {\n                return child!;\n              }\n              return Container();\n            },\n            child: Column(\n              mainAxisSize: MainAxisSize.min,\n              crossAxisAlignment: CrossAxisAlignment.start,\n              children: [..._buildGroupStyleSetting()],\n            ),\n          ),\n        ],\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/proxies/tab.dart",
    "content": "import 'dart:math';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/common.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nimport 'card.dart';\nimport 'common.dart';\n\ntypedef ProxyGroupViewKeyMap =\n    Map<String, GlobalObjectKey<_ProxyGroupViewState>>;\n\nclass ProxiesTabView extends ConsumerStatefulWidget {\n  const ProxiesTabView({super.key});\n\n  static Map<String, PageStorageKey> pageListStoreMap = {};\n\n  @override\n  ConsumerState<ProxiesTabView> createState() => ProxiesTabViewState();\n}\n\nclass ProxiesTabViewState extends ConsumerState<ProxiesTabView>\n    with TickerProviderStateMixin {\n  TabController? _tabController;\n  final _hasMoreButtonNotifier = ValueNotifier<bool>(false);\n  ProxyGroupViewKeyMap _keyMap = {};\n\n  @override\n  void initState() {\n    super.initState();\n    ref.listenManual(proxiesTabControllerStateProvider, (prev, next) {\n      if (prev == next) {\n        return;\n      }\n      if (!stringListEquality.equals(prev?.a, next.a)) {\n        _destroyTabController();\n        final groupNames = next.a;\n        final currentGroupName = next.b;\n        final index = groupNames.indexWhere((item) => item == currentGroupName);\n        _updateTabController(groupNames.length, index);\n      }\n    }, fireImmediately: true);\n  }\n\n  @override\n  void dispose() {\n    _destroyTabController();\n    super.dispose();\n  }\n\n  void scrollToGroupSelected() {\n    final currentGroupName = appController.getCurrentGroupName();\n    _keyMap[currentGroupName]?.currentState?.scrollToSelected();\n  }\n\n  Future<void> delayTestCurrentGroup() async {\n    final currentGroupName = appController.getCurrentGroupName();\n    final currentState = _keyMap[currentGroupName]?.currentState;\n    await delayTest(currentState?.currentProxies ?? [], currentState?.testUrl);\n  }\n\n  Widget _buildMoreButton() {\n    return Consumer(\n      builder: (_, ref, _) {\n        final isMobileView = ref.watch(isMobileViewProvider);\n        return IconButton(\n          onPressed: _showMoreMenu,\n          icon: isMobileView\n              ? const Icon(Icons.expand_more)\n              : const Icon(Icons.chevron_right),\n        );\n      },\n    );\n  }\n\n  void _showMoreMenu() {\n    showSheet(\n      context: context,\n      props: SheetProps(isScrollControlled: false),\n      builder: (_, type) {\n        return AdaptiveSheetScaffold(\n          type: type,\n          body: SingleChildScrollView(\n            padding: const EdgeInsets.all(16),\n            child: Consumer(\n              builder: (_, ref, _) {\n                final state = ref.watch(proxiesTabControllerStateProvider);\n                final groupNames = state.a;\n                final currentGroupName = state.b;\n                return SizedBox(\n                  width: double.infinity,\n                  child: Wrap(\n                    alignment: WrapAlignment.center,\n                    runSpacing: 8,\n                    spacing: 8,\n                    children: [\n                      for (final groupName in groupNames)\n                        SettingTextCard(\n                          groupName,\n                          onPressed: () {\n                            final index = groupNames.indexWhere(\n                              (item) => item == groupName,\n                            );\n                            if (index == -1) return;\n                            _tabController?.animateTo(index);\n                            appController.updateCurrentGroupName(groupName);\n                            Navigator.of(context).pop();\n                          },\n                          isSelected: groupName == currentGroupName,\n                        ),\n                    ],\n                  ),\n                );\n              },\n            ),\n          ),\n          title: appLocalizations.proxyGroup,\n        );\n      },\n    );\n  }\n\n  void _tabControllerListener([int? index]) {\n    WidgetsBinding.instance.addPostFrameCallback((_) {\n      int? groupIndex = index;\n      if (groupIndex == -1) {\n        return;\n      }\n      if (groupIndex == null) {\n        final currentIndex = _tabController?.index;\n        groupIndex = currentIndex;\n      }\n      final currentGroups = appController.getCurrentGroups();\n      if (groupIndex == null || groupIndex > currentGroups.length) {\n        return;\n      }\n      final currentGroup = currentGroups[groupIndex];\n      appController.updateCurrentGroupName(currentGroup.name);\n    });\n  }\n\n  void _destroyTabController() {\n    _tabController?.removeListener(_tabControllerListener);\n    _tabController?.dispose();\n    _tabController = null;\n  }\n\n  void _updateTabController(int length, int index) {\n    _destroyTabController();\n    if (length == 0) {\n      return;\n    }\n    final realIndex = index == -1 ? 0 : index;\n    _tabController ??= TabController(\n      length: length,\n      initialIndex: realIndex,\n      vsync: this,\n    );\n    _tabControllerListener(realIndex);\n    _tabController?.addListener(_tabControllerListener);\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    ref.watch(themeSettingProvider.select((state) => state.textScale));\n    final state = ref.watch(proxiesTabStateProvider.select((state) => state));\n    final groups = state.groups;\n    if (groups.isEmpty || _tabController == null) {\n      return NullStatus(\n        illustration: ProxyEmptyIllustration(),\n        label: appLocalizations.nullTip(appLocalizations.proxies),\n      );\n    }\n    _keyMap = {};\n    return Column(\n      mainAxisAlignment: MainAxisAlignment.start,\n      crossAxisAlignment: CrossAxisAlignment.start,\n      children: [\n        NotificationListener<ScrollMetricsNotification>(\n          onNotification: (scrollNotification) {\n            _hasMoreButtonNotifier.value =\n                scrollNotification.metrics.maxScrollExtent > 0;\n            return false;\n          },\n          child: ValueListenableBuilder(\n            valueListenable: _hasMoreButtonNotifier,\n            builder: (_, value, child) {\n              return Stack(\n                alignment: AlignmentDirectional.centerStart,\n                children: [\n                  TabBar(\n                    controller: _tabController,\n                    padding: EdgeInsets.only(\n                      left: 16,\n                      right: 16 + (value ? 16 : 0),\n                    ),\n                    dividerColor: Colors.transparent,\n                    isScrollable: true,\n                    tabAlignment: TabAlignment.start,\n                    overlayColor: const WidgetStatePropertyAll(\n                      Colors.transparent,\n                    ),\n                    tabs: [\n                      for (final group in groups)\n                        Tab(\n                          child: Builder(\n                            builder: (context) {\n                              return EmojiText(\n                                group.name,\n                                style: DefaultTextStyle.of(context).style,\n                              );\n                            },\n                          ),\n                        ),\n                    ],\n                  ),\n                  if (value) Positioned(right: 0, child: child!),\n                ],\n              );\n            },\n            child: Container(\n              decoration: BoxDecoration(\n                gradient: LinearGradient(\n                  begin: Alignment.centerLeft,\n                  end: Alignment.centerRight,\n                  colors: [\n                    context.colorScheme.surface.opacity10,\n                    context.colorScheme.surface,\n                  ],\n                  stops: const [0.0, 0.1],\n                ),\n              ),\n              child: _buildMoreButton(),\n            ),\n          ),\n        ),\n        Expanded(\n          child: TabBarView(\n            controller: _tabController,\n            children: [\n              for (final group in groups)\n                ProxyGroupView(\n                  key: _keyMap.updateCacheValue(\n                    group.name,\n                    () => GlobalObjectKey<_ProxyGroupViewState>(group.name),\n                  ),\n                  group: group,\n                  columns: state.columns,\n                  cardType: state.proxyCardType,\n                ),\n            ],\n          ),\n        ),\n      ],\n    );\n  }\n}\n\nclass ProxyGroupView extends ConsumerStatefulWidget {\n  final Group group;\n  final int columns;\n  final ProxyCardType cardType;\n\n  const ProxyGroupView({\n    super.key,\n    required this.group,\n    required this.columns,\n    required this.cardType,\n  });\n\n  @override\n  ConsumerState<ProxyGroupView> createState() => _ProxyGroupViewState();\n}\n\nclass _ProxyGroupViewState extends ConsumerState<ProxyGroupView> {\n  late final ScrollController _controller;\n\n  List<Proxy> currentProxies = [];\n  String? testUrl;\n\n  @override\n  void initState() {\n    super.initState();\n    _controller = ScrollController();\n  }\n\n  PageStorageKey _getPageStorageKey() {\n    final profile = appController.currentProfile;\n    final key =\n        '${profile?.id}_${ScrollPositionCacheKey.proxiesTabList.name}_${widget.group.name}';\n    return ProxiesTabView.pageListStoreMap.updateCacheValue(\n      key,\n      () => PageStorageKey(key),\n    );\n  }\n\n  @override\n  void dispose() {\n    _controller.dispose();\n    super.dispose();\n  }\n\n  void scrollToSelected() {\n    if (_controller.position.maxScrollExtent == 0) {\n      return;\n    }\n    _controller.animateTo(\n      min(\n        16 +\n            getScrollToSelectedOffset(\n              groupName: widget.group.name,\n              proxies: currentProxies,\n            ),\n        _controller.position.maxScrollExtent,\n      ),\n      duration: const Duration(milliseconds: 300),\n      curve: Curves.easeIn,\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final group = widget.group;\n    final proxies = group.all;\n    testUrl = group.testUrl;\n    currentProxies = proxies;\n    return CommonScrollBar(\n      controller: _controller,\n      child: GridView.builder(\n        key: _getPageStorageKey(),\n        controller: _controller,\n        padding: const EdgeInsets.only(\n          top: 16,\n          left: 16,\n          right: 16,\n          bottom: 96,\n        ),\n        gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(\n          crossAxisCount: widget.columns,\n          mainAxisSpacing: 8,\n          crossAxisSpacing: 8,\n          mainAxisExtent: getItemHeight(widget.cardType),\n        ),\n        itemCount: currentProxies.length,\n        itemBuilder: (_, index) {\n          final proxy = currentProxies[index];\n          return ProxyCard(\n            testUrl: group.testUrl,\n            groupType: group.type,\n            type: widget.cardType,\n            proxy: proxy,\n            groupName: group.name,\n          );\n        },\n      ),\n    );\n  }\n}\n\nclass DelayTestButton extends StatefulWidget {\n  final Future Function() onClick;\n\n  const DelayTestButton({super.key, required this.onClick});\n\n  @override\n  State<DelayTestButton> createState() => _DelayTestButtonState();\n}\n\nclass _DelayTestButtonState extends State<DelayTestButton>\n    with SingleTickerProviderStateMixin {\n  late AnimationController _controller;\n  late Animation<double> _animation;\n\n  Future<void> _healthcheck() async {\n    if (_controller.isAnimating) {\n      return;\n    }\n    _controller.forward();\n    await widget.onClick();\n    if (mounted) {\n      _controller.reverse();\n    }\n  }\n\n  @override\n  void initState() {\n    super.initState();\n    _controller = AnimationController(\n      vsync: this,\n      duration: const Duration(milliseconds: 400),\n    );\n    _animation = Tween<double>(begin: 1.0, end: 0.0).animate(\n      CurvedAnimation(parent: _controller, curve: Curves.easeInOutBack),\n    );\n  }\n\n  @override\n  void dispose() {\n    _controller.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return AnimatedBuilder(\n      animation: _controller.view,\n      builder: (_, child) {\n        return FadeTransition(\n          opacity: _animation,\n          child: ScaleTransition(scale: _animation, child: child),\n        );\n      },\n      child: CommonFloatingActionButton(\n        onPressed: _healthcheck,\n        label: appLocalizations.delayTest,\n        icon: const Icon(Icons.network_ping),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/resources.dart",
    "content": "import 'dart:io';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/core/core.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/providers/config.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:path/path.dart' hide context;\n\n@immutable\nclass GeoItem {\n  final String label;\n  final String key;\n  final String fileName;\n\n  const GeoItem({\n    required this.label,\n    required this.key,\n    required this.fileName,\n  });\n}\n\nclass ResourcesView extends StatelessWidget {\n  const ResourcesView({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    const geoItems = <GeoItem>[\n      GeoItem(label: 'GEOIP', fileName: GEOIP, key: 'geoip'),\n      GeoItem(label: 'GEOSITE', fileName: GEOSITE, key: 'geosite'),\n      GeoItem(label: 'MMDB', fileName: MMDB, key: 'mmdb'),\n      GeoItem(label: 'ASN', fileName: ASN, key: 'asn'),\n    ];\n\n    return CommonScaffold(\n      title: appLocalizations.resources,\n      body: ListView.separated(\n        itemBuilder: (_, index) {\n          final geoItem = geoItems[index];\n          return GeoDataListItem(geoItem: geoItem);\n        },\n        separatorBuilder: (BuildContext context, int index) {\n          return const Divider(height: 0);\n        },\n        itemCount: geoItems.length,\n      ),\n    );\n  }\n}\n\nclass GeoDataListItem extends StatefulWidget {\n  final GeoItem geoItem;\n\n  const GeoDataListItem({super.key, required this.geoItem});\n\n  @override\n  State<GeoDataListItem> createState() => _GeoDataListItemState();\n}\n\nclass _GeoDataListItemState extends State<GeoDataListItem> {\n  final isUpdating = ValueNotifier<bool>(false);\n\n  GeoItem get geoItem => widget.geoItem;\n\n  Future<void> _updateUrl(String url, WidgetRef ref) async {\n    final defaultMap = defaultGeoXUrl.toJson();\n    final newUrl = await globalState.showCommonDialog<String>(\n      child: UpdateGeoUrlFormDialog(\n        title: geoItem.label,\n        url: url,\n        defaultValue: defaultMap[geoItem.key],\n      ),\n    );\n    if (newUrl != null && newUrl != url && mounted) {\n      try {\n        if (!newUrl.isUrl) {\n          throw 'Invalid url';\n        }\n        ref.read(patchClashConfigProvider.notifier).update((state) {\n          final map = state.geoXUrl.toJson();\n          map[geoItem.key] = newUrl;\n          return state.copyWith(geoXUrl: GeoXUrl.fromJson(map));\n        });\n      } catch (e) {\n        globalState.showMessage(\n          title: geoItem.label,\n          message: TextSpan(text: e.toString()),\n        );\n      }\n    }\n  }\n\n  Future<FileInfo> _getGeoFileLastModified(String fileName) async {\n    final homePath = await appPath.homeDirPath;\n    final file = File(join(homePath, fileName));\n    final lastModified = await file.lastModified();\n    final size = await file.length();\n    return FileInfo(size: size, lastModified: lastModified);\n  }\n\n  Widget _buildSubtitle() {\n    return Consumer(\n      builder: (_, ref, _) {\n        final url = ref.watch(\n          patchClashConfigProvider.select(\n            (state) => state.geoXUrl.toJson()[geoItem.key],\n          ),\n        );\n        if (url == null) {\n          return SizedBox();\n        }\n        return Column(\n          crossAxisAlignment: CrossAxisAlignment.start,\n          children: [\n            const SizedBox(height: 6),\n            FutureBuilder<FileInfo>(\n              future: _getGeoFileLastModified(geoItem.fileName),\n              builder: (_, snapshot) {\n                final height = globalState.measure.bodyMediumHeight;\n                return SizedBox(\n                  height: height,\n                  child: snapshot.data == null\n                      ? SizedBox(width: height, height: height)\n                      : Text(\n                          snapshot.data!.desc,\n                          style: context.textTheme.bodyMedium,\n                        ),\n                );\n              },\n            ),\n            const SizedBox(height: 4),\n            Text(url, style: context.textTheme.bodyMedium?.toLight),\n            const SizedBox(height: 12),\n            Wrap(\n              runSpacing: 6,\n              spacing: 12,\n              runAlignment: WrapAlignment.center,\n              children: [\n                CommonChip(\n                  avatar: const Icon(Icons.edit),\n                  label: appLocalizations.edit,\n                  onPressed: () {\n                    _updateUrl(url, ref);\n                  },\n                ),\n                Row(\n                  mainAxisSize: MainAxisSize.min,\n                  children: [\n                    SizedBox(\n                      child: ValueListenableBuilder(\n                        valueListenable: isUpdating,\n                        builder: (_, isUpdating, _) {\n                          return isUpdating\n                              ? SizedBox(\n                                  height: 30,\n                                  width: 30,\n                                  child: const Padding(\n                                    padding: EdgeInsets.all(2),\n                                    child: CircularProgressIndicator(),\n                                  ),\n                                )\n                              : CommonChip(\n                                  avatar: const Icon(Icons.sync),\n                                  label: appLocalizations.sync,\n                                  onPressed: () {\n                                    _handleUpdateGeoDataItem();\n                                  },\n                                );\n                        },\n                      ),\n                    ),\n                  ],\n                ),\n              ],\n            ),\n            const SizedBox(height: 6),\n          ],\n        );\n      },\n    );\n  }\n\n  Future<void> _handleUpdateGeoDataItem() async {\n    await appController.safeRun<void>(() async {\n      await updateGeoDateItem();\n    }, silence: false);\n    if (mounted) {\n      setState(() {});\n    }\n  }\n\n  Future<void> updateGeoDateItem() async {\n    isUpdating.value = true;\n    try {\n      final message = await coreController.updateGeoData(\n        UpdateGeoDataParams(geoName: geoItem.fileName, geoType: geoItem.label),\n      );\n      if (message.isNotEmpty) throw message;\n    } catch (e) {\n      isUpdating.value = false;\n      rethrow;\n    }\n    isUpdating.value = false;\n    return;\n  }\n\n  @override\n  void dispose() {\n    super.dispose();\n    isUpdating.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return ListItem(\n      padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 4),\n      title: Text(geoItem.label),\n      subtitle: _buildSubtitle(),\n    );\n  }\n}\n\nclass UpdateGeoUrlFormDialog extends StatefulWidget {\n  final String title;\n  final String url;\n  final String? defaultValue;\n\n  const UpdateGeoUrlFormDialog({\n    super.key,\n    required this.title,\n    required this.url,\n    this.defaultValue,\n  });\n\n  @override\n  State<UpdateGeoUrlFormDialog> createState() => _UpdateGeoUrlFormDialogState();\n}\n\nclass _UpdateGeoUrlFormDialogState extends State<UpdateGeoUrlFormDialog> {\n  late final TextEditingController _urlController;\n\n  @override\n  void initState() {\n    super.initState();\n    _urlController = TextEditingController(text: widget.url);\n  }\n\n  Future<void> _handleReset() async {\n    if (widget.defaultValue == null) {\n      return;\n    }\n    Navigator.of(context).pop<String>(widget.defaultValue);\n  }\n\n  Future<void> _handleUpdate() async {\n    final url = _urlController.value.text;\n    if (url.isEmpty) return;\n    Navigator.of(context).pop<String>(url);\n  }\n\n  @override\n  void dispose() {\n    _urlController.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonDialog(\n      title: widget.title,\n      actions: [\n        if (widget.defaultValue != null &&\n            _urlController.value.text != widget.defaultValue) ...[\n          TextButton(\n            onPressed: _handleReset,\n            child: Text(appLocalizations.reset),\n          ),\n          const SizedBox(width: 4),\n        ],\n        TextButton(\n          onPressed: _handleUpdate,\n          child: Text(appLocalizations.submit),\n        ),\n      ],\n      child: Wrap(\n        runSpacing: 16,\n        children: [\n          TextField(\n            maxLines: 5,\n            minLines: 1,\n            controller: _urlController,\n            decoration: const InputDecoration(border: OutlineInputBorder()),\n          ),\n        ],\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/theme.dart",
    "content": "// ignore_for_file: deprecated_member_use\n\nimport 'dart:math';\nimport 'dart:ui' as ui;\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/providers/config.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:intl/intl.dart';\n\nclass ThemeModeItem {\n  final ThemeMode themeMode;\n  final IconData iconData;\n  final String label;\n\n  const ThemeModeItem({\n    required this.themeMode,\n    required this.iconData,\n    required this.label,\n  });\n}\n\nclass FontFamilyItem {\n  final FontFamily fontFamily;\n  final String label;\n\n  const FontFamilyItem({required this.fontFamily, required this.label});\n}\n\nclass ThemeView extends StatelessWidget {\n  const ThemeView({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return BaseScaffold(\n      title: appLocalizations.theme,\n      body: CustomScrollView(\n        slivers: [\n          _ThemeModeItem(),\n          SliverToBoxAdapter(child: SizedBox(height: 16)),\n          _PrimaryColorItem(),\n          SliverToBoxAdapter(child: SizedBox(height: 16)),\n          _PrueBlackItem(),\n          SliverToBoxAdapter(child: SizedBox(height: 16)),\n          _TextScaleFactorItem(),\n          SliverToBoxAdapter(child: SizedBox(height: 32)),\n        ],\n      ),\n    );\n  }\n}\n\nclass ItemCard extends StatelessWidget {\n  final Widget child;\n  final Info info;\n  final List<Widget> actions;\n\n  const ItemCard({\n    super.key,\n    required this.info,\n    required this.child,\n    this.actions = const [],\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return Wrap(\n      runSpacing: 16,\n      children: [\n        InfoHeader(info: info, actions: actions),\n        child,\n      ],\n    );\n  }\n}\n\nclass _ThemeModeItem extends ConsumerWidget {\n  const _ThemeModeItem();\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final themeMode = ref.watch(\n      themeSettingProvider.select((state) => state.themeMode),\n    );\n    List<ThemeModeItem> themeModeItems = [\n      ThemeModeItem(\n        iconData: Icons.auto_mode,\n        label: appLocalizations.auto,\n        themeMode: ThemeMode.system,\n      ),\n      ThemeModeItem(\n        iconData: Icons.light_mode,\n        label: appLocalizations.light,\n        themeMode: ThemeMode.light,\n      ),\n      ThemeModeItem(\n        iconData: Icons.dark_mode,\n        label: appLocalizations.dark,\n        themeMode: ThemeMode.dark,\n      ),\n    ];\n    return SliverToBoxAdapter(\n      child: ItemCard(\n        info: Info(\n          label: appLocalizations.themeMode,\n          iconData: Icons.brightness_high,\n        ),\n        child: Container(\n          padding: const EdgeInsets.symmetric(horizontal: 16),\n          height: 56,\n          child: ListView.separated(\n            scrollDirection: Axis.horizontal,\n            itemCount: themeModeItems.length,\n            itemBuilder: (_, index) {\n              final themeModeItem = themeModeItems[index];\n              return CommonCard(\n                isSelected: themeModeItem.themeMode == themeMode,\n                onPressed: () {\n                  ref\n                      .read(themeSettingProvider.notifier)\n                      .update(\n                        (state) =>\n                            state.copyWith(themeMode: themeModeItem.themeMode),\n                      );\n                },\n                child: Padding(\n                  padding: const EdgeInsets.symmetric(horizontal: 16),\n                  child: Row(\n                    mainAxisSize: MainAxisSize.min,\n                    mainAxisAlignment: MainAxisAlignment.start,\n                    children: [\n                      Flexible(child: Icon(themeModeItem.iconData)),\n                      const SizedBox(width: 8),\n                      Flexible(child: Text(themeModeItem.label)),\n                    ],\n                  ),\n                ),\n              );\n            },\n            separatorBuilder: (_, _) {\n              return const SizedBox(width: 16);\n            },\n          ),\n        ),\n      ),\n    );\n  }\n}\n\nclass _PrimaryColorItem extends ConsumerStatefulWidget {\n  const _PrimaryColorItem();\n\n  @override\n  ConsumerState<_PrimaryColorItem> createState() => _PrimaryColorItemState();\n}\n\nclass _PrimaryColorItemState extends ConsumerState<_PrimaryColorItem> {\n  int? _removablePrimaryColor;\n\n  int _calcColumns(double maxWidth) {\n    return max((maxWidth / 96).ceil(), 3);\n  }\n\n  Future<void> _handleReset() async {\n    final res = await globalState.showMessage(\n      message: TextSpan(text: appLocalizations.resetTip),\n    );\n    if (res != true) {\n      return;\n    }\n    ref.read(themeSettingProvider.notifier).update((state) {\n      return state.copyWith(\n        primaryColors: defaultPrimaryColors,\n        primaryColor: defaultPrimaryColor,\n        schemeVariant: DynamicSchemeVariant.content,\n      );\n    });\n  }\n\n  Future<void> _handleDel() async {\n    if (_removablePrimaryColor == null) {\n      return;\n    }\n    final res = await globalState.showMessage(\n      message: TextSpan(\n        text: appLocalizations.deleteTip(appLocalizations.colorSchemes),\n      ),\n    );\n    if (res != true) {\n      return;\n    }\n    ref.read(themeSettingProvider.notifier).update((state) {\n      final newPrimaryColors = List<int>.from(state.primaryColors)\n        ..remove(_removablePrimaryColor);\n      int? newPrimaryColor = state.primaryColor;\n      if (state.primaryColor == _removablePrimaryColor) {\n        if (newPrimaryColors.contains(defaultPrimaryColor)) {\n          newPrimaryColor = defaultPrimaryColor;\n        } else {\n          newPrimaryColor = null;\n        }\n      }\n      return state.copyWith(\n        primaryColors: newPrimaryColors,\n        primaryColor: newPrimaryColor,\n      );\n    });\n    setState(() {\n      _removablePrimaryColor = null;\n    });\n  }\n\n  Future<void> _handleAdd() async {\n    final res = await globalState.showCommonDialog<int>(\n      child: _PaletteDialog(),\n    );\n    if (res == null) {\n      return;\n    }\n    final isExists = ref.read(\n      themeSettingProvider.select((state) => state.primaryColors.contains(res)),\n    );\n    if (isExists && mounted) {\n      context.showNotifier(\n        appLocalizations.existsTip(appLocalizations.colorSchemes),\n      );\n      return;\n    }\n    ref.read(themeSettingProvider.notifier).update((state) {\n      return state.copyWith(\n        primaryColors: List.from(state.primaryColors)..add(res),\n      );\n    });\n  }\n\n  Future<void> _handleChangeSchemeVariant() async {\n    final schemeVariant = ref.read(\n      themeSettingProvider.select((state) => state.schemeVariant),\n    );\n    final value = await globalState.showCommonDialog<DynamicSchemeVariant>(\n      child: OptionsDialog<DynamicSchemeVariant>(\n        title: appLocalizations.colorSchemes,\n        options: DynamicSchemeVariant.values,\n        textBuilder: (item) => Intl.message('${item.name}Scheme'),\n        value: schemeVariant,\n      ),\n    );\n    if (value == null) {\n      return;\n    }\n    ref.read(themeSettingProvider.notifier).update((state) {\n      return state.copyWith(schemeVariant: value);\n    });\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final vm4 = ref.watch(\n      themeSettingProvider.select(\n        (state) => VM4(\n          state.primaryColor,\n          state.primaryColors,\n          state.schemeVariant,\n          state.primaryColor == defaultPrimaryColor &&\n              intListEquality.equals(\n                state.primaryColors,\n                defaultPrimaryColors,\n              ) &&\n              state.schemeVariant == DynamicSchemeVariant.content,\n        ),\n      ),\n    );\n    final primaryColor = vm4.a;\n    final primaryColors = [null, ...vm4.b];\n    final schemeVariant = vm4.c;\n    final isEquals = vm4.d;\n\n    return SliverToBoxAdapter(\n      child: CommonPopScope(\n        onPop: (context) {\n          if (_removablePrimaryColor != null) {\n            setState(() {\n              _removablePrimaryColor = null;\n            });\n            return false;\n          }\n          return true;\n        },\n        child: ItemCard(\n          info: Info(\n            label: appLocalizations.themeColor,\n            iconData: Icons.palette,\n          ),\n          actions: genActions([\n            if (_removablePrimaryColor == null)\n              FilledButton(\n                style: FilledButton.styleFrom(\n                  visualDensity: VisualDensity.compact,\n                ),\n                onPressed: _handleChangeSchemeVariant,\n                child: Text(Intl.message('${schemeVariant.name}Scheme')),\n              ),\n            if (_removablePrimaryColor != null)\n              FilledButton(\n                style: FilledButton.styleFrom(\n                  visualDensity: VisualDensity.compact,\n                ),\n                onPressed: () {\n                  setState(() {\n                    _removablePrimaryColor = null;\n                  });\n                },\n                child: Text(appLocalizations.cancel),\n              ),\n            if (_removablePrimaryColor == null && !isEquals)\n              IconButton.filledTonal(\n                iconSize: 20,\n                padding: EdgeInsets.all(4),\n                visualDensity: VisualDensity.compact,\n                onPressed: _handleReset,\n                icon: Icon(Icons.replay),\n              ),\n          ], space: 8),\n          child: Container(\n            margin: const EdgeInsets.symmetric(horizontal: 16),\n            child: LayoutBuilder(\n              builder: (_, constraints) {\n                final columns = _calcColumns(constraints.maxWidth);\n                final itemWidth =\n                    (constraints.maxWidth - (columns - 1) * 16) / columns;\n                return Wrap(\n                  spacing: 16,\n                  runSpacing: 16,\n                  children: [\n                    for (final color in primaryColors)\n                      Container(\n                        clipBehavior: Clip.none,\n                        width: itemWidth,\n                        height: itemWidth,\n                        child: Stack(\n                          alignment: Alignment.center,\n                          clipBehavior: Clip.none,\n                          children: [\n                            EffectGestureDetector(\n                              child: ColorSchemeBox(\n                                isSelected: color == primaryColor,\n                                primaryColor: color != null\n                                    ? Color(color)\n                                    : null,\n                                onPressed: () {\n                                  setState(() {\n                                    _removablePrimaryColor = null;\n                                  });\n                                  ref\n                                      .read(themeSettingProvider.notifier)\n                                      .update(\n                                        (state) =>\n                                            state.copyWith(primaryColor: color),\n                                      );\n                                },\n                              ),\n                              onLongPress: () {\n                                setState(() {\n                                  _removablePrimaryColor = color;\n                                });\n                              },\n                            ),\n                            if (_removablePrimaryColor != null &&\n                                _removablePrimaryColor == color)\n                              Container(\n                                color: Colors.white.opacity0,\n                                padding: EdgeInsets.all(8),\n                                child: IconButton.filledTonal(\n                                  onPressed: _handleDel,\n                                  padding: EdgeInsets.all(12),\n                                  iconSize: 30,\n                                  icon: Icon(\n                                    color: context.colorScheme.primary,\n                                    Icons.delete,\n                                  ),\n                                ),\n                              ),\n                          ],\n                        ),\n                      ),\n                    if (_removablePrimaryColor == null)\n                      Container(\n                        width: itemWidth,\n                        height: itemWidth,\n                        padding: EdgeInsets.all(4),\n                        child: IconButton.filledTonal(\n                          onPressed: _handleAdd,\n                          iconSize: 32,\n                          icon: Icon(\n                            color: context.colorScheme.primary,\n                            Icons.add,\n                          ),\n                        ),\n                      ),\n                  ],\n                );\n              },\n            ),\n          ),\n        ),\n      ),\n    );\n  }\n}\n\nclass _PrueBlackItem extends ConsumerWidget {\n  const _PrueBlackItem();\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final prueBlack = ref.watch(\n      themeSettingProvider.select((state) => state.pureBlack),\n    );\n    return SliverToBoxAdapter(\n      child: ListItem.switchItem(\n        leading: Icon(Icons.contrast),\n        horizontalTitleGap: 12,\n        title: Text(\n          appLocalizations.pureBlackMode,\n          style: Theme.of(context).textTheme.titleSmall?.copyWith(\n            color: context.colorScheme.onSurfaceVariant,\n          ),\n        ),\n        delegate: SwitchDelegate(\n          value: prueBlack,\n          onChanged: (value) {\n            ref\n                .read(themeSettingProvider.notifier)\n                .update((state) => state.copyWith(pureBlack: value));\n          },\n        ),\n      ),\n    );\n  }\n}\n\nclass _TextScaleFactorItem extends ConsumerWidget {\n  const _TextScaleFactorItem();\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final textScale = ref.watch(\n      themeSettingProvider.select((state) => state.textScale),\n    );\n    final String process = '${(textScale.scale * 100).round()}%';\n    return SliverToBoxAdapter(\n      child: Column(\n        crossAxisAlignment: CrossAxisAlignment.start,\n        children: [\n          Padding(\n            padding: EdgeInsets.only(bottom: 8),\n            child: ListItem.switchItem(\n              leading: Icon(Icons.text_fields),\n              horizontalTitleGap: 12,\n              title: Text(\n                appLocalizations.textScale,\n                style: Theme.of(context).textTheme.titleSmall?.copyWith(\n                  color: context.colorScheme.onSurfaceVariant,\n                ),\n              ),\n              delegate: SwitchDelegate(\n                value: textScale.enable,\n                onChanged: (value) {\n                  ref\n                      .read(themeSettingProvider.notifier)\n                      .update(\n                        (state) => state.copyWith.textScale(enable: value),\n                      );\n                },\n              ),\n            ),\n          ),\n          Padding(\n            padding: EdgeInsets.symmetric(horizontal: 16),\n            child: Row(\n              mainAxisAlignment: MainAxisAlignment.spaceBetween,\n              mainAxisSize: MainAxisSize.max,\n              spacing: 32,\n              children: [\n                Expanded(\n                  child: DisabledMask(\n                    status: !textScale.enable,\n                    child: ActivateBox(\n                      active: textScale.enable,\n                      child: SliderTheme(\n                        data: _SliderDefaultsM3(context),\n                        child: Slider(\n                          padding: EdgeInsets.zero,\n                          min: minTextScale,\n                          max: maxTextScale,\n                          value: textScale.scale,\n                          onChanged: (value) {\n                            ref\n                                .read(themeSettingProvider.notifier)\n                                .update(\n                                  (state) =>\n                                      state.copyWith.textScale(scale: value),\n                                );\n                          },\n                        ),\n                      ),\n                    ),\n                  ),\n                ),\n                Padding(\n                  padding: EdgeInsets.only(right: 4),\n                  child: Text(process, style: context.textTheme.titleMedium),\n                ),\n              ],\n            ),\n          ),\n        ],\n      ),\n    );\n  }\n}\n\nclass _PaletteDialog extends StatefulWidget {\n  const _PaletteDialog();\n\n  @override\n  State<_PaletteDialog> createState() => _PaletteDialogState();\n}\n\nclass _PaletteDialogState extends State<_PaletteDialog> {\n  final _controller = ValueNotifier<ui.Color>(Colors.transparent);\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonDialog(\n      title: appLocalizations.palette,\n      actions: [\n        TextButton(\n          onPressed: () {\n            Navigator.of(context).pop();\n          },\n          child: Text(appLocalizations.cancel),\n        ),\n        TextButton(\n          onPressed: () {\n            Navigator.of(context).pop(_controller.value.toARGB32());\n          },\n          child: Text(appLocalizations.confirm),\n        ),\n      ],\n      child: Column(\n        children: [\n          SizedBox(height: 8),\n          SizedBox(\n            width: 250,\n            height: 250,\n            child: Palette(controller: _controller),\n          ),\n          SizedBox(height: 24),\n          ValueListenableBuilder(\n            valueListenable: _controller,\n            builder: (_, color, _) {\n              return PrimaryColorBox(\n                primaryColor: color,\n                child: FilledButton(\n                  onPressed: () {},\n                  child: Text(_controller.value.hex),\n                ),\n              );\n            },\n          ),\n        ],\n      ),\n    );\n  }\n}\n\nclass _SliderDefaultsM3 extends SliderThemeData {\n  _SliderDefaultsM3(this.context) : super(trackHeight: 16.0);\n\n  final BuildContext context;\n  late final ColorScheme _colors = Theme.of(context).colorScheme;\n\n  @override\n  Color? get activeTrackColor => _colors.primary;\n\n  @override\n  Color? get inactiveTrackColor => _colors.secondaryContainer;\n\n  @override\n  Color? get secondaryActiveTrackColor => _colors.primary.withOpacity(0.54);\n\n  @override\n  Color? get disabledActiveTrackColor => _colors.onSurface.withOpacity(0.38);\n\n  @override\n  Color? get disabledInactiveTrackColor => _colors.onSurface.withOpacity(0.12);\n\n  @override\n  Color? get disabledSecondaryActiveTrackColor =>\n      _colors.onSurface.withOpacity(0.38);\n\n  @override\n  Color? get activeTickMarkColor => _colors.onPrimary.withOpacity(1.0);\n\n  @override\n  Color? get inactiveTickMarkColor =>\n      _colors.onSecondaryContainer.withOpacity(1.0);\n\n  @override\n  Color? get disabledActiveTickMarkColor => _colors.onInverseSurface;\n\n  @override\n  Color? get disabledInactiveTickMarkColor => _colors.onSurface;\n\n  @override\n  Color? get thumbColor => _colors.primary;\n\n  @override\n  Color? get disabledThumbColor => _colors.onSurface.withOpacity(0.38);\n\n  @override\n  Color? get overlayColor =>\n      WidgetStateColor.resolveWith((Set<WidgetState> states) {\n        if (states.contains(WidgetState.dragged)) {\n          return _colors.primary.withOpacity(0.1);\n        }\n        if (states.contains(WidgetState.hovered)) {\n          return _colors.primary.withOpacity(0.08);\n        }\n        if (states.contains(WidgetState.focused)) {\n          return _colors.primary.withOpacity(0.1);\n        }\n\n        return Colors.transparent;\n      });\n\n  @override\n  TextStyle? get valueIndicatorTextStyle => Theme.of(\n    context,\n  ).textTheme.labelLarge!.copyWith(color: _colors.onInverseSurface);\n\n  @override\n  Color? get valueIndicatorColor => _colors.inverseSurface;\n\n  @override\n  SliderComponentShape? get valueIndicatorShape =>\n      const RoundedRectSliderValueIndicatorShape();\n\n  @override\n  SliderComponentShape? get thumbShape => const HandleThumbShape();\n\n  @override\n  SliderTrackShape? get trackShape => const GappedSliderTrackShape();\n\n  @override\n  SliderComponentShape? get overlayShape => const RoundSliderOverlayShape();\n\n  @override\n  SliderTickMarkShape? get tickMarkShape =>\n      const RoundSliderTickMarkShape(tickMarkRadius: 4.0 / 2);\n\n  @override\n  WidgetStateProperty<Size?>? get thumbSize {\n    return WidgetStateProperty.resolveWith((Set<WidgetState> states) {\n      if (states.contains(WidgetState.disabled)) {\n        return const Size(4.0, 44.0);\n      }\n      if (states.contains(WidgetState.hovered)) {\n        return const Size(4.0, 44.0);\n      }\n      if (states.contains(WidgetState.focused)) {\n        return const Size(2.0, 44.0);\n      }\n      if (states.contains(WidgetState.pressed)) {\n        return const Size(2.0, 44.0);\n      }\n      return const Size(4.0, 44.0);\n    });\n  }\n\n  @override\n  double? get trackGap => 6.0;\n}\n"
  },
  {
    "path": "lib/views/tools.dart",
    "content": "import 'dart:io';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/l10n/l10n.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/views/about.dart';\nimport 'package:fl_clash/views/access.dart';\nimport 'package:fl_clash/views/application_setting.dart';\nimport 'package:fl_clash/views/backup_and_restore.dart';\nimport 'package:fl_clash/views/config/config.dart';\nimport 'package:fl_clash/views/hotkey.dart';\nimport 'package:fl_clash/widgets/widgets.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\nimport 'package:intl/intl.dart';\nimport 'package:path/path.dart' show dirname, join;\n\nimport 'config/advanced.dart';\nimport 'developer.dart';\nimport 'theme.dart';\n\nclass ToolsView extends ConsumerStatefulWidget {\n  const ToolsView({super.key});\n\n  @override\n  ConsumerState<ToolsView> createState() => _ToolViewState();\n}\n\nclass _ToolViewState extends ConsumerState<ToolsView> {\n  Widget _buildNavigationMenuItem(NavigationItem navigationItem) {\n    return ListItem.open(\n      leading: navigationItem.icon,\n      title: Text(Intl.message(navigationItem.label.name)),\n      subtitle: navigationItem.description != null\n          ? Text(Intl.message(navigationItem.description!))\n          : null,\n      delegate: OpenDelegate(widget: navigationItem.builder(context)),\n    );\n  }\n\n  Widget _buildNavigationMenu(List<NavigationItem> navigationItems) {\n    return Column(\n      children: [\n        for (final navigationItem in navigationItems) ...[\n          _buildNavigationMenuItem(navigationItem),\n          navigationItems.last != navigationItem\n              ? const Divider(height: 0)\n              : Container(),\n        ],\n      ],\n    );\n  }\n\n  List<Widget> _getOtherList(bool enableDeveloperMode) {\n    return generateSection(\n      title: context.appLocalizations.other,\n      items: [\n        _DisclaimerItem(),\n        if (enableDeveloperMode) _DeveloperItem(),\n        _InfoItem(),\n      ],\n    );\n  }\n\n  List<Widget> _getSettingList() {\n    return generateSection(\n      title: context.appLocalizations.settings,\n      items: [\n        const _LocaleItem(),\n        const _ThemeItem(),\n        const _BackupItem(),\n        if (system.isDesktop) const _HotkeyItem(),\n        if (system.isWindows) const _LoopbackItem(),\n        if (system.isAndroid) const _AccessItem(),\n        const _ConfigItem(),\n        const _AdvancedConfigItem(),\n        const _SettingItem(),\n      ],\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final vm2 = ref.watch(\n      appSettingProvider.select(\n        (state) => VM2(state.locale, state.developerMode),\n      ),\n    );\n    final items = [\n      Consumer(\n        builder: (_, ref, _) {\n          final state = ref.watch(moreToolsSelectorStateProvider);\n          if (state.navigationItems.isEmpty) {\n            return Container();\n          }\n          return Column(\n            children: [\n              ListHeader(title: context.appLocalizations.more),\n              _buildNavigationMenu(state.navigationItems),\n            ],\n          );\n        },\n      ),\n      ..._getSettingList(),\n      ..._getOtherList(vm2.b),\n    ];\n    return CommonScaffold(\n      title: context.appLocalizations.tools,\n      body: ListView.builder(\n        key: toolsStoreKey,\n        itemCount: items.length,\n        itemBuilder: (_, index) => items[index],\n        padding: const EdgeInsets.only(bottom: 20),\n      ),\n    );\n  }\n}\n\nclass _LocaleItem extends ConsumerWidget {\n  const _LocaleItem();\n\n  String _getLocaleString(Locale? locale) {\n    if (locale == null) return appLocalizations.defaultText;\n    return Intl.message(locale.toString());\n  }\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final locale = ref.watch(\n      appSettingProvider.select((state) => state.locale),\n    );\n    final subTitle = locale ?? context.appLocalizations.defaultText;\n    final currentLocale = utils.getLocaleForString(locale);\n    return ListItem<Locale?>.options(\n      leading: const Icon(Icons.language_outlined),\n      title: Text(context.appLocalizations.language),\n      subtitle: Text(Intl.message(subTitle)),\n      delegate: OptionsDelegate(\n        title: context.appLocalizations.language,\n        options: [null, ...AppLocalizations.delegate.supportedLocales],\n        onChanged: (Locale? locale) {\n          ref\n              .read(appSettingProvider.notifier)\n              .update((state) => state.copyWith(locale: locale?.toString()));\n        },\n        textBuilder: (locale) => _getLocaleString(locale),\n        value: currentLocale,\n      ),\n    );\n  }\n}\n\nclass _ThemeItem extends StatelessWidget {\n  const _ThemeItem();\n\n  @override\n  Widget build(BuildContext context) {\n    return ListItem.open(\n      leading: const Icon(Icons.style),\n      title: Text(context.appLocalizations.theme),\n      subtitle: Text(context.appLocalizations.themeDesc),\n      delegate: OpenDelegate(widget: const ThemeView()),\n    );\n  }\n}\n\nclass _BackupItem extends StatelessWidget {\n  const _BackupItem();\n\n  @override\n  Widget build(BuildContext context) {\n    return ListItem.open(\n      leading: const Icon(Icons.cloud_sync),\n      title: Text(context.appLocalizations.backupAndRestore),\n      subtitle: Text(context.appLocalizations.backupAndRestoreDesc),\n      delegate: OpenDelegate(widget: const BackupAndRestore()),\n    );\n  }\n}\n\nclass _HotkeyItem extends StatelessWidget {\n  const _HotkeyItem();\n\n  @override\n  Widget build(BuildContext context) {\n    return ListItem.open(\n      leading: const Icon(Icons.keyboard),\n      title: Text(context.appLocalizations.hotkeyManagement),\n      subtitle: Text(context.appLocalizations.hotkeyManagementDesc),\n      delegate: OpenDelegate(widget: const HotKeyView()),\n    );\n  }\n}\n\nclass _LoopbackItem extends StatelessWidget {\n  const _LoopbackItem();\n\n  @override\n  Widget build(BuildContext context) {\n    return ListItem(\n      leading: const Icon(Icons.lock),\n      title: Text(context.appLocalizations.loopback),\n      subtitle: Text(context.appLocalizations.loopbackDesc),\n      onTap: () {\n        windows?.runas(\n          '\"${join(dirname(Platform.resolvedExecutable), \"EnableLoopback.exe\")}\"',\n          '',\n        );\n      },\n    );\n  }\n}\n\nclass _AccessItem extends StatelessWidget {\n  const _AccessItem();\n\n  @override\n  Widget build(BuildContext context) {\n    return ListItem.open(\n      leading: const Icon(Icons.view_list),\n      title: Text(context.appLocalizations.accessControl),\n      subtitle: Text(context.appLocalizations.accessControlDesc),\n      delegate: OpenDelegate(widget: const AccessView()),\n    );\n  }\n}\n\nclass _ConfigItem extends StatelessWidget {\n  const _ConfigItem();\n\n  @override\n  Widget build(BuildContext context) {\n    return ListItem.open(\n      leading: const Icon(Icons.edit),\n      title: Text(context.appLocalizations.basicConfig),\n      subtitle: Text(context.appLocalizations.basicConfigDesc),\n      delegate: OpenDelegate(widget: const ConfigView()),\n    );\n  }\n}\n\nclass _AdvancedConfigItem extends StatelessWidget {\n  const _AdvancedConfigItem();\n\n  @override\n  Widget build(BuildContext context) {\n    return ListItem.open(\n      leading: const Icon(Icons.build),\n      title: Text(context.appLocalizations.advancedConfig),\n      subtitle: Text(context.appLocalizations.advancedConfigDesc),\n      delegate: OpenDelegate(widget: const AdvancedConfigView()),\n    );\n  }\n}\n\nclass _SettingItem extends StatelessWidget {\n  const _SettingItem();\n\n  @override\n  Widget build(BuildContext context) {\n    return ListItem.open(\n      leading: const Icon(Icons.settings),\n      title: Text(context.appLocalizations.application),\n      subtitle: Text(context.appLocalizations.applicationDesc),\n      delegate: OpenDelegate(widget: const ApplicationSettingView()),\n    );\n  }\n}\n\nclass _DisclaimerItem extends StatelessWidget {\n  const _DisclaimerItem();\n\n  @override\n  Widget build(BuildContext context) {\n    return ListItem(\n      leading: const Icon(Icons.gavel),\n      title: Text(context.appLocalizations.disclaimer),\n      onTap: () async {\n        final isDisclaimerAccepted = await appController.showDisclaimer();\n        if (!isDisclaimerAccepted) {\n          appController.handleExit();\n        }\n      },\n    );\n  }\n}\n\nclass _InfoItem extends StatelessWidget {\n  const _InfoItem();\n\n  @override\n  Widget build(BuildContext context) {\n    return ListItem.open(\n      leading: const Icon(Icons.info),\n      title: Text(context.appLocalizations.about),\n      delegate: OpenDelegate(widget: const AboutView()),\n    );\n  }\n}\n\nclass _DeveloperItem extends StatelessWidget {\n  const _DeveloperItem();\n\n  @override\n  Widget build(BuildContext context) {\n    return ListItem.open(\n      leading: const Icon(Icons.developer_board),\n      title: Text(context.appLocalizations.developerMode),\n      delegate: OpenDelegate(widget: const DeveloperView()),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/views/views.dart",
    "content": "export 'about.dart';\nexport 'access.dart';\nexport 'application_setting.dart';\nexport 'backup_and_restore.dart';\nexport 'config/config.dart';\nexport 'connection/connections.dart';\nexport 'connection/requests.dart';\nexport 'dashboard/dashboard.dart';\nexport 'developer.dart';\nexport 'logs.dart';\nexport 'profiles/profiles.dart';\nexport 'proxies/proxies.dart';\nexport 'resources.dart';\nexport 'tools.dart';\n"
  },
  {
    "path": "lib/widgets/activate_box.dart",
    "content": "import 'package:flutter/material.dart';\n\nclass ActivateBox extends StatelessWidget {\n  final Widget child;\n  final bool active;\n\n  const ActivateBox({\n    super.key,\n    required this.child,\n    this.active = false,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return IgnorePointer(\n      ignoring: !active,\n      child: child,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/animate_grid.dart",
    "content": "import 'package:flutter/material.dart';\n\ntypedef AnimatedGridBuilder<T> = Widget Function(BuildContext, T item);\n\nclass AnimateGrid<T> extends StatelessWidget {\n  final int columns;\n  final double itemHeight;\n  final double gap;\n  final List<T> items;\n  final Key Function(T item) keyBuilder;\n  final AnimatedGridBuilder<T> builder;\n  final Duration duration;\n  final Curve curve;\n\n  const AnimateGrid({\n    super.key,\n    required this.items,\n    required this.itemHeight,\n    required this.keyBuilder,\n    required this.builder,\n    this.gap = 8,\n    this.duration = const Duration(milliseconds: 300),\n    this.curve = Curves.easeOut,\n    this.columns = 2,\n  });\n\n  int _rows(int columns, int count) => (count / columns).ceil();\n\n  Offset _getOffset(\n    int index,\n    int count,\n    double itemWidth,\n    double itemHeight,\n  ) {\n    final xIndex = index % columns;\n    final yIndex = (index / columns).floor();\n    return Offset(\n        xIndex * itemWidth + xIndex * gap, yIndex * itemHeight + yIndex * gap);\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return LayoutBuilder(builder: (_, constraints) {\n      assert(constraints.hasBoundedHeight == false);\n      final gapWidth = (columns - 1) * gap;\n      final width = constraints.maxWidth;\n      final itemWidth = (width - gapWidth) / columns;\n      final count = items.length;\n      final rows = _rows(columns, count);\n      final gapHeight = (rows - 1) * gap;\n      final height = rows * itemHeight + gapHeight;\n      return SizedBox(\n        width: width,\n        height: height,\n        child: Stack(\n          children: [\n            for (var i = 0; i <= count - 1; i++)\n              Builder(\n                key: keyBuilder(items[i]),\n                builder: (context) {\n                  final item = items[i];\n                  final offset = _getOffset(\n                    i,\n                    count,\n                    itemWidth,\n                    itemHeight,\n                  );\n                  return TweenAnimationBuilder(\n                    tween: Tween<Offset>(end: offset),\n                    duration: duration,\n                    curve: curve,\n                    builder: (_, offset, child) {\n                      return Transform.translate(\n                        offset: offset,\n                        child: child,\n                      );\n                    },\n                    child: SizedBox(\n                      height: itemHeight,\n                      width: itemWidth,\n                      child: builder(\n                        context,\n                        item,\n                      ),\n                    ),\n                  );\n                },\n              ),\n          ],\n        ),\n      );\n    });\n  }\n}\n"
  },
  {
    "path": "lib/widgets/animated_cross_slide.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter/rendering.dart';\n\nenum CrossSlideState { showFirst, showSecond }\n\ntypedef AnimatedCrossSlideBuilder =\n    Widget Function(\n      Widget topChild,\n      Key topChildKey,\n      Widget bottomChild,\n      Key bottomChildKey,\n    );\n\nclass AnimatedCrossSlide extends StatefulWidget {\n  const AnimatedCrossSlide({\n    super.key,\n    required this.firstChild,\n    required this.secondChild,\n    this.firstCurve = Curves.linear,\n    this.secondCurve = Curves.linear,\n    this.sizeCurve = Curves.linear,\n    this.alignment = Alignment.topCenter,\n    required this.crossSlideState,\n    required this.duration,\n    this.reverseDuration,\n    this.layoutBuilder = defaultLayoutBuilder,\n    this.excludeBottomFocus = true,\n  });\n\n  final Widget firstChild;\n  final Widget secondChild;\n\n  final CrossSlideState crossSlideState;\n\n  final Duration duration;\n\n  final Duration? reverseDuration;\n\n  final Curve firstCurve;\n\n  final Curve secondCurve;\n\n  final Curve sizeCurve;\n\n  final AlignmentGeometry alignment;\n\n  final AnimatedCrossSlideBuilder layoutBuilder;\n\n  final bool excludeBottomFocus;\n\n  static Widget defaultLayoutBuilder(\n    Widget topChild,\n    Key topChildKey,\n    Widget bottomChild,\n    Key bottomChildKey,\n  ) {\n    return Stack(\n      clipBehavior: Clip.none,\n      children: <Widget>[\n        Positioned(\n          key: bottomChildKey,\n          left: 0.0,\n          top: 0.0,\n          right: 0.0,\n          child: bottomChild,\n        ),\n        Positioned(key: topChildKey, child: topChild),\n      ],\n    );\n  }\n\n  @override\n  State<AnimatedCrossSlide> createState() => _AnimatedCrossSlideState();\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties.add(\n      EnumProperty<CrossSlideState>('crossSlideState', crossSlideState),\n    );\n    properties.add(\n      DiagnosticsProperty<AlignmentGeometry>(\n        'alignment',\n        alignment,\n        defaultValue: Alignment.topCenter,\n      ),\n    );\n    properties.add(\n      IntProperty('duration', duration.inMilliseconds, unit: 'ms'),\n    );\n    properties.add(\n      IntProperty(\n        'reverseDuration',\n        reverseDuration?.inMilliseconds,\n        unit: 'ms',\n        defaultValue: null,\n      ),\n    );\n  }\n}\n\nclass _AnimatedCrossSlideState extends State<AnimatedCrossSlide>\n    with TickerProviderStateMixin {\n  late AnimationController _controller;\n  late Animation<double> _firstAnimation;\n  late Animation<double> _secondAnimation;\n\n  @override\n  void initState() {\n    super.initState();\n    _controller = AnimationController(\n      duration: widget.duration,\n      reverseDuration: widget.reverseDuration,\n      vsync: this,\n    );\n    if (widget.crossSlideState == CrossSlideState.showSecond) {\n      _controller.value = 1.0;\n    }\n    _firstAnimation = _initAnimation(widget.firstCurve, true);\n    _secondAnimation = _initAnimation(widget.secondCurve, false);\n    _controller.addStatusListener((AnimationStatus status) {\n      setState(() {});\n    });\n  }\n\n  Animation<double> _initAnimation(Curve curve, bool inverted) {\n    Animation<double> result = _controller.drive(CurveTween(curve: curve));\n    if (inverted) {\n      result = result.drive(Tween<double>(begin: 1.0, end: 0.0));\n    }\n    return result;\n  }\n\n  @override\n  void dispose() {\n    _controller.dispose();\n    super.dispose();\n  }\n\n  @override\n  void didUpdateWidget(AnimatedCrossSlide oldWidget) {\n    super.didUpdateWidget(oldWidget);\n    if (widget.duration != oldWidget.duration) {\n      _controller.duration = widget.duration;\n    }\n    if (widget.reverseDuration != oldWidget.reverseDuration) {\n      _controller.reverseDuration = widget.reverseDuration;\n    }\n    if (widget.firstCurve != oldWidget.firstCurve) {\n      _firstAnimation = _initAnimation(widget.firstCurve, true);\n    }\n    if (widget.secondCurve != oldWidget.secondCurve) {\n      _secondAnimation = _initAnimation(widget.secondCurve, false);\n    }\n    if (widget.crossSlideState != oldWidget.crossSlideState) {\n      switch (widget.crossSlideState) {\n        case CrossSlideState.showFirst:\n          _controller.reverse();\n        case CrossSlideState.showSecond:\n          _controller.forward();\n      }\n    }\n  }\n\n  final Animatable<Offset> _kRightMiddleTween = Tween<Offset>(\n    begin: const Offset(1.0, 0.0),\n    end: Offset.zero,\n  );\n  final Animatable<Offset> _kMiddleLeftTween = Tween<Offset>(\n    begin: const Offset(-1.0, 0.0),\n    end: Offset.zero,\n  );\n\n  @override\n  Widget build(BuildContext context) {\n    const Key kFirstChildKey = ValueKey<CrossFadeState>(\n      CrossFadeState.showFirst,\n    );\n    const Key kSecondChildKey = ValueKey<CrossFadeState>(\n      CrossFadeState.showSecond,\n    );\n    final Key topKey;\n    Widget topChild;\n    final Animation<double> topAnimation;\n    final Animation<double> bottomAnimation;\n    final Animation<Offset> topSlideAnimation;\n    final Animation<Offset> bottomSlideAnimation;\n    final Key bottomKey;\n    Widget bottomChild;\n    final secondSlideAnimation = _secondAnimation.drive(_kRightMiddleTween);\n    final firstSlideAnimation = _firstAnimation.drive(_kMiddleLeftTween);\n    if (_controller.isForwardOrCompleted) {\n      topKey = kSecondChildKey;\n      topChild = widget.secondChild;\n      topAnimation = _secondAnimation;\n      topSlideAnimation = secondSlideAnimation;\n      bottomKey = kFirstChildKey;\n      bottomChild = widget.firstChild;\n      bottomAnimation = _firstAnimation;\n      bottomSlideAnimation = firstSlideAnimation;\n    } else {\n      topKey = kFirstChildKey;\n      topChild = widget.firstChild;\n      topAnimation = _firstAnimation;\n      topSlideAnimation = firstSlideAnimation;\n      bottomKey = kSecondChildKey;\n      bottomChild = widget.secondChild;\n      bottomAnimation = _secondAnimation;\n      bottomSlideAnimation = secondSlideAnimation;\n    }\n\n    bottomChild = TickerMode(\n      key: bottomKey,\n      enabled: _controller.isAnimating,\n      child: IgnorePointer(\n        child: ExcludeSemantics(\n          child: ExcludeFocus(\n            excluding: widget.excludeBottomFocus,\n            child: SlideTransition(\n              position: bottomSlideAnimation,\n              child: FadeTransition(\n                opacity: bottomAnimation,\n                child: bottomChild,\n              ),\n            ),\n          ),\n        ),\n      ),\n    );\n    topChild = TickerMode(\n      key: topKey,\n      enabled: true, // Top widget always has its animations enabled.\n      child: IgnorePointer(\n        ignoring: false,\n        child: ExcludeSemantics(\n          excluding: false,\n          child: ExcludeFocus(\n            excluding: false,\n            child: SlideTransition(\n              position: topSlideAnimation,\n              child: FadeTransition(opacity: topAnimation, child: topChild),\n            ),\n          ),\n        ),\n      ),\n    );\n    return ClipRect(\n      child: AnimatedSize(\n        alignment: widget.alignment,\n        duration: widget.duration,\n        reverseDuration: widget.reverseDuration,\n        curve: widget.sizeCurve,\n        child: widget.layoutBuilder(topChild, topKey, bottomChild, bottomKey),\n      ),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder description) {\n    super.debugFillProperties(description);\n    description.add(\n      EnumProperty<CrossSlideState>('crossSlideState', widget.crossSlideState),\n    );\n    description.add(\n      DiagnosticsProperty<AnimationController>(\n        'controller',\n        _controller,\n        showName: false,\n      ),\n    );\n    description.add(\n      DiagnosticsProperty<AlignmentGeometry>(\n        'alignment',\n        widget.alignment,\n        defaultValue: Alignment.topCenter,\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/bar_chart.dart",
    "content": "import 'dart:math';\nimport 'dart:ui';\n\nimport 'package:fl_clash/common/constant.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass BarChartData {\n  final double value;\n  final String label;\n\n  const BarChartData({\n    required this.value,\n    required this.label,\n  });\n}\n\nclass BarChart extends StatefulWidget {\n  final List<BarChartData> data;\n  final Duration duration;\n\n  const BarChart({\n    super.key,\n    required this.data,\n    this.duration = commonDuration,\n  });\n\n  @override\n  State<BarChart> createState() => _BarChartState();\n}\n\nclass _BarChartState extends State<BarChart>\n    with SingleTickerProviderStateMixin {\n  late AnimationController _animationController;\n\n  late List<BarChartData> _oldData;\n\n  @override\n  void initState() {\n    super.initState();\n    _oldData = widget.data;\n    _animationController = AnimationController(\n      vsync: this,\n      duration: widget.duration,\n    )..forward(from: 0);\n  }\n\n  @override\n  void didUpdateWidget(BarChart oldWidget) {\n    super.didUpdateWidget(oldWidget);\n    if (oldWidget.data != widget.data) {\n      _oldData = oldWidget.data;\n      _animationController.forward(from: 0);\n    }\n  }\n\n  @override\n  void dispose() {\n    _animationController.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return LayoutBuilder(builder: (_, container) {\n      return AnimatedBuilder(\n        animation: _animationController,\n        builder: (context, child) {\n          return CustomPaint(\n            painter: BarChartPainter(\n              _oldData,\n              widget.data,\n              _animationController.value,\n            ),\n            size: Size(container.maxWidth, container.maxHeight),\n          );\n        },\n      );\n    });\n  }\n}\n\nclass BarChartPainter extends CustomPainter {\n  final List<BarChartData> oldData;\n  final List<BarChartData> newData;\n  final double progress;\n\n  BarChartPainter(this.oldData, this.newData, this.progress);\n\n  Map<String, Rect> getRectMap(List<BarChartData> dataList, Size size) {\n    final spacing = size.width * 0.05;\n    final maxBarWidth = 30;\n    final barWidth =\n        (size.width - spacing * (dataList.length - 1)) / dataList.length;\n    final maxValue =\n        dataList.fold(0.0, (max, item) => max > item.value ? max : item.value);\n    final rects = <String, Rect>{};\n    for (int i = 0; i < dataList.length; i++) {\n      final data = dataList[i];\n      double barHeight = (data.value / maxValue) * size.height;\n\n      final adjustLeft =\n          barWidth > maxBarWidth ? (barWidth - maxBarWidth) / 2 : 0;\n      double left = i * (barWidth + spacing) + adjustLeft;\n      double top = size.height - barHeight;\n      rects[data.label] = Rect.fromLTWH(\n        left,\n        top,\n        min(barWidth, 30),\n        barHeight,\n      );\n    }\n    return rects;\n  }\n\n  @override\n  void paint(Canvas canvas, Size size) {\n    final oldRectMap = getRectMap(oldData, size);\n    final newRectMap = getRectMap(newData, size);\n\n    final paint = Paint()\n      ..color = Colors.blue\n      ..style = PaintingStyle.fill;\n    final newRectEntries = newRectMap.entries.toList();\n    for (int i = 0; i < newRectEntries.length; i++) {\n      final newRectEntry = newRectEntries[i];\n      final newRect = newRectEntry.value;\n      final oldRect = oldRectMap[newRectEntry.key] ??\n          newRect.translate(newRect.left * (progress - 1), 0);\n\n      final interpolatedRect = Rect.fromLTRB(\n        lerpDouble(oldRect.left, newRect.left, progress)!,\n        lerpDouble(oldRect.top, newRect.top, progress)!,\n        lerpDouble(oldRect.right, newRect.right, progress)!,\n        lerpDouble(oldRect.bottom, newRect.bottom, progress)!,\n      );\n\n      canvas.drawRect(interpolatedRect, paint);\n    }\n  }\n\n  @override\n  bool shouldRepaint(BarChartPainter oldDelegate) {\n    return oldDelegate.progress != progress ||\n        oldDelegate.oldData != oldData ||\n        oldDelegate.newData != newData;\n  }\n}\n"
  },
  {
    "path": "lib/widgets/builder.dart",
    "content": "import 'package:fl_clash/widgets/inherited.dart';\nimport 'package:flutter/material.dart';\n\nclass ScrollOverBuilder extends StatefulWidget {\n  final Widget Function(bool isOver) builder;\n\n  const ScrollOverBuilder({super.key, required this.builder});\n\n  @override\n  State<ScrollOverBuilder> createState() => _ScrollOverBuilderState();\n}\n\nclass _ScrollOverBuilderState extends State<ScrollOverBuilder> {\n  final isOverNotifier = ValueNotifier<bool>(false);\n\n  @override\n  void dispose() {\n    isOverNotifier.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return NotificationListener<ScrollMetricsNotification>(\n      onNotification: (scrollNotification) {\n        isOverNotifier.value = scrollNotification.metrics.maxScrollExtent > 0;\n        return true;\n      },\n      child: ValueListenableBuilder<bool>(\n        valueListenable: isOverNotifier,\n        builder: (_, isOver, _) {\n          return widget.builder(isOver);\n        },\n      ),\n    );\n  }\n}\n\nclass FloatingActionButtonExtendedBuilder extends StatelessWidget {\n  final Widget Function(bool isExtend) builder;\n\n  const FloatingActionButtonExtendedBuilder({super.key, required this.builder});\n\n  @override\n  Widget build(BuildContext context) {\n    final isExtended =\n        CommonScaffoldFabExtendedProvider.of(context)?.isExtended ?? true;\n    return builder(isExtended);\n  }\n}\n\ntypedef StateWidgetBuilder<T> = Widget Function(T state);\n\ntypedef StateAndChildWidgetBuilder<T> = Widget Function(T state, Widget? child);\n"
  },
  {
    "path": "lib/widgets/button.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:flutter/material.dart';\n\nimport 'builder.dart';\n\nclass CommonFloatingActionButton extends StatelessWidget {\n  final VoidCallback? onPressed;\n  final Icon icon;\n  final String label;\n\n  const CommonFloatingActionButton({\n    super.key,\n    this.onPressed,\n    required this.icon,\n    required this.label,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return Theme(\n      data: Theme.of(context).copyWith(\n        floatingActionButtonTheme: Theme.of(context).floatingActionButtonTheme\n            .copyWith(\n              extendedIconLabelSpacing: 0,\n              extendedPadding: EdgeInsets.all(16),\n            ),\n      ),\n      child: FloatingActionButtonExtendedBuilder(\n        builder: (isExtended) {\n          return FloatingActionButton.extended(\n            heroTag: null,\n            icon: icon,\n            onPressed: onPressed,\n            isExtended: true,\n            label: AnimatedSize(\n              alignment: Alignment.centerLeft,\n              duration: midDuration,\n              curve: Curves.easeOutBack,\n              child: AnimatedOpacity(\n                duration: midDuration,\n                opacity: isExtended ? 1.0 : 0.4,\n                curve: Curves.linear,\n                child: isExtended\n                    ? Padding(\n                        padding: const EdgeInsets.only(left: 8.0),\n                        child: Text(label, softWrap: false),\n                      )\n                    : const SizedBox.shrink(),\n              ),\n            ),\n          );\n        },\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/card.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:flutter/material.dart';\n\nimport 'fade_box.dart';\nimport 'text.dart';\n\nclass Info {\n  final String label;\n  final IconData? iconData;\n\n  const Info({required this.label, this.iconData});\n}\n\nclass InfoHeader extends StatelessWidget {\n  final Info info;\n  final List<Widget> actions;\n  final EdgeInsets? padding;\n\n  const InfoHeader({\n    super.key,\n    required this.info,\n    this.padding,\n    List<Widget>? actions,\n  }) : actions = actions ?? const [];\n\n  @override\n  Widget build(BuildContext context) {\n    EdgeInsetsGeometry nextPadding = (padding ?? baseInfoEdgeInsets);\n    if (actions.isNotEmpty) {\n      nextPadding = nextPadding.subtract(EdgeInsets.symmetric(vertical: 8.mAp));\n    }\n    return Padding(\n      padding: nextPadding,\n      child: Row(\n        mainAxisSize: MainAxisSize.min,\n        mainAxisAlignment: MainAxisAlignment.spaceBetween,\n        children: [\n          Flexible(\n            flex: 1,\n            child: Row(\n              mainAxisSize: MainAxisSize.max,\n              children: [\n                if (info.iconData != null) ...[\n                  Icon(\n                    info.iconData,\n                    color: Theme.of(context).colorScheme.onSurfaceVariant,\n                  ),\n                  const SizedBox(width: 8),\n                ],\n                Flexible(\n                  flex: 1,\n                  child: TooltipText(\n                    text: Text(\n                      info.label,\n                      maxLines: 1,\n                      overflow: TextOverflow.ellipsis,\n                      style: Theme.of(context).textTheme.titleSmall?.copyWith(\n                        color: context.colorScheme.onSurfaceVariant,\n                      ),\n                    ),\n                  ),\n                ),\n              ],\n            ),\n          ),\n          const SizedBox(width: 8),\n          if (actions.isNotEmpty)\n            SizedBox(\n              height: globalState.measure.titleSmallHeight + 16.ap,\n              child: Row(\n                mainAxisSize: MainAxisSize.min,\n                mainAxisAlignment: MainAxisAlignment.end,\n                children: [...actions],\n              ),\n            ),\n        ],\n      ),\n    );\n  }\n}\n\nclass CommonCard extends StatelessWidget {\n  const CommonCard({\n    super.key,\n    bool? isSelected,\n    this.type = CommonCardType.plain,\n    this.onPressed,\n    this.selectWidget,\n    this.radius,\n    required this.child,\n    this.padding,\n    this.enterAnimated = false,\n    this.info,\n    this.onLongPress,\n  }) : isSelected = isSelected ?? false;\n\n  final bool enterAnimated;\n  final bool isSelected;\n  final void Function()? onPressed;\n  final void Function()? onLongPress;\n  final Widget? selectWidget;\n  final Widget child;\n  final EdgeInsets? padding;\n  final Info? info;\n  final CommonCardType type;\n  final double? radius;\n\n  // final WidgetStateProperty<Color?>? backgroundColor;\n  // final WidgetStateProperty<BorderSide?>? borderSide;\n\n  BorderSide getBorderSide(BuildContext context, Set<WidgetState> states) {\n    final colorScheme = context.colorScheme;\n    if (type == CommonCardType.filled) {\n      return BorderSide.none;\n    }\n    final hoverColor = isSelected\n        ? colorScheme.primary.opacity80\n        : colorScheme.primary.opacity60;\n    if (states.contains(WidgetState.hovered) ||\n        states.contains(WidgetState.focused) ||\n        states.contains(WidgetState.pressed)) {\n      return BorderSide(color: hoverColor);\n    }\n    return BorderSide(\n      color: isSelected\n          ? colorScheme.primary\n          : colorScheme.surfaceContainerHighest,\n    );\n  }\n\n  Color? getBackgroundColor(BuildContext context, Set<WidgetState> states) {\n    final colorScheme = context.colorScheme;\n    if (type == CommonCardType.filled) {\n      if (isSelected) {\n        return colorScheme.secondaryContainer.opacity80;\n      }\n      return colorScheme.surfaceContainerHigh;\n    }\n    if (isSelected) {\n      return colorScheme.secondaryContainer;\n    }\n    return colorScheme.surfaceContainerLow;\n  }\n\n  Color? getForegroundColor(BuildContext context, Set<WidgetState> states) {\n    final colorScheme = context.colorScheme;\n    if (type == CommonCardType.filled) {\n      if (isSelected) {\n        return colorScheme.onSecondaryContainer;\n      }\n      return colorScheme.onSurfaceVariant;\n    }\n    if (isSelected) {\n      return colorScheme.onSecondaryContainer;\n    }\n    return colorScheme.onSurfaceVariant;\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    var childWidget = child;\n\n    if (info != null) {\n      childWidget = Column(\n        mainAxisSize: MainAxisSize.min,\n        children: [\n          InfoHeader(\n            padding: baseInfoEdgeInsets.copyWith(bottom: 0),\n            info: info!,\n          ),\n          Flexible(flex: 1, child: child),\n        ],\n      );\n    }\n\n    if (selectWidget != null && isSelected) {\n      final List<Widget> children = [];\n      children.add(childWidget);\n      children.add(Positioned.fill(child: selectWidget!));\n      childWidget = Stack(children: children);\n    }\n\n    final card = OutlinedButton(\n      onLongPress: onLongPress,\n      clipBehavior: Clip.antiAlias,\n      style: ButtonStyle(\n        padding: const WidgetStatePropertyAll(EdgeInsets.zero),\n        shape: WidgetStatePropertyAll(\n          RoundedSuperellipseBorder(\n            borderRadius: BorderRadius.circular(radius ?? 14),\n          ),\n        ),\n        iconColor: WidgetStatePropertyAll(context.colorScheme.primary),\n        iconSize: WidgetStateProperty.all(20),\n        backgroundColor: WidgetStateProperty.resolveWith(\n          (states) => getBackgroundColor(context, states),\n        ),\n        foregroundColor: WidgetStateProperty.resolveWith(\n          (states) => getForegroundColor(context, states),\n        ),\n        side: WidgetStateProperty.resolveWith(\n          (states) => getBorderSide(context, states),\n        ),\n      ),\n      onPressed: onPressed,\n      child: childWidget,\n    );\n\n    return switch (enterAnimated) {\n      true => FadeScaleEnterBox(child: card),\n      false => card,\n    };\n  }\n}\n\nclass SelectIcon extends StatelessWidget {\n  const SelectIcon({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Material(\n      color: Theme.of(context).colorScheme.inversePrimary,\n      shape: const CircleBorder(),\n      child: Container(\n        padding: const EdgeInsets.all(4),\n        child: const Icon(Icons.check, size: 16),\n      ),\n    );\n  }\n}\n\nclass SettingsBlock extends StatelessWidget {\n  final String title;\n  final List<Widget> settings;\n\n  const SettingsBlock({super.key, required this.title, required this.settings});\n\n  @override\n  Widget build(BuildContext context) {\n    return Padding(\n      padding: EdgeInsets.all(8),\n      child: Column(\n        children: [\n          InfoHeader(info: Info(label: title)),\n          Card(\n            color: context.colorScheme.surfaceContainer,\n            child: Column(children: settings),\n          ),\n        ],\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/chip.dart",
    "content": "import 'package:fl_clash/enum/enum.dart';\nimport 'package:flutter/material.dart';\n\nclass CommonChip extends StatelessWidget {\n  final String label;\n  final VoidCallback? onPressed;\n  final ChipType type;\n  final Widget? avatar;\n  final TextStyle? labelStyle;\n\n  const CommonChip({\n    super.key,\n    required this.label,\n    this.labelStyle,\n    this.onPressed,\n    this.avatar,\n    this.type = ChipType.action,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    if (type == ChipType.delete) {\n      return Chip(\n        avatar: avatar,\n        labelPadding: const EdgeInsets.symmetric(\n          vertical: 0,\n          horizontal: 4,\n        ),\n        clipBehavior: Clip.antiAlias,\n        materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,\n        onDeleted: onPressed ?? () {},\n        labelStyle: labelStyle,\n        label: Text(label),\n      );\n    }\n    return ActionChip(\n      materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,\n      avatar: avatar,\n      clipBehavior: Clip.antiAlias,\n      labelPadding: const EdgeInsets.symmetric(\n        vertical: 0,\n        horizontal: 4,\n      ),\n      onPressed: onPressed ?? () {},\n      labelStyle: labelStyle,\n      label: Text(label),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/color_scheme_box.dart",
    "content": "import 'package:fl_clash/providers/providers.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nimport 'card.dart';\nimport 'grid.dart';\n\nclass ColorSchemeBox extends StatelessWidget {\n  final Color? primaryColor;\n  final bool? isSelected;\n  final void Function()? onPressed;\n\n  const ColorSchemeBox({\n    super.key,\n    required this.primaryColor,\n    this.onPressed,\n    this.isSelected,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return AspectRatio(\n      aspectRatio: 1,\n      child: PrimaryColorBox(\n        primaryColor: primaryColor,\n        child: Builder(\n          builder: (context) {\n            final colorScheme = Theme.of(context).colorScheme;\n            return Stack(\n              children: [\n                CommonCard(\n                  isSelected: isSelected,\n                  onPressed: onPressed,\n                  selectWidget: Container(\n                    alignment: Alignment.center,\n                    child: const SelectIcon(),\n                  ),\n                  child: Container(\n                    padding: const EdgeInsets.all(8),\n                    child: ClipRSuperellipse(\n                      borderRadius: BorderRadius.circular(36),\n                      child: SizedBox(\n                        width: 72,\n                        height: 72,\n                        child: Grid(\n                          crossAxisCount: 2,\n                          children: [\n                            GridItem(\n                              mainAxisCellCount: 2,\n                              child: Container(color: colorScheme.primary),\n                            ),\n                            GridItem(\n                              mainAxisCellCount: 1,\n                              child: Container(color: colorScheme.secondary),\n                            ),\n                            GridItem(\n                              mainAxisCellCount: 1,\n                              child: Container(color: colorScheme.tertiary),\n                            ),\n                          ],\n                        ),\n                      ),\n                    ),\n                  ),\n                ),\n                if (primaryColor == null)\n                  const Positioned(\n                    bottom: 4,\n                    right: 4,\n                    child: Icon(Icons.colorize, size: 20),\n                  ),\n              ],\n            );\n          },\n        ),\n      ),\n    );\n  }\n}\n\nclass PrimaryColorBox extends ConsumerWidget {\n  final Color? primaryColor;\n  final Widget child;\n  final Brightness? brightness;\n  final bool ignoreConfig;\n\n  const PrimaryColorBox({\n    super.key,\n    required this.primaryColor,\n    required this.child,\n    this.brightness,\n    this.ignoreConfig = true,\n  });\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final themeData = Theme.of(context);\n    final colorScheme = ref.watch(\n      genColorSchemeProvider(\n        brightness ?? themeData.brightness,\n        color: primaryColor,\n        ignoreConfig: ignoreConfig,\n      ),\n    );\n    return Theme(\n      data: themeData.copyWith(colorScheme: colorScheme),\n      child: child,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/container.dart",
    "content": "import 'dart:math' as math;\n\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nclass CommonSafeArea extends StatelessWidget {\n  const CommonSafeArea({\n    super.key,\n    this.left = true,\n    this.top = true,\n    this.right = true,\n    this.bottom = true,\n    this.minimum = EdgeInsets.zero,\n    this.maintainBottomViewPadding = false,\n    required this.child,\n  });\n\n  final bool left;\n\n  final bool top;\n\n  final bool right;\n\n  final bool bottom;\n\n  final EdgeInsets minimum;\n\n  final bool maintainBottomViewPadding;\n\n  final Widget child;\n\n  @override\n  Widget build(BuildContext context) {\n    assert(debugCheckHasMediaQuery(context));\n    EdgeInsets padding = MediaQuery.paddingOf(context);\n    final height = MediaQuery.of(context).size.height;\n    if (maintainBottomViewPadding) {\n      padding = padding.copyWith(\n        bottom: MediaQuery.viewPaddingOf(context).bottom,\n      );\n    }\n    final double realPaddingTop = padding.top > height * 0.5 ? 0 : padding.top;\n    return Padding(\n      padding: EdgeInsets.only(\n        left: math.max(left ? padding.left : 0.0, minimum.left),\n        top: math.max(top ? realPaddingTop : 0.0, minimum.top),\n        right: math.max(right ? padding.right : 0.0, minimum.right),\n        bottom: math.max(bottom ? padding.bottom : 0.0, minimum.bottom),\n      ),\n      child: MediaQuery.removePadding(\n        context: context,\n        removeLeft: left,\n        removeTop: top,\n        removeRight: right,\n        removeBottom: bottom,\n        child: child,\n      ),\n    );\n  }\n\n  @override\n  void debugFillProperties(DiagnosticPropertiesBuilder properties) {\n    super.debugFillProperties(properties);\n    properties\n        .add(FlagProperty('left', value: left, ifTrue: 'avoid left padding'));\n    properties\n        .add(FlagProperty('top', value: top, ifTrue: 'avoid top padding'));\n    properties.add(\n        FlagProperty('right', value: right, ifTrue: 'avoid right padding'));\n    properties.add(\n        FlagProperty('bottom', value: bottom, ifTrue: 'avoid bottom padding'));\n  }\n}\n"
  },
  {
    "path": "lib/widgets/dialog.dart",
    "content": "import 'dart:math';\n\nimport 'package:fl_clash/providers/app.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass CommonDialog extends ConsumerWidget {\n  final String title;\n  final Widget? child;\n  final List<Widget>? actions;\n  final EdgeInsets? padding;\n  final bool overrideScroll;\n  final Color? backgroundColor;\n\n  const CommonDialog({\n    super.key,\n    required this.title,\n    this.actions,\n    this.child,\n    this.padding,\n    this.overrideScroll = false,\n    this.backgroundColor,\n  });\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final size = ref.watch(viewSizeProvider);\n    return AlertDialog(\n      title: Text(title),\n      actions: actions,\n      contentPadding: padding,\n      backgroundColor: backgroundColor,\n      content: Container(\n        constraints: BoxConstraints(\n          maxHeight: min(\n            size.height - 40,\n            500,\n          ),\n          maxWidth: 300,\n        ),\n        width: size.width - 40,\n        child: !overrideScroll\n            ? SingleChildScrollView(\n                child: child,\n              )\n            : child,\n      ),\n    );\n  }\n}\n\nclass CommonModal extends ConsumerWidget {\n  final Widget? child;\n\n  const CommonModal({\n    super.key,\n    this.child,\n  });\n\n  @override\n  Widget build(BuildContext context, ref) {\n    final size = ref.watch(viewSizeProvider);\n    return Center(\n      child: Container(\n        width: size.width * 0.85,\n        height: size.height * 0.85,\n        decoration: BoxDecoration(\n          borderRadius: BorderRadius.circular(12),\n        ),\n        clipBehavior: Clip.antiAlias,\n        child: child,\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/disabled_mask.dart",
    "content": "import 'package:flutter/material.dart';\n\nclass DisabledMask extends StatefulWidget {\n  final Widget child;\n  final bool status;\n\n  const DisabledMask({\n    super.key,\n    required this.child,\n    this.status = true,\n  });\n\n  @override\n  State<DisabledMask> createState() => _DisabledMaskState();\n}\n\nclass _DisabledMaskState extends State<DisabledMask> {\n  GlobalKey childKey = GlobalKey();\n\n  @override\n  Widget build(BuildContext context) {\n    final child = Container(\n      key: childKey,\n      child: widget.child,\n    );\n    if (!widget.status) {\n      return child;\n    }\n    return ColorFiltered(\n      colorFilter: const ColorFilter.matrix(<double>[\n        0.2126,\n        0.7152,\n        0.0722,\n        0,\n        30,\n        0.2126,\n        0.7152,\n        0.0722,\n        0,\n        30,\n        0.2126,\n        0.7152,\n        0.0722,\n        0,\n        30,\n        0,\n        0,\n        0,\n        1,\n        0,\n      ]),\n      child: child,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/donut_chart.dart",
    "content": "import 'dart:math';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass DonutChartData {\n  final double _value;\n  final Color color;\n\n  const DonutChartData({\n    required double value,\n    required this.color,\n  }) : _value = value + 1;\n\n  double get value => _value;\n\n  @override\n  String toString() {\n    return 'DonutChartData{_value: $_value}';\n  }\n\n  @override\n  bool operator ==(Object other) =>\n      identical(this, other) ||\n      other is DonutChartData &&\n          runtimeType == other.runtimeType &&\n          _value == other._value &&\n          color == other.color;\n\n  @override\n  int get hashCode => _value.hashCode ^ color.hashCode;\n}\n\nclass DonutChart extends StatefulWidget {\n  final List<DonutChartData> data;\n  final Duration duration;\n\n  const DonutChart({\n    super.key,\n    required this.data,\n    this.duration = commonDuration,\n  });\n\n  @override\n  State<DonutChart> createState() => _DonutChartState();\n}\n\nclass _DonutChartState extends State<DonutChart>\n    with SingleTickerProviderStateMixin {\n  late AnimationController _animationController;\n  late List<DonutChartData> _oldData;\n\n  @override\n  void initState() {\n    super.initState();\n    _oldData = widget.data;\n    _animationController = AnimationController(\n      vsync: this,\n      duration: widget.duration,\n    );\n  }\n\n  @override\n  void didUpdateWidget(DonutChart oldWidget) {\n    super.didUpdateWidget(oldWidget);\n    if (oldWidget.data != widget.data) {\n      _oldData = oldWidget.data;\n      _animationController.forward(from: 0);\n    }\n  }\n\n  @override\n  void dispose() {\n    _animationController.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return AnimatedBuilder(\n      animation: _animationController,\n      builder: (context, child) {\n        return CustomPaint(\n          painter: DonutChartPainter(\n            _oldData,\n            widget.data,\n            _animationController.value,\n          ),\n        );\n      },\n    );\n  }\n}\n\nclass DonutChartPainter extends CustomPainter {\n  final List<DonutChartData> oldData;\n  final List<DonutChartData> newData;\n  final double progress;\n\n  late final Paint _arcPaint;\n\n  List<DonutChartData>? _cachedInterpolatedData;\n  double? _cachedProgress;\n\n  DonutChartPainter(this.oldData, this.newData, this.progress) {\n    _arcPaint = Paint()\n      ..style = PaintingStyle.stroke\n      ..strokeCap = StrokeCap.round;\n  }\n\n  static const _logBase = 10.0;\n  static const _minValue = 0.1;\n  static final _logBaseInv = 1.0 / log(_logBase);\n\n  double _logTransform(double value) {\n    if (value < _minValue) return 0;\n    return log(value) * _logBaseInv + 1;\n  }\n\n  double _expTransform(double value) {\n    if (value <= 0) return 0;\n    return pow(_logBase, value - 1).toDouble();\n  }\n\n  List<DonutChartData> get _interpolatedData {\n    if (_cachedInterpolatedData != null && _cachedProgress == progress) {\n      return _cachedInterpolatedData!;\n    }\n\n    if (newData.isEmpty) {\n      _cachedInterpolatedData = newData;\n      _cachedProgress = progress;\n      return newData;\n    }\n\n    if (oldData.length != newData.length) {\n      _cachedInterpolatedData = newData;\n      _cachedProgress = progress;\n      return newData;\n    }\n\n    final result = <DonutChartData>[];\n    for (var i = 0; i < newData.length; i++) {\n      final oldValue = oldData[i].value;\n      final newValue = newData[i].value;\n      final logOldValue = _logTransform(oldValue);\n      final logNewValue = _logTransform(newValue);\n      final interpolatedLogValue =\n          logOldValue + (logNewValue - logOldValue) * progress;\n\n      final interpolatedValue = _expTransform(interpolatedLogValue);\n\n      result.add(DonutChartData(\n        value: interpolatedValue,\n        color: newData[i].color,\n      ));\n    }\n\n    _cachedInterpolatedData = result;\n    _cachedProgress = progress;\n    return result;\n  }\n\n  @override\n  void paint(Canvas canvas, Size size) {\n    final data = _interpolatedData;\n    if (data.isEmpty) return;\n\n    double total = 0;\n    for (final item in data) {\n      total += item.value;\n    }\n\n    if (total <= 0) return;\n\n    final center = Offset(size.width / 2, size.height / 2);\n    final strokeWidth = 10.0.ap;\n    final radius = min(size.width / 2, size.height / 2) - strokeWidth / 2;\n\n    final gapAngle = 2 * asin(strokeWidth * 1 / (2 * radius)) * 1.2;\n    final availableAngle = 2 * pi - (data.length * gapAngle);\n    final totalInv = 1.0 / total;\n\n    double startAngle = -pi / 2 + gapAngle / 2;\n\n    _arcPaint.strokeWidth = strokeWidth;\n\n    for (final item in data) {\n      final sweepAngle = availableAngle * (item.value * totalInv);\n\n      if (sweepAngle <= 0) continue;\n\n      _arcPaint.color = item.color;\n\n      canvas.drawArc(\n        Rect.fromCircle(center: center, radius: radius),\n        startAngle,\n        sweepAngle,\n        false,\n        _arcPaint,\n      );\n\n      startAngle += sweepAngle + gapAngle;\n    }\n  }\n\n  @override\n  bool shouldRepaint(DonutChartPainter oldDelegate) {\n    return oldDelegate.progress != progress ||\n        oldDelegate.oldData != oldData ||\n        oldDelegate.newData != newData;\n  }\n}\n"
  },
  {
    "path": "lib/widgets/effect.dart",
    "content": "import 'dart:math';\nimport 'dart:ui';\n\nimport 'package:flutter/material.dart';\n\nclass EffectGestureDetector extends StatefulWidget {\n  final Widget child;\n  final GestureLongPressCallback? onLongPress;\n  final GestureTapCallback? onTap;\n\n  const EffectGestureDetector({\n    super.key,\n    required this.child,\n    this.onLongPress,\n    this.onTap,\n  });\n\n  @override\n  State<EffectGestureDetector> createState() => _EffectGestureDetectorState();\n}\n\nclass _EffectGestureDetectorState extends State<EffectGestureDetector>\n    with SingleTickerProviderStateMixin {\n  late AnimationController _controller;\n  double _scale = 1;\n\n  @override\n  void initState() {\n    super.initState();\n    _controller = AnimationController(vsync: this);\n  }\n\n  @override\n  void dispose() {\n    _controller.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return AnimatedScale(\n      scale: _scale,\n      duration: kThemeAnimationDuration,\n      curve: Curves.easeOut,\n      child: GestureDetector(\n        onLongPress: widget.onLongPress,\n        onLongPressStart: (_) {\n          setState(() {\n            _scale = 0.95;\n          });\n        },\n        onTap: widget.onTap,\n        onLongPressEnd: (_) {\n          setState(() {\n            _scale = 1;\n          });\n        },\n        child: widget.child,\n      ),\n    );\n  }\n}\n\nclass CommonExpandIcon extends StatefulWidget {\n  final bool expand;\n\n  const CommonExpandIcon({super.key, this.expand = false});\n\n  @override\n  State<CommonExpandIcon> createState() => _CommonExpandIconState();\n}\n\nclass _CommonExpandIconState extends State<CommonExpandIcon>\n    with SingleTickerProviderStateMixin {\n  late AnimationController _animationController;\n  late Animation<double> _iconTurns;\n\n  static final Animatable<double> _iconTurnTween = Tween<double>(\n    begin: 0.0,\n    end: 0.5,\n  ).chain(CurveTween(curve: Curves.fastOutSlowIn));\n\n  @override\n  void initState() {\n    super.initState();\n    _animationController = AnimationController(\n      duration: const Duration(milliseconds: 200),\n      vsync: this,\n    );\n    _iconTurns = _animationController.drive(_iconTurnTween);\n    if (widget.expand) {\n      _animationController.value = pi;\n    }\n  }\n\n  @override\n  void didUpdateWidget(covariant CommonExpandIcon oldWidget) {\n    super.didUpdateWidget(oldWidget);\n    if (oldWidget.expand != widget.expand) {\n      if (widget.expand) {\n        _animationController.forward();\n      } else {\n        _animationController.reverse();\n      }\n    }\n  }\n\n  @override\n  void dispose() {\n    _animationController.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return AnimatedBuilder(\n      animation: _animationController.view,\n      builder: (_, child) {\n        return RotationTransition(turns: _iconTurns, child: child!);\n      },\n      child: const Icon(Icons.expand_more),\n    );\n  }\n}\n\nWidget commonProxyDecorator(\n  Widget child,\n  int index,\n  Animation<double> animation,\n) {\n  return AnimatedBuilder(\n    animation: animation,\n    builder: (_, Widget? child) {\n      final double animValue = Curves.easeInOut.transform(animation.value);\n      final double scale = lerpDouble(1, 1.02, animValue)!;\n      return Transform.scale(scale: scale, child: child);\n    },\n    child: child,\n  );\n}\n"
  },
  {
    "path": "lib/widgets/fade_box.dart",
    "content": "import 'package:animations/animations.dart';\nimport 'package:fl_clash/common/common.dart';\nimport 'package:flutter/material.dart';\n\nclass FadeBox extends StatelessWidget {\n  final Widget child;\n  final AlignmentGeometry? alignment;\n\n  const FadeBox({super.key, required this.child, this.alignment});\n\n  @override\n  Widget build(BuildContext context) {\n    final realAlignment = alignment ?? Alignment.center;\n    return AnimatedSwitcher(\n      switchInCurve: Curves.easeOut,\n      switchOutCurve: Curves.easeIn,\n      layoutBuilder: (currentChild, previousChildren) => Align(\n        alignment: realAlignment,\n        child: Stack(\n          alignment: realAlignment,\n          children: <Widget>[\n            ...previousChildren,\n            if (currentChild != null) currentChild,\n          ],\n        ),\n      ),\n      transitionBuilder: (child, animation) {\n        return FadeTransition(opacity: animation, child: child);\n      },\n      duration: commonDuration,\n      child: child,\n    );\n  }\n}\n\nclass FadeThroughBox extends StatelessWidget {\n  final Widget child;\n  final AlignmentGeometry? alignment;\n  final EdgeInsets? margin;\n\n  const FadeThroughBox({\n    super.key,\n    required this.child,\n    this.alignment,\n    this.margin,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    final realAlignment = alignment ?? Alignment.centerLeft;\n    return PageTransitionSwitcher(\n      transitionBuilder: (child, animation, secondaryAnimation) {\n        return FadeThroughTransition(\n          animation: animation,\n          fillColor: Colors.transparent,\n          secondaryAnimation: secondaryAnimation,\n          child: child,\n        );\n      },\n      layoutBuilder: (entries) => Container(\n        alignment: realAlignment,\n        margin: margin,\n        child: Stack(alignment: realAlignment, children: entries),\n      ),\n      child: child,\n    );\n  }\n}\n\nclass FadeRotationScaleBox extends StatelessWidget {\n  final Widget child;\n  final AlignmentGeometry? alignment;\n\n  const FadeRotationScaleBox({super.key, required this.child, this.alignment});\n\n  @override\n  Widget build(BuildContext context) {\n    final realAlignment = alignment ?? Alignment.center;\n    return AnimatedSwitcher(\n      duration: commonDuration,\n      switchInCurve: Curves.easeOutBack,\n      switchOutCurve: Curves.easeInBack,\n      transitionBuilder: (child, animation) {\n        return RotationTransition(\n          turns: animation.drive(Tween(begin: 0.8, end: 1.0)),\n          child: FadeTransition(\n            opacity: animation.drive(Tween(begin: 0.6, end: 1.0)),\n            child: ScaleTransition(scale: animation, child: child),\n          ),\n        );\n      },\n      layoutBuilder: (currentChild, previousChildren) => Stack(\n        alignment: realAlignment,\n        children: <Widget>[\n          ...previousChildren,\n          if (currentChild != null) currentChild,\n        ],\n      ),\n      child: child,\n    );\n  }\n}\n\nclass FadeScaleBox extends StatelessWidget {\n  final Widget child;\n  final AlignmentGeometry? alignment;\n\n  const FadeScaleBox({super.key, required this.child, this.alignment});\n\n  @override\n  Widget build(BuildContext context) {\n    final realAlignment = alignment ?? Alignment.center;\n    return AnimatedSwitcher(\n      duration: commonDuration,\n      switchOutCurve: Curves.easeOutBack,\n      switchInCurve: Curves.easeInBack,\n      transitionBuilder: (child, animation) {\n        return FadeTransition(\n          opacity: animation,\n          child: ScaleTransition(\n            scale: animation.drive(Tween(begin: 0.4, end: 1.0)),\n            child: child,\n          ),\n        );\n      },\n      layoutBuilder: (currentChild, previousChildren) => Align(\n        alignment: realAlignment,\n        child: Stack(\n          alignment: realAlignment,\n          children: <Widget>[\n            ...previousChildren,\n            if (currentChild != null) currentChild,\n          ],\n        ),\n      ),\n      child: child,\n    );\n  }\n}\n\nclass FadeScaleEnterBox extends StatefulWidget {\n  final Widget child;\n\n  const FadeScaleEnterBox({super.key, required this.child});\n\n  @override\n  State<FadeScaleEnterBox> createState() => _FadeScaleEnterBoxState();\n}\n\nclass _FadeScaleEnterBoxState extends State<FadeScaleEnterBox>\n    with SingleTickerProviderStateMixin {\n  late AnimationController _controller;\n  late Animation<double> _animation;\n\n  @override\n  void initState() {\n    super.initState();\n    _controller = AnimationController(vsync: this, duration: commonDuration);\n    _animation = Tween<double>(\n      begin: 0,\n      end: 1,\n    ).animate(CurvedAnimation(parent: _controller, curve: Curves.easeInOut));\n    _controller.forward();\n  }\n\n  @override\n  void dispose() {\n    _controller.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return AnimatedBuilder(\n      animation: _controller.view,\n      builder: (_, child) {\n        return FadeScaleEnterTransition(animation: _animation, child: child!);\n      },\n      child: widget.child,\n    );\n  }\n}\n\nclass FadeScaleEnterTransition extends StatelessWidget {\n  const FadeScaleEnterTransition({\n    super.key,\n    required this.animation,\n    this.child,\n  });\n\n  final Animation<double> animation;\n  final Widget? child;\n\n  static final Animatable<double> _fadeInTransition = CurveTween(\n    curve: const Interval(0.0, 0.3),\n  );\n  static final Animatable<double> _scaleInTransition = Tween<double>(\n    begin: 0.70,\n    end: 1.00,\n  ).chain(CurveTween(curve: Easing.legacyDecelerate));\n\n  @override\n  Widget build(BuildContext context) {\n    return FadeTransition(\n      opacity: _fadeInTransition.animate(animation),\n      child: ScaleTransition(\n        scale: _scaleInTransition.animate(animation),\n        child: child,\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/float_layout.dart",
    "content": "import 'package:flutter/material.dart';\n\nclass FloatLayout extends StatelessWidget {\n  final Widget floatingWidget;\n\n  final Widget child;\n\n  const FloatLayout({\n    super.key,\n    required this.floatingWidget,\n    required this.child,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return Stack(\n      fit: StackFit.loose,\n      children: [\n        Center(\n          child: child,\n        ),\n        Positioned(\n          bottom: 0,\n          right: 0,\n          child: Container(\n            child: floatingWidget,\n          ),\n        ),\n      ],\n    );\n  }\n}\n\nclass FloatWrapper extends StatelessWidget {\n  final Widget child;\n\n  const FloatWrapper({\n    super.key,\n    required this.child,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return Container(\n      margin: const EdgeInsets.all(kFloatingActionButtonMargin),\n      child: child,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/grid.dart",
    "content": "import 'dart:math' as math;\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/rendering.dart';\n\ntypedef WrapBuilder = Widget Function(Widget child);\n\nclass Grid extends MultiChildRenderObjectWidget {\n  final double mainAxisSpacing;\n\n  final double crossAxisSpacing;\n\n  final double? mainAxisExtent;\n\n  final int crossAxisCount;\n\n  final AxisDirection axisDirection;\n\n  final TextDirection textDirection;\n\n  const Grid({\n    super.key,\n    this.mainAxisSpacing = 0,\n    this.crossAxisSpacing = 0,\n    int? crossAxisCount,\n    AxisDirection? axisDirection,\n    TextDirection? textDirection,\n    this.mainAxisExtent,\n    List<Widget>? children,\n  }) : crossAxisCount = crossAxisCount ?? 1,\n       axisDirection = axisDirection ?? AxisDirection.down,\n       textDirection = textDirection ?? TextDirection.ltr,\n       super(children: children ?? const []);\n\n  const Grid.baseGap({\n    Key? key,\n    double mainAxisSpacing = 8.0,\n    double crossAxisSpacing = 8.0,\n    int? crossAxisCount,\n    AxisDirection? axisDirection,\n    TextDirection? textDirection,\n    double? mainAxisExtent,\n    List<Widget>? children,\n  }) : this(\n         key: key,\n         mainAxisSpacing: mainAxisSpacing,\n         crossAxisSpacing: crossAxisSpacing,\n         crossAxisCount: crossAxisCount,\n         axisDirection: axisDirection,\n         textDirection: textDirection,\n         mainAxisExtent: mainAxisExtent,\n         children: children,\n       );\n\n  @override\n  RenderObject createRenderObject(BuildContext context) {\n    return RenderGrid(\n      textDirection: textDirection,\n      crossAxisCount: crossAxisCount,\n      mainAxisSpacing: mainAxisSpacing,\n      crossAxisSpacing: crossAxisSpacing,\n      axisDirection: axisDirection,\n      mainAxisExtent: mainAxisExtent,\n    );\n  }\n\n  @override\n  void updateRenderObject(BuildContext context, RenderGrid renderObject) {\n    renderObject\n      ..mainAxisSpacing = mainAxisSpacing\n      ..mainAxisExtent = mainAxisExtent\n      ..crossAxisSpacing = crossAxisSpacing\n      ..textDirection = textDirection\n      ..axisDirection = axisDirection\n      ..crossAxisCount = crossAxisCount;\n  }\n}\n\nclass RenderGrid extends RenderBox\n    with\n        ContainerRenderObjectMixin<RenderBox, GridParentData>,\n        RenderBoxContainerDefaultsMixin<RenderBox, GridParentData> {\n  RenderGrid({\n    required double mainAxisSpacing,\n    required double crossAxisSpacing,\n    required int crossAxisCount,\n    required AxisDirection axisDirection,\n    required TextDirection textDirection,\n    double? mainAxisExtent,\n  }) : _crossAxisCount = crossAxisCount,\n       _crossAxisSpacing = crossAxisSpacing,\n       _mainAxisSpacing = mainAxisSpacing,\n       _axisDirection = axisDirection,\n       _textDirection = textDirection,\n       _mainAxisExtent = mainAxisExtent;\n\n  int _crossAxisCount;\n\n  int get crossAxisCount => _crossAxisCount;\n\n  set crossAxisCount(int value) {\n    if (_crossAxisCount != value) {\n      _crossAxisCount = value;\n      markNeedsLayout();\n    }\n  }\n\n  double? _mainAxisExtent;\n\n  double? get mainAxisExtent => _mainAxisExtent;\n\n  set mainAxisExtent(double? value) {\n    if (_mainAxisExtent != value) {\n      _mainAxisExtent = value;\n      markNeedsLayout();\n    }\n  }\n\n  double _mainAxisSpacing;\n\n  double get mainAxisSpacing => _mainAxisSpacing;\n\n  set mainAxisSpacing(double value) {\n    if (_mainAxisSpacing != value) {\n      _mainAxisSpacing = value;\n      markNeedsLayout();\n    }\n  }\n\n  double _crossAxisSpacing;\n\n  double get crossAxisSpacing => _crossAxisSpacing;\n\n  set crossAxisSpacing(double value) {\n    if (_crossAxisSpacing != value) {\n      _crossAxisSpacing = value;\n      markNeedsLayout();\n    }\n  }\n\n  AxisDirection _axisDirection;\n\n  AxisDirection get axisDirection => _axisDirection;\n\n  set axisDirection(AxisDirection value) {\n    if (_axisDirection != value) {\n      _axisDirection = value;\n      markNeedsLayout();\n    }\n  }\n\n  TextDirection _textDirection;\n\n  TextDirection get textDirection => _textDirection;\n\n  set textDirection(TextDirection value) {\n    if (_textDirection != value) {\n      _textDirection = value;\n      markNeedsLayout();\n    }\n  }\n\n  Axis get mainAxis => axisDirectionToAxis(_axisDirection);\n\n  @override\n  void setupParentData(RenderObject child) {\n    if (child.parentData is! GridParentData) {\n      child.parentData = GridParentData();\n    }\n  }\n\n  @override\n  void performLayout() {\n    final requestedSize = _computeSize(constraints: constraints);\n    size = constraints.constrain(requestedSize);\n    _hasOverflow = size != requestedSize;\n  }\n\n  @override\n  bool hitTestChildren(BoxHitTestResult result, {required Offset position}) {\n    return defaultHitTestChildren(result, position: position);\n  }\n\n  @override\n  void paint(PaintingContext context, Offset offset) {\n    if (_hasOverflow) {\n      context.pushClipRect(\n        needsCompositing,\n        offset,\n        Offset.zero & size,\n        defaultPaint,\n      );\n    } else {\n      defaultPaint(context, offset);\n    }\n  }\n\n  GridParentData _getParentData(RenderBox child) {\n    return child.parentData as GridParentData;\n  }\n\n  void _layoutChild(\n    RenderBox child,\n    BoxConstraints constraints, {\n    bool parentUsesSize = false,\n  }) {\n    child.layout(constraints, parentUsesSize: parentUsesSize);\n  }\n\n  int _computeCrossAxisCellCount(\n    GridParentData childParentData,\n    int crossAxisCount,\n  ) {\n    return math.min(childParentData.crossAxisCellCount ?? 1, crossAxisCount);\n  }\n\n  Size _computeSize({required BoxConstraints constraints}) {\n    final crossAxisExtent = mainAxis == Axis.vertical\n        ? constraints.maxWidth\n        : constraints.maxHeight;\n    final stride = (crossAxisExtent + crossAxisSpacing) / crossAxisCount;\n    final offsets = List.filled(crossAxisCount, 0.0);\n    RenderBox? child = firstChild;\n    while (child != null) {\n      final childParentData = _getParentData(child);\n      final crossAxisCellCount = _computeCrossAxisCellCount(\n        childParentData,\n        crossAxisCount,\n      );\n      final crossAxisExtent = stride * crossAxisCellCount - crossAxisSpacing;\n      final shouldFitContent = childParentData.mainAxisCellCount == null;\n\n      double mainAxisExtent = 0;\n\n      if (shouldFitContent) {\n        final childConstraints = mainAxis == Axis.vertical\n            ? BoxConstraints.tightFor(width: crossAxisExtent)\n            : BoxConstraints.tightFor(height: crossAxisExtent);\n        _layoutChild(child, childConstraints, parentUsesSize: true);\n        mainAxisExtent = mainAxis == Axis.vertical\n            ? child.size.height\n            : child.size.width;\n      } else {\n        final mainAxisCellCount = childParentData.mainAxisCellCount ?? 1;\n        mainAxisExtent =\n            (this.mainAxisExtent ?? stride) * mainAxisCellCount -\n            mainAxisSpacing;\n        childParentData.realMainAxisExtent = mainAxisExtent;\n        final childSize = mainAxis == Axis.vertical\n            ? Size(crossAxisExtent, mainAxisExtent)\n            : Size(mainAxisExtent, crossAxisExtent);\n        final childConstraints = BoxConstraints.tight(childSize);\n        _layoutChild(child, childConstraints);\n      }\n      final origin = _getOrigin(offsets, crossAxisCellCount);\n      final mainAxisOffset = origin.mainAxisOffset;\n      final crossAxisOffset = origin.crossAxisIndex * stride;\n      final offset = mainAxis == Axis.vertical\n          ? Offset(crossAxisOffset, mainAxisOffset)\n          : Offset(mainAxisOffset, crossAxisOffset);\n      childParentData.offset = offset;\n      final nextOffset = mainAxisOffset + mainAxisExtent + mainAxisSpacing;\n      for (int i = 0; i < crossAxisCellCount; i++) {\n        offsets[origin.crossAxisIndex + i] = nextOffset;\n      }\n      child = childAfter(child);\n    }\n    final mainAxisExtent = offsets.reduce(math.max) - mainAxisSpacing;\n\n    if (axisDirectionIsReversed(axisDirection)) {\n      child = firstChild;\n      while (child != null) {\n        final childParentData = _getParentData(child);\n        final offset = childParentData.offset;\n        final crossAxisOffset = offset.getCrossAxisOffset(mainAxis);\n        final mainAxisOffset =\n            mainAxisExtent -\n            offset.getMainAxisOffset(mainAxis) -\n            childParentData.realMainAxisExtent!;\n        final newOffset = mainAxis == Axis.vertical\n            ? Offset(crossAxisOffset, mainAxisOffset)\n            : Offset(mainAxisOffset, crossAxisOffset);\n        childParentData.offset = newOffset;\n        child = childAfter(child);\n      }\n    }\n\n    if (mainAxis == Axis.vertical && textDirection == TextDirection.rtl) {\n      child = firstChild;\n      while (child != null) {\n        final childParentData = _getParentData(child);\n        final crossAxisCellCount = crossAxisCount;\n        final crossAxisCellExtent =\n            stride * crossAxisCellCount - crossAxisSpacing;\n        final offset = childParentData.offset;\n        final crossAxisOffset =\n            crossAxisExtent - offset.dx - crossAxisCellExtent;\n        final mainAxisOffset = offset.dy;\n        final newOffset = Offset(crossAxisOffset, mainAxisOffset);\n        childParentData.offset = newOffset;\n        child = childAfter(child);\n      }\n    }\n\n    return mainAxis == Axis.vertical\n        ? Size(crossAxisExtent, mainAxisExtent)\n        : Size(mainAxisExtent, crossAxisExtent);\n  }\n\n  bool _hasOverflow = false;\n}\n\nclass GridParentData extends ContainerBoxParentData<RenderBox> {\n  int? crossAxisCellCount;\n  num? mainAxisCellCount;\n  double? realMainAxisExtent;\n\n  @override\n  String toString() =>\n      'crossAxisCellCount=$crossAxisCellCount; mainAxisCellCount=$mainAxisCellCount;';\n}\n\nclass GridItem extends ParentDataWidget<GridParentData> {\n  final int crossAxisCellCount;\n  final num? mainAxisCellCount;\n\n  const GridItem({\n    super.key,\n    required super.child,\n    this.mainAxisCellCount,\n    this.crossAxisCellCount = 1,\n  });\n\n  @override\n  void applyParentData(RenderObject renderObject) {\n    final parentData = renderObject.parentData;\n    if (parentData is GridParentData) {\n      bool needsLayout = false;\n      if (parentData.crossAxisCellCount != crossAxisCellCount) {\n        parentData.crossAxisCellCount = crossAxisCellCount;\n        needsLayout = true;\n      }\n\n      if (parentData.mainAxisCellCount != mainAxisCellCount) {\n        parentData.mainAxisCellCount = mainAxisCellCount;\n        needsLayout = true;\n      }\n\n      if (needsLayout) {\n        final targetParent = renderObject.parent;\n        if (targetParent is RenderGrid) {\n          targetParent.markNeedsLayout();\n        }\n      }\n    }\n  }\n\n  @override\n  Type get debugTypicalAncestorWidgetClass => GridItem;\n\n  GridItem wrap({required WrapBuilder builder}) {\n    return GridItem(\n      mainAxisCellCount: mainAxisCellCount,\n      crossAxisCellCount: crossAxisCellCount,\n      child: builder(child),\n    );\n  }\n}\n\nclass _Origin {\n  final int crossAxisIndex;\n  final double mainAxisOffset;\n\n  const _Origin(this.crossAxisIndex, this.mainAxisOffset);\n}\n\n_Origin _getOrigin(List<double> offsets, int crossAxisCount) {\n  final length = offsets.length;\n  _Origin origin = const _Origin(0, double.infinity);\n  for (int i = 0; i < length; i++) {\n    final offset = offsets[i];\n    if (offset.moreOrEqual(origin.mainAxisOffset)) {\n      continue;\n    }\n    int start = 0;\n    int span = 0;\n    for (\n      int j = 0;\n      span < crossAxisCount &&\n          j < length &&\n          length - j >= crossAxisCount - span;\n      j++\n    ) {\n      if (offset.moreOrEqual(offsets[j])) {\n        span++;\n        if (span == crossAxisCount) {\n          origin = _Origin(start, offset);\n        }\n      } else {\n        start = j + 1;\n        span = 0;\n      }\n    }\n  }\n  return origin;\n}\n"
  },
  {
    "path": "lib/widgets/icon.dart",
    "content": "import 'dart:io';\n\nimport 'package:fl_clash/common/common.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_cache_manager/flutter_cache_manager.dart';\nimport 'package:flutter_svg/svg.dart';\n\nclass CommonTargetIcon extends StatelessWidget {\n  final String src;\n  final double size;\n\n  const CommonTargetIcon({super.key, required this.src, required this.size});\n\n  Widget _defaultIcon() {\n    return Icon(IconsExt.target, size: size);\n  }\n\n  Widget _buildIcon() {\n    if (src.isEmpty) {\n      return _defaultIcon();\n    }\n\n    final base64 = src.getBase64;\n    if (base64 != null) {\n      return Image.memory(\n        base64,\n        gaplessPlayback: true,\n        errorBuilder: (_, error, _) {\n          return _defaultIcon();\n        },\n      );\n    }\n\n    return ImageCacheWidget(src: src, defaultWidget: _defaultIcon());\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return SizedBox(width: size, height: size, child: _buildIcon());\n  }\n}\n\nfinal _cacheMange = DefaultCacheManager();\n\nclass ImageCacheWidget extends StatefulWidget {\n  final String src;\n  final Widget defaultWidget;\n\n  const ImageCacheWidget({\n    super.key,\n    required this.src,\n    required this.defaultWidget,\n  });\n\n  @override\n  State<ImageCacheWidget> createState() => _ImageCacheWidgetState();\n}\n\nclass _ImageCacheWidgetState extends State<ImageCacheWidget> {\n  final ValueNotifier<File?> _imageNotifier = ValueNotifier(null);\n\n  @override\n  void initState() {\n    super.initState();\n    _getImageFormCache();\n  }\n\n  void _getImageFormCache() async {\n    final src = widget.src;\n    final cacheFile = await _cacheMange.getFileFromCache(src);\n    if (!mounted) {\n      return;\n    }\n    if (cacheFile != null) {\n      _imageNotifier.value = cacheFile.file;\n      if (cacheFile.validTill.isAfter(DateTime.now())) {\n        return;\n      }\n    }\n    if (!mounted) {\n      return;\n    }\n    _imageNotifier.value = (await _cacheMange.downloadFile(src, key: src)).file;\n  }\n\n  @override\n  void dispose() {\n    _imageNotifier.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return ValueListenableBuilder<File?>(\n      valueListenable: _imageNotifier,\n      builder: (_, data, _) {\n        if (data == null) {\n          return widget.defaultWidget;\n        }\n        return widget.src.isSvg\n            ? SvgPicture.file(\n                data,\n                errorBuilder: (_, _, _) => widget.defaultWidget,\n              )\n            : Image.file(data, errorBuilder: (_, _, _) => widget.defaultWidget);\n      },\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/inherited.dart",
    "content": "import 'package:flutter/material.dart';\n\nclass CommonScaffoldBackActionProvider extends InheritedWidget {\n  final VoidCallback? backAction;\n\n  const CommonScaffoldBackActionProvider({\n    super.key,\n    required this.backAction,\n    required super.child,\n  });\n\n  static CommonScaffoldBackActionProvider? of(BuildContext context) {\n    return context\n        .dependOnInheritedWidgetOfExactType<CommonScaffoldBackActionProvider>();\n  }\n\n  @override\n  bool updateShouldNotify(CommonScaffoldBackActionProvider oldWidget) =>\n      backAction != oldWidget.backAction;\n}\n\nclass CommonScaffoldFabExtendedProvider extends InheritedWidget {\n  final bool isExtended;\n\n  const CommonScaffoldFabExtendedProvider({\n    super.key,\n    required this.isExtended,\n    required super.child,\n  });\n\n  static CommonScaffoldFabExtendedProvider? of(BuildContext context) {\n    return context\n        .dependOnInheritedWidgetOfExactType<\n          CommonScaffoldFabExtendedProvider\n        >();\n  }\n\n  @override\n  bool updateShouldNotify(CommonScaffoldFabExtendedProvider oldWidget) =>\n      isExtended != oldWidget.isExtended;\n}\n"
  },
  {
    "path": "lib/widgets/input.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/models/common.dart';\nimport 'package:fl_clash/providers/providers.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:fl_clash/widgets/dialog.dart';\nimport 'package:fl_clash/widgets/null_status.dart';\nimport 'package:fl_clash/widgets/pop_scope.dart';\nimport 'package:fl_clash/widgets/scaffold.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nimport 'effect.dart';\nimport 'list.dart';\nimport 'theme.dart';\n\nclass OptionsDialog<T> extends StatelessWidget {\n  final String title;\n  final List<T> options;\n  final T value;\n  final String Function(T value) textBuilder;\n\n  const OptionsDialog({\n    super.key,\n    required this.title,\n    required this.options,\n    required this.textBuilder,\n    required this.value,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonDialog(\n      title: title,\n      padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 16),\n      child: RadioGroup(\n        onChanged: (value) {\n          Navigator.of(context).pop(value);\n        },\n        groupValue: value,\n        child: Wrap(\n          children: [\n            for (final option in options)\n              Builder(\n                builder: (context) {\n                  if (value == option) {\n                    WidgetsBinding.instance.addPostFrameCallback((_) {\n                      Scrollable.ensureVisible(context);\n                    });\n                  }\n                  return ListItem.radio(\n                    delegate: RadioDelegate(\n                      value: option,\n                      onTab: () {\n                        Navigator.of(context).pop(option);\n                      },\n                    ),\n                    title: Text(textBuilder(option)),\n                  );\n                },\n              ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n\nclass CommonCheckBox extends StatelessWidget {\n  final bool? value;\n  final ValueChanged<bool?>? onChanged;\n  final bool isCircle;\n\n  const CommonCheckBox({\n    required this.value,\n    required this.onChanged,\n    this.isCircle = false,\n    super.key,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return Checkbox(\n      shape: isCircle ? const CircleBorder() : null,\n      value: value,\n      onChanged: onChanged,\n    );\n  }\n}\n\nclass InputDialog extends StatefulWidget {\n  final String title;\n  final String value;\n  final String? suffixText;\n  final String? labelText;\n  final String? resetValue;\n  final String? hintText;\n  final FormFieldValidator<String>? validator;\n  final AutovalidateMode? autovalidateMode;\n  final bool? obscureText;\n\n  const InputDialog({\n    super.key,\n    required this.title,\n    required this.value,\n    this.suffixText,\n    this.resetValue,\n    this.hintText,\n    this.validator,\n    this.obscureText,\n    this.labelText,\n    this.autovalidateMode = AutovalidateMode.onUserInteraction,\n  });\n\n  @override\n  State<InputDialog> createState() => _InputDialogState();\n}\n\nclass _InputDialogState extends State<InputDialog> {\n  final _formKey = GlobalKey<FormState>();\n\n  late TextEditingController _textController;\n\n  String get value => widget.value;\n\n  String get title => widget.title;\n\n  String? get suffixText => widget.suffixText;\n\n  @override\n  void initState() {\n    super.initState();\n    _textController = TextEditingController(text: value);\n  }\n\n  Future<void> _handleUpdate() async {\n    if (_formKey.currentState?.validate() == false) return;\n    final text = _textController.value.text;\n    Navigator.of(context).pop<String>(text);\n  }\n\n  Future<void> _handleReset() async {\n    if (widget.resetValue == null) {\n      return;\n    }\n    Navigator.of(context).pop<String>(widget.resetValue);\n  }\n\n  @override\n  void dispose() {\n    _textController.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonDialog(\n      title: title,\n      actions: [\n        if (widget.resetValue != null &&\n            _textController.value.text != widget.resetValue) ...[\n          TextButton(\n            onPressed: _handleReset,\n            child: Text(appLocalizations.reset),\n          ),\n          const SizedBox(width: 4),\n        ],\n        TextButton(\n          onPressed: _handleUpdate,\n          child: Text(appLocalizations.submit),\n        ),\n      ],\n      child: Form(\n        autovalidateMode: widget.autovalidateMode,\n        key: _formKey,\n        child: Wrap(\n          runSpacing: 16,\n          children: [\n            TextFormField(\n              obscureText: widget.obscureText ?? false,\n              keyboardType: TextInputType.url,\n              maxLines: widget.obscureText == true ? 1 : 5,\n              minLines: 1,\n              controller: _textController,\n              onFieldSubmitted: (_) {\n                _handleUpdate();\n              },\n              decoration: InputDecoration(\n                border: const OutlineInputBorder(),\n                suffixText: suffixText,\n                hintText: widget.hintText,\n                labelText: widget.labelText,\n              ),\n              validator: widget.validator,\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n\nclass ListInputPage extends ConsumerStatefulWidget {\n  final String title;\n  final List<String> items;\n  final Widget Function(String item) titleBuilder;\n  final Widget Function(String item)? subtitleBuilder;\n  final Widget Function(String item)? leadingBuilder;\n  final String? valueLabel;\n\n  const ListInputPage({\n    super.key,\n    required this.title,\n    required this.items,\n    required this.titleBuilder,\n    this.leadingBuilder,\n    this.valueLabel,\n    this.subtitleBuilder,\n  });\n\n  @override\n  ConsumerState createState() => _ListInputPageState();\n}\n\nclass _ListInputPageState extends ConsumerState<ListInputPage> {\n  List<String> _items = [];\n  late List<String> _originItems;\n  final _key = utils.id;\n\n  @override\n  void initState() {\n    super.initState();\n    _items = widget.items;\n    _originItems = List<String>.from(_items);\n  }\n\n  void _handleReorder(int oldIndex, newIndex) {\n    if (oldIndex < newIndex) {\n      newIndex -= 1;\n    }\n    final nextItems = List<String>.from(_items);\n    final item = nextItems.removeAt(oldIndex);\n    nextItems.insert(newIndex, item);\n    _items = nextItems;\n    setState(() {});\n  }\n\n  void _handleSelected(String value) {\n    ref.read(selectedItemsProvider(_key).notifier).update((state) {\n      final newState = Set<String>.from(state)..addOrRemove(value);\n      return newState;\n    });\n  }\n\n  void _handleSelectAll() {\n    final ids = _items.toSet();\n    ref.read(selectedItemsProvider(_key).notifier).update((selected) {\n      return selected.containsAll(ids) ? {} : ids;\n    });\n  }\n\n  Future<void> _handleAddOrEdit([String? item]) async {\n    uniqueValidator(String? value) {\n      final index = _items.indexWhere((entry) {\n        return entry == value;\n      });\n      final current = item == value;\n      if (index != -1 && !current) {\n        return appLocalizations.existsTip(appLocalizations.value);\n      }\n      return null;\n    }\n\n    final value = await globalState.showCommonDialog<String>(\n      child: AddDialog(\n        valueField: Field(\n          label: widget.valueLabel ?? appLocalizations.value,\n          value: item ?? '',\n          validator: uniqueValidator,\n        ),\n        title: item != null ? appLocalizations.edit : appLocalizations.add,\n      ),\n    );\n\n    if (value == null) return;\n    final index = _items.indexWhere((entry) {\n      return entry == item;\n    });\n    final nextItems = List<String>.from(_items);\n    if (item != null) {\n      nextItems[index] = value;\n    } else {\n      nextItems.add(value);\n    }\n    _items = nextItems;\n    setState(() {});\n  }\n\n  void _handleDelete() {\n    final selectedItems = ref.read(selectedItemsProvider(_key));\n    final newItems = _items\n        .where((item) => !selectedItems.contains(item))\n        .toList();\n    _items = newItems;\n    ref.read(selectedItemsProvider(_key).notifier).value = {};\n    setState(() {});\n  }\n\n  Future<void> _handleReset() async {\n    final res = await globalState.showMessage(\n      message: TextSpan(text: appLocalizations.resetPageChangesTip),\n    );\n    if (res != true) {\n      return;\n    }\n    _items = _originItems;\n    setState(() {});\n  }\n\n  Widget _buildItem({\n    required String value,\n    required int index,\n    required int totalLength,\n    required bool isSelected,\n    required bool isEditing,\n    isDecorator = false,\n  }) {\n    final isFirst = index == 0;\n    final isLast = index == totalLength - 1;\n    return ReorderableDelayedDragStartListener(\n      key: ValueKey(value),\n      index: index,\n      child: CommonSelectedInputListItem(\n        isDecorator: isDecorator,\n        isLast: isLast,\n        isFirst: isFirst,\n        title: widget.titleBuilder(value),\n        isSelected: isSelected,\n        isEditing: isEditing,\n        onSelected: () {\n          _handleSelected(value);\n        },\n        onPressed: () {\n          _handleAddOrEdit(value);\n        },\n        leading: widget.leadingBuilder != null\n            ? widget.leadingBuilder!(value)\n            : null,\n        subtitle: widget.subtitleBuilder != null\n            ? widget.subtitleBuilder!(value)\n            : null,\n      ),\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final selectedItems = ref.watch(selectedItemsProvider(_key));\n    return CommonPopScope(\n      onPop: (_) {\n        if (selectedItems.isNotEmpty) {\n          ref.read(selectedItemsProvider(_key).notifier).value = {};\n          return false;\n        }\n        Navigator.of(context).pop(_items);\n        return false;\n      },\n      child: CommonScaffold(\n        title: widget.title,\n        actions: [\n          if (selectedItems.isNotEmpty) ...[\n            CommonMinIconButtonTheme(\n              child: IconButton.filledTonal(\n                onPressed: _handleDelete,\n                icon: Icon(Icons.delete),\n              ),\n            ),\n            SizedBox(width: 2),\n          ] else if (!stringListEquality.equals(_items, _originItems)) ...[\n            CommonMinIconButtonTheme(\n              child: IconButton.filledTonal(\n                onPressed: _handleReset,\n                icon: const Icon(Icons.replay),\n              ),\n            ),\n            SizedBox(width: 2),\n          ],\n          CommonMinFilledButtonTheme(\n            child: selectedItems.isNotEmpty\n                ? FilledButton(\n                    onPressed: _handleSelectAll,\n                    child: Text(appLocalizations.selectAll),\n                  )\n                : FilledButton.tonal(\n                    onPressed: () {\n                      _handleAddOrEdit();\n                    },\n                    child: Text(appLocalizations.add),\n                  ),\n          ),\n          SizedBox(width: 8),\n        ],\n        body: _items.isEmpty\n            ? NullStatus(label: appLocalizations.noData)\n            : ReorderableListView.builder(\n                padding: const EdgeInsets.only(\n                  bottom: 16 + 64,\n                  top: 16,\n                  left: 16,\n                  right: 16,\n                ),\n                buildDefaultDragHandles: false,\n                itemCount: _items.length,\n                itemBuilder: (context, index) {\n                  final value = _items[index];\n                  return _buildItem(\n                    value: value,\n                    index: index,\n                    totalLength: _items.length,\n                    isSelected: selectedItems.contains(value),\n                    isEditing: selectedItems.isNotEmpty,\n                  );\n                },\n                proxyDecorator: (child, index, animation) {\n                  final value = _items[index];\n                  return commonProxyDecorator(\n                    _buildItem(\n                      value: value,\n                      index: index,\n                      totalLength: _items.length,\n                      isDecorator: true,\n                      isSelected: selectedItems.contains(value),\n                      isEditing: selectedItems.isNotEmpty,\n                    ),\n                    index,\n                    animation,\n                  );\n                },\n                onReorder: _handleReorder,\n              ),\n      ),\n    );\n  }\n}\n\nclass MapInputPage extends ConsumerStatefulWidget {\n  final String title;\n  final Map<String, String> map;\n  final Widget Function(MapEntry<String, String> item) titleBuilder;\n  final Widget Function(MapEntry<String, String> item)? subtitleBuilder;\n  final Widget Function(MapEntry<String, String> item)? leadingBuilder;\n  final String? keyLabel;\n  final String? valueLabel;\n\n  const MapInputPage({\n    super.key,\n    required this.title,\n    required this.map,\n    required this.titleBuilder,\n    this.leadingBuilder,\n    this.keyLabel,\n    this.valueLabel,\n    this.subtitleBuilder,\n  });\n\n  @override\n  ConsumerState<MapInputPage> createState() => _MapInputPageState();\n}\n\nclass _MapInputPageState extends ConsumerState<MapInputPage> {\n  List<MapEntry<String, String>> _items = [];\n  late final List<MapEntry<String, String>> _originItems;\n  final _key = utils.id;\n\n  @override\n  void initState() {\n    super.initState();\n    _items = List<MapEntry<String, String>>.from(widget.map.entries);\n    _originItems = List<MapEntry<String, String>>.from(_items);\n  }\n\n  void _handleReorder(int oldIndex, newIndex) {\n    if (oldIndex < newIndex) {\n      newIndex -= 1;\n    }\n    final nextItems = List<MapEntry<String, String>>.from(_items);\n    final item = nextItems.removeAt(oldIndex);\n    nextItems.insert(newIndex, item);\n    _items = nextItems;\n    setState(() {});\n  }\n\n  void _handleSelected(MapEntry<String, String> value) {\n    ref.read(selectedItemsProvider(_key).notifier).update((state) {\n      final newState = Set<String>.from(state)..addOrRemove(value.key);\n      return newState;\n    });\n  }\n\n  void _handleSelectAll() {\n    final ids = _items.map((item) => item.key).toSet();\n    ref.read(selectedItemsProvider(_key).notifier).update((selected) {\n      return selected.containsAll(ids) ? {} : ids;\n    });\n  }\n\n  Future<void> _handleAddOrEdit([MapEntry<String, String>? item]) async {\n    uniqueValidator(String? value) {\n      final index = _items.indexWhere((entry) {\n        return entry.key == value;\n      });\n      final current = item?.key == value;\n      if (index != -1 && !current) {\n        return appLocalizations.existsTip(appLocalizations.key);\n      }\n      return null;\n    }\n\n    final keyField = Field(\n      label: widget.keyLabel ?? appLocalizations.key,\n      value: item == null ? '' : item.key,\n      validator: uniqueValidator,\n    );\n\n    final valueField = Field(\n      label: widget.valueLabel ?? appLocalizations.value,\n      value: item == null ? '' : item.value,\n    );\n\n    final value = await globalState.showCommonDialog<MapEntry<String, String>>(\n      child: AddDialog(\n        keyField: keyField,\n        valueField: valueField,\n        title: item != null ? appLocalizations.edit : appLocalizations.add,\n      ),\n    );\n    if (value == null) return;\n    final index = _items.indexWhere((entry) {\n      return entry.key == item?.key;\n    });\n\n    final nextItems = List<MapEntry<String, String>>.from(_items);\n    if (item != null) {\n      nextItems[index] = value;\n    } else {\n      nextItems.add(value);\n    }\n    _items = nextItems;\n    setState(() {});\n  }\n\n  void _handleDelete() {\n    final selectedItems = ref.read(selectedItemsProvider(_key));\n    final newItems = _items\n        .where((item) => !selectedItems.contains(item.key))\n        .toList();\n    _items = newItems;\n    ref.read(selectedItemsProvider(_key).notifier).value = {};\n    setState(() {});\n  }\n\n  Future<void> _handleReset() async {\n    final res = await globalState.showMessage(\n      message: TextSpan(text: appLocalizations.resetPageChangesTip),\n    );\n    if (res != true) {\n      return;\n    }\n    _items = _originItems;\n    setState(() {});\n  }\n\n  Widget _buildItem({\n    required MapEntry<String, String> value,\n    required int index,\n    required int totalLength,\n    required bool isSelected,\n    required bool isEditing,\n    isDecorator = false,\n  }) {\n    final isFirst = index == 0;\n    final isLast = index == totalLength - 1;\n    return ReorderableDelayedDragStartListener(\n      key: ValueKey(value),\n      index: index,\n      child: CommonSelectedInputListItem(\n        isDecorator: isDecorator,\n        isLast: isLast,\n        isFirst: isFirst,\n        title: widget.titleBuilder(value),\n        leading: widget.leadingBuilder != null\n            ? widget.leadingBuilder!(value)\n            : null,\n        subtitle: widget.subtitleBuilder != null\n            ? widget.subtitleBuilder!(value)\n            : null,\n        isSelected: isSelected,\n        isEditing: isEditing,\n        onSelected: () {\n          _handleSelected(value);\n        },\n        onPressed: () {\n          _handleAddOrEdit(value);\n        },\n      ),\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final selectedItems = ref.watch(selectedItemsProvider(_key));\n    return CommonPopScope(\n      onPop: (_) {\n        if (selectedItems.isNotEmpty) {\n          ref.read(selectedItemsProvider(_key).notifier).value = {};\n          return false;\n        }\n        Navigator.of(context).pop(Map<String, String>.fromEntries(_items));\n        return false;\n      },\n      child: CommonScaffold(\n        title: widget.title,\n        actions: [\n          if (selectedItems.isNotEmpty) ...[\n            CommonMinIconButtonTheme(\n              child: IconButton.filledTonal(\n                onPressed: _handleDelete,\n                icon: Icon(Icons.delete),\n              ),\n            ),\n            SizedBox(width: 2),\n          ] else if (!stringAndStringMapEntryListEquality.equals(\n            _items,\n            _originItems,\n          )) ...[\n            CommonMinIconButtonTheme(\n              child: IconButton.filledTonal(\n                onPressed: _handleReset,\n                icon: const Icon(Icons.replay),\n              ),\n            ),\n            SizedBox(width: 2),\n          ],\n          CommonMinFilledButtonTheme(\n            child: selectedItems.isNotEmpty\n                ? FilledButton(\n                    onPressed: _handleSelectAll,\n                    child: Text(appLocalizations.selectAll),\n                  )\n                : FilledButton.tonal(\n                    onPressed: () {\n                      _handleAddOrEdit();\n                    },\n                    child: Text(appLocalizations.add),\n                  ),\n          ),\n          SizedBox(width: 8),\n        ],\n        body: _items.isEmpty\n            ? NullStatus(label: appLocalizations.noData)\n            : ReorderableListView.builder(\n                padding: const EdgeInsets.only(\n                  bottom: 16 + 64,\n                  top: 16,\n                  left: 16,\n                  right: 16,\n                ),\n                buildDefaultDragHandles: false,\n                itemCount: _items.length,\n                itemBuilder: (context, index) {\n                  final value = _items[index];\n                  return _buildItem(\n                    value: value,\n                    index: index,\n                    totalLength: _items.length,\n                    isSelected: selectedItems.contains(value.key),\n                    isEditing: selectedItems.isNotEmpty,\n                  );\n                },\n                proxyDecorator: (child, index, animation) {\n                  final value = _items[index];\n                  return commonProxyDecorator(\n                    _buildItem(\n                      value: value,\n                      index: index,\n                      totalLength: _items.length,\n                      isDecorator: true,\n                      isSelected: selectedItems.contains(value.key),\n                      isEditing: selectedItems.isNotEmpty,\n                    ),\n                    index,\n                    animation,\n                  );\n                },\n                onReorder: _handleReorder,\n              ),\n      ),\n    );\n  }\n}\n\nclass AddDialog extends StatefulWidget {\n  final String title;\n  final Field? keyField;\n  final Field valueField;\n\n  const AddDialog({\n    super.key,\n    required this.title,\n    this.keyField,\n    required this.valueField,\n  });\n\n  @override\n  State<AddDialog> createState() => _AddDialogState();\n}\n\nclass _AddDialogState extends State<AddDialog> {\n  TextEditingController? _keyController;\n  late TextEditingController _valueController;\n  final GlobalKey<FormState> _formKey = GlobalKey<FormState>();\n\n  Field? get keyField => widget.keyField;\n\n  Field get valueField => widget.valueField;\n\n  @override\n  void initState() {\n    super.initState();\n    if (keyField != null) {\n      _keyController = TextEditingController(text: keyField!.value);\n    }\n    _valueController = TextEditingController(text: valueField.value);\n  }\n\n  void _submit() {\n    if (!_formKey.currentState!.validate()) return;\n    if (keyField != null) {\n      Navigator.of(context).pop<MapEntry<String, String>>(\n        MapEntry(_keyController!.text, _valueController.text),\n      );\n    } else {\n      Navigator.of(context).pop<String>(_valueController.text);\n    }\n  }\n\n  @override\n  void dispose() {\n    _keyController?.dispose();\n    _valueController.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonDialog(\n      title: widget.title,\n      actions: [\n        TextButton(onPressed: _submit, child: Text(appLocalizations.confirm)),\n      ],\n      child: Form(\n        autovalidateMode: AutovalidateMode.onUserInteraction,\n        key: _formKey,\n        child: Wrap(\n          runSpacing: 16,\n          children: [\n            if (keyField != null)\n              TextFormField(\n                maxLines: 3,\n                minLines: 1,\n                controller: _keyController,\n                decoration: InputDecoration(\n                  border: const OutlineInputBorder(),\n                  labelText: keyField!.label,\n                ),\n                validator: (String? value) {\n                  String? res;\n                  if (keyField!.validator != null) {\n                    res = keyField!.validator!(value);\n                  }\n                  if (res != null) {\n                    return res;\n                  }\n                  if (value == null || value.isEmpty) {\n                    return appLocalizations.emptyTip(appLocalizations.key);\n                  }\n                  return null;\n                },\n              ),\n            TextFormField(\n              maxLines: 3,\n              minLines: 1,\n              keyboardType: TextInputType.text,\n              controller: _valueController,\n              decoration: InputDecoration(\n                border: const OutlineInputBorder(),\n                labelText: valueField.label,\n              ),\n              onFieldSubmitted: (_) {\n                _submit();\n              },\n              validator: (String? value) {\n                String? res;\n                if (valueField.validator != null) {\n                  res = valueField.validator!(value);\n                }\n                if (res != null) {\n                  return res;\n                }\n                if (value == null || value.isEmpty) {\n                  return appLocalizations.emptyTip(appLocalizations.value);\n                }\n                return null;\n              },\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/keep_scope.dart",
    "content": "import 'package:flutter/material.dart';\n\nclass KeepScope extends StatefulWidget {\n  final Widget child;\n  final bool keep;\n\n  const KeepScope({\n    super.key,\n    required this.child,\n    this.keep = true,\n  });\n\n  @override\n  State<KeepScope> createState() => _KeepContainerState();\n}\n\nclass _KeepContainerState extends State<KeepScope>\n    with AutomaticKeepAliveClientMixin {\n  @override\n  Widget build(BuildContext context) {\n    super.build(context);\n    return widget.child;\n  }\n\n  @override\n  bool get wantKeepAlive => widget.keep;\n}\n"
  },
  {
    "path": "lib/widgets/line_chart.dart",
    "content": "import 'dart:ui';\n\nimport 'package:fl_clash/common/color.dart';\nimport 'package:flutter/material.dart';\n\nclass Point {\n  final double x;\n  final double y;\n\n  const Point(this.x, this.y);\n}\n\nclass LineChart extends StatefulWidget {\n  final List<Point> points;\n  final Color color;\n  final Duration duration;\n  final bool gradient;\n\n  const LineChart({\n    super.key,\n    this.gradient = false,\n    required this.points,\n    required this.color,\n    this.duration = Duration.zero,\n  });\n\n  @override\n  State<LineChart> createState() => _LineChartState();\n}\n\nclass _LineChartState extends State<LineChart>\n    with SingleTickerProviderStateMixin {\n  late AnimationController _controller;\n  List<Point> _points = [];\n\n  List<Point> _prevRenderPoints = [];\n  List<Point> _currentRenderPoints = [];\n\n  @override\n  void initState() {\n    super.initState();\n    _controller = AnimationController(vsync: this, duration: widget.duration);\n    _points = widget.points;\n    _currentRenderPoints = _getRenderPoints(_points);\n    _prevRenderPoints = _currentRenderPoints;\n  }\n\n  @override\n  void didUpdateWidget(LineChart oldWidget) {\n    super.didUpdateWidget(oldWidget);\n    if (widget.points != _points) {\n      _points = widget.points;\n      _prevRenderPoints = _currentRenderPoints;\n      _currentRenderPoints = _getRenderPoints(_points);\n      _controller.forward(from: 0);\n    }\n  }\n\n  @override\n  void dispose() {\n    _controller.dispose();\n    super.dispose();\n  }\n\n  List<Point> _getRenderPoints(List<Point> points) {\n    if (points.isEmpty) return [];\n    double maxX = points[0].x;\n    double minX = points[0].x;\n    double maxY = points[0].y;\n    double minY = points[0].y;\n\n    for (final point in points) {\n      if (point.x > maxX) maxX = point.x;\n      if (point.x < minX) minX = point.x;\n      if (point.y > maxY) maxY = point.y;\n      if (point.y < minY) minY = point.y;\n    }\n\n    return points.map((e) {\n      var x = (e.x - minX) / (maxX - minX);\n      if (x.isNaN) x = 0;\n      var y = (e.y - minY) / (maxY - minY);\n      if (y.isNaN) y = 0;\n      return Point(x, y);\n    }).toList();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return LayoutBuilder(\n      builder: (_, container) {\n        return AnimatedBuilder(\n          animation: _controller.view,\n          builder: (_, _) {\n            return CustomPaint(\n              painter: LineChartPainter(\n                prevRenderPoints: _prevRenderPoints,\n                currentRenderPoints: _currentRenderPoints,\n                progress: _controller.value,\n                gradient: widget.gradient,\n                color: widget.color,\n              ),\n              child: SizedBox(\n                height: container.maxHeight,\n                width: container.maxWidth,\n              ),\n            );\n          },\n        );\n      },\n    );\n  }\n}\n\nclass LineChartPainter extends CustomPainter {\n  final List<Point> prevRenderPoints;\n  final List<Point> currentRenderPoints;\n  final double progress;\n  final Color color;\n  final bool gradient;\n\n  late final Paint _strokePaint;\n  late final Paint _fillPaint;\n\n  Shader? _cachedShader;\n  Size? _cachedShaderSize;\n  Color? _cachedShaderColor;\n\n  LineChartPainter({\n    required this.prevRenderPoints,\n    required this.currentRenderPoints,\n    required this.progress,\n    required this.color,\n    required this.gradient,\n  }) {\n    _strokePaint = Paint()\n      ..color = color\n      ..strokeWidth = 2.0\n      ..style = PaintingStyle.stroke;\n\n    _fillPaint = Paint()..style = PaintingStyle.fill;\n  }\n\n  List<Point> _getInterpolatePoints(double t) {\n    if (currentRenderPoints.isEmpty) return [];\n\n    final length = currentRenderPoints.length;\n    final result = <Point>[];\n\n    for (var i = 0; i < length; i++) {\n      if (i > prevRenderPoints.length - 1) {\n        result.add(currentRenderPoints[i]);\n      } else {\n        final x = lerpDouble(\n          prevRenderPoints[i].x,\n          currentRenderPoints[i].x,\n          t,\n        )!;\n        final y = lerpDouble(\n          prevRenderPoints[i].y,\n          currentRenderPoints[i].y,\n          t,\n        )!;\n        result.add(Point(x, y));\n      }\n    }\n\n    return result;\n  }\n\n  Path _getPath(List<Point> points, Size size) {\n    if (points.isEmpty) return Path();\n\n    final path = Path()\n      ..moveTo(points[0].x * size.width, (1 - points[0].y) * size.height);\n\n    for (var i = 1; i < points.length - 1; i++) {\n      final nextPoint = points[i + 1];\n      final currentPoint = points[i];\n      final midX = (currentPoint.x + nextPoint.x) / 2;\n      final midY = (currentPoint.y + nextPoint.y) / 2;\n\n      path.quadraticBezierTo(\n        currentPoint.x * size.width,\n        (1 - currentPoint.y) * size.height,\n        midX * size.width,\n        (1 - midY) * size.height,\n      );\n    }\n\n    path.lineTo(points.last.x * size.width, (1 - points.last.y) * size.height);\n    return path;\n  }\n\n  Path _getAnimatedPath(Size size) {\n    final interpolatedPoints = _getInterpolatePoints(progress);\n    return _getPath(interpolatedPoints, size);\n  }\n\n  Shader _getShader(Size size) {\n    if (_cachedShader == null ||\n        _cachedShaderSize != size ||\n        _cachedShaderColor != color) {\n      final gradient = LinearGradient(\n        begin: Alignment.topCenter,\n        end: Alignment.bottomCenter,\n        colors: [color.opacity38, color.opacity10],\n      );\n\n      final strokeWidth = 2.0;\n      _cachedShader = gradient.createShader(\n        Rect.fromLTWH(0, 0, size.width, size.height + strokeWidth * 2),\n      );\n      _cachedShaderSize = size;\n      _cachedShaderColor = color;\n    }\n    return _cachedShader!;\n  }\n\n  @override\n  void paint(Canvas canvas, Size size) {\n    if (currentRenderPoints.isEmpty) return;\n\n    final strokeWidth = 2.0;\n    final chartSize = Size(size.width, size.height * 0.7);\n    final path = _getAnimatedPath(chartSize);\n\n    if (gradient) {\n      final fillPath = Path.from(path);\n      fillPath.lineTo(size.width, size.height + strokeWidth * 2);\n      fillPath.lineTo(0, size.height + strokeWidth * 2);\n      fillPath.close();\n\n      _fillPaint.shader = _getShader(size);\n      canvas.drawPath(fillPath, _fillPaint);\n    }\n\n    canvas.drawPath(path, _strokePaint);\n  }\n\n  @override\n  bool shouldRepaint(covariant LineChartPainter oldDelegate) {\n    return oldDelegate.progress != progress ||\n        oldDelegate.prevRenderPoints != prevRenderPoints ||\n        oldDelegate.currentRenderPoints != currentRenderPoints ||\n        oldDelegate.color != color ||\n        oldDelegate.gradient != gradient;\n  }\n}\n"
  },
  {
    "path": "lib/widgets/list.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/state.dart';\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nimport 'card.dart';\nimport 'input.dart';\nimport 'open_container.dart';\nimport 'scaffold.dart';\nimport 'sheet.dart';\n\nclass Delegate {\n  const Delegate();\n}\n\nclass RadioDelegate<T> extends Delegate {\n  final T value;\n  final void Function()? onTab;\n\n  const RadioDelegate({required this.value, this.onTab});\n}\n\nclass SwitchDelegate<T> extends Delegate {\n  final bool value;\n  final ValueChanged<bool>? onChanged;\n\n  const SwitchDelegate({required this.value, this.onChanged});\n}\n\nclass CheckboxDelegate<T> extends Delegate {\n  final bool value;\n  final ValueChanged<bool?>? onChanged;\n\n  const CheckboxDelegate({this.value = false, this.onChanged});\n}\n\nclass OpenDelegate<T> extends Delegate {\n  final Widget widget;\n  final double? maxWidth;\n  final bool blur;\n  final bool forceFull;\n  final ValueChanged<T?>? onChanged;\n\n  const OpenDelegate({\n    required this.widget,\n    this.maxWidth,\n    this.blur = true,\n    this.forceFull = true,\n    this.onChanged,\n  });\n}\n\nclass NextDelegate extends Delegate {\n  final Widget widget;\n  final double? maxWidth;\n  final bool blur;\n\n  const NextDelegate({required this.widget, this.maxWidth, this.blur = true});\n}\n\nclass OptionsDelegate<T> extends Delegate {\n  final List<T> options;\n  final String title;\n  final T value;\n  final String Function(T value) textBuilder;\n  final Function(T? value) onChanged;\n\n  const OptionsDelegate({\n    required this.title,\n    required this.options,\n    required this.textBuilder,\n    required this.value,\n    required this.onChanged,\n  });\n}\n\nclass InputDelegate extends Delegate {\n  final String title;\n  final String value;\n  final String? suffixText;\n  final Function(String? value) onChanged;\n  final FormFieldValidator<String>? validator;\n\n  final String? resetValue;\n\n  const InputDelegate({\n    required this.title,\n    required this.value,\n    this.suffixText,\n    required this.onChanged,\n    this.resetValue,\n    this.validator,\n  });\n}\n\nclass ListItem<T> extends StatelessWidget {\n  final Widget? leading;\n  final Widget title;\n  final Widget? subtitle;\n  final EdgeInsets padding;\n  final ListTileTitleAlignment tileTitleAlignment;\n  final bool? dense;\n  final Widget? trailing;\n  final Delegate delegate;\n  final double? horizontalTitleGap;\n  final TextStyle? titleTextStyle;\n  final TextStyle? subtitleTextStyle;\n  final double minVerticalPadding;\n  final Color? color;\n  final double? minTileHeight;\n  final VisualDensity? visualDensity;\n  final void Function()? onTap;\n\n  const ListItem({\n    super.key,\n    required this.title,\n    this.subtitle,\n    this.leading,\n    this.padding = const EdgeInsets.symmetric(horizontal: 16),\n    this.trailing,\n    this.horizontalTitleGap,\n    this.dense,\n    this.onTap,\n    this.titleTextStyle,\n    this.subtitleTextStyle,\n    this.color,\n    this.minTileHeight,\n    this.visualDensity,\n    this.minVerticalPadding = 12,\n    this.tileTitleAlignment = ListTileTitleAlignment.center,\n  }) : delegate = const Delegate();\n\n  const ListItem.open({\n    super.key,\n    required this.title,\n    this.subtitle,\n    this.leading,\n    this.padding = const EdgeInsets.symmetric(horizontal: 16),\n    this.trailing,\n    required OpenDelegate this.delegate,\n    this.horizontalTitleGap,\n    this.dense,\n    this.titleTextStyle,\n    this.subtitleTextStyle,\n    this.color,\n    this.minTileHeight,\n    this.visualDensity,\n    this.minVerticalPadding = 12,\n    this.tileTitleAlignment = ListTileTitleAlignment.center,\n  }) : onTap = null;\n\n  const ListItem.next({\n    super.key,\n    required this.title,\n    this.subtitle,\n    this.leading,\n    this.padding = const EdgeInsets.symmetric(horizontal: 16),\n    this.trailing,\n    required NextDelegate this.delegate,\n    this.horizontalTitleGap,\n    this.dense,\n    this.titleTextStyle,\n    this.subtitleTextStyle,\n    this.color,\n    this.minTileHeight,\n    this.visualDensity,\n    this.minVerticalPadding = 12,\n    this.tileTitleAlignment = ListTileTitleAlignment.center,\n  }) : onTap = null;\n\n  const ListItem.options({\n    super.key,\n    required this.title,\n    this.subtitle,\n    this.leading,\n    this.padding = const EdgeInsets.symmetric(horizontal: 16),\n    this.trailing,\n    required OptionsDelegate<T> this.delegate,\n    this.horizontalTitleGap,\n    this.dense,\n    this.titleTextStyle,\n    this.subtitleTextStyle,\n    this.color,\n    this.minTileHeight,\n    this.visualDensity,\n    this.minVerticalPadding = 12,\n    this.tileTitleAlignment = ListTileTitleAlignment.center,\n  }) : onTap = null;\n\n  const ListItem.input({\n    super.key,\n    required this.title,\n    this.subtitle,\n    this.leading,\n    this.padding = const EdgeInsets.symmetric(horizontal: 16),\n    this.trailing,\n    required InputDelegate this.delegate,\n    this.horizontalTitleGap,\n    this.dense,\n    this.titleTextStyle,\n    this.subtitleTextStyle,\n    this.color,\n    this.minTileHeight,\n    this.visualDensity,\n    this.minVerticalPadding = 12,\n    this.tileTitleAlignment = ListTileTitleAlignment.center,\n  }) : onTap = null;\n\n  const ListItem.checkbox({\n    super.key,\n    required this.title,\n    this.subtitle,\n    this.leading,\n    this.padding = const EdgeInsets.only(left: 16, right: 8),\n    required CheckboxDelegate<T> this.delegate,\n    this.horizontalTitleGap,\n    this.dense,\n    this.titleTextStyle,\n    this.subtitleTextStyle,\n    this.color,\n    this.minTileHeight,\n    this.visualDensity,\n    this.minVerticalPadding = 12,\n    this.tileTitleAlignment = ListTileTitleAlignment.center,\n  }) : trailing = null,\n       onTap = null;\n\n  const ListItem.switchItem({\n    super.key,\n    required this.title,\n    this.subtitle,\n    this.leading,\n    this.padding = const EdgeInsets.only(left: 16, right: 8),\n    required SwitchDelegate<T> this.delegate,\n    this.horizontalTitleGap,\n    this.dense,\n    this.titleTextStyle,\n    this.subtitleTextStyle,\n    this.color,\n    this.minTileHeight,\n    this.visualDensity,\n    this.minVerticalPadding = 12,\n    this.tileTitleAlignment = ListTileTitleAlignment.center,\n  }) : trailing = null,\n       onTap = null;\n\n  const ListItem.radio({\n    super.key,\n    required this.title,\n    this.subtitle,\n    this.trailing,\n    this.padding = const EdgeInsets.only(left: 12, right: 16),\n    required RadioDelegate<T> this.delegate,\n    this.horizontalTitleGap = 8,\n    this.dense,\n    this.titleTextStyle,\n    this.subtitleTextStyle,\n    this.color,\n    this.minTileHeight,\n    this.visualDensity,\n    this.minVerticalPadding = 12,\n    this.tileTitleAlignment = ListTileTitleAlignment.center,\n  }) : leading = null,\n       onTap = null;\n\n  Widget _buildListTile({\n    void Function()? onTap,\n    Widget? trailing,\n    Widget? leading,\n  }) {\n    return ListTile(\n      key: key,\n      dense: dense,\n      visualDensity: visualDensity,\n      tileColor: color,\n      titleTextStyle: titleTextStyle,\n      subtitleTextStyle: subtitleTextStyle,\n      leading: leading ?? this.leading,\n      horizontalTitleGap: horizontalTitleGap,\n      title: title,\n      minTileHeight: minTileHeight,\n      minVerticalPadding: minVerticalPadding,\n      subtitle: subtitle,\n      titleAlignment: tileTitleAlignment,\n      onTap: onTap,\n      trailing: trailing ?? this.trailing,\n      contentPadding: padding,\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    if (delegate is OpenDelegate) {\n      final openDelegate = delegate as OpenDelegate;\n      final child = openDelegate.widget;\n      final onChanged = openDelegate.onChanged;\n      return OpenContainer<T>(\n        // closedColor: context.colorScheme.surface,\n        // openColor: context.colorScheme.surface,\n        // closedElevation: 0,\n        // openElevation: 0,\n        closedBuilder: (_, action) {\n          openAction() async {\n            final isMobile = appController.isMobile;\n            if (!isMobile || kDebugMode) {\n              final res = await showExtend(\n                context,\n                props: ExtendProps(\n                  blur: openDelegate.blur,\n                  maxWidth: openDelegate.maxWidth,\n                  forceFull: openDelegate.forceFull,\n                ),\n                builder: (_, type) {\n                  return child;\n                },\n              );\n              if (onChanged != null) {\n                onChanged(res);\n              }\n              return;\n            }\n            action();\n          }\n\n          return _buildListTile(onTap: openAction);\n        },\n        onClosed: onChanged,\n        openBuilder: (_, action) {\n          return child;\n        },\n      );\n    }\n    if (delegate is NextDelegate) {\n      final nextDelegate = delegate as NextDelegate;\n      final child = nextDelegate.widget;\n\n      return _buildListTile(\n        onTap: () {\n          showExtend(\n            context,\n            props: ExtendProps(\n              blur: nextDelegate.blur,\n              maxWidth: nextDelegate.maxWidth,\n            ),\n            builder: (_, type) {\n              return child;\n            },\n          );\n        },\n      );\n    }\n    if (delegate is OptionsDelegate) {\n      final optionsDelegate = delegate as OptionsDelegate<T>;\n      return _buildListTile(\n        onTap: () async {\n          final value = await globalState.showCommonDialog<T>(\n            child: OptionsDialog<T>(\n              title: optionsDelegate.title,\n              options: optionsDelegate.options,\n              textBuilder: optionsDelegate.textBuilder,\n              value: optionsDelegate.value,\n            ),\n          );\n          optionsDelegate.onChanged(value);\n        },\n      );\n    }\n    if (delegate is InputDelegate) {\n      final inputDelegate = delegate as InputDelegate;\n      return _buildListTile(\n        onTap: () async {\n          final value = await globalState.showCommonDialog<String>(\n            child: InputDialog(\n              title: inputDelegate.title,\n              value: inputDelegate.value,\n              suffixText: inputDelegate.suffixText,\n              resetValue: inputDelegate.resetValue,\n              validator: inputDelegate.validator,\n            ),\n          );\n          inputDelegate.onChanged(value);\n        },\n      );\n    }\n    if (delegate is CheckboxDelegate) {\n      final checkboxDelegate = delegate as CheckboxDelegate;\n      return _buildListTile(\n        onTap: () {\n          if (checkboxDelegate.onChanged != null) {\n            checkboxDelegate.onChanged!(!checkboxDelegate.value);\n          }\n        },\n        trailing: CommonCheckBox(\n          value: checkboxDelegate.value,\n          onChanged: checkboxDelegate.onChanged,\n        ),\n      );\n    }\n    if (delegate is SwitchDelegate) {\n      final switchDelegate = delegate as SwitchDelegate;\n      return _buildListTile(\n        onTap: () {\n          if (switchDelegate.onChanged != null) {\n            switchDelegate.onChanged!(!switchDelegate.value);\n          }\n        },\n        trailing: Switch(\n          value: switchDelegate.value,\n          onChanged: switchDelegate.onChanged,\n        ),\n      );\n    }\n    if (delegate is RadioDelegate) {\n      final radioDelegate = delegate as RadioDelegate<T>;\n      return _buildListTile(\n        onTap: radioDelegate.onTab,\n        leading: Radio<T>(\n          visualDensity: VisualDensity.compact,\n          materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,\n          value: radioDelegate.value,\n          toggleable: true,\n        ),\n        trailing: trailing,\n      );\n    }\n\n    return _buildListTile(onTap: onTap);\n  }\n}\n\nclass ListHeader extends StatelessWidget {\n  final String title;\n  final String? subTitle;\n  final List<Widget> actions;\n  final EdgeInsets? padding;\n  final double? space;\n\n  const ListHeader({\n    super.key,\n    required this.title,\n    this.subTitle,\n    this.padding,\n    List<Widget>? actions,\n    this.space,\n  }) : actions = actions ?? const [];\n\n  @override\n  Widget build(BuildContext context) {\n    return Container(\n      alignment: Alignment.centerLeft,\n      padding: padding ?? listHeaderPadding,\n      child: Row(\n        mainAxisSize: MainAxisSize.max,\n        mainAxisAlignment: MainAxisAlignment.spaceBetween,\n        children: [\n          Expanded(\n            child: Column(\n              crossAxisAlignment: CrossAxisAlignment.start,\n              children: [\n                Text(\n                  title,\n                  style: context.textTheme.labelLarge?.copyWith(\n                    color: context.colorScheme.onSurfaceVariant.opacity80,\n                    fontWeight: FontWeight.w600,\n                  ),\n                ),\n                if (subTitle != null)\n                  Text(\n                    subTitle!,\n                    style: context.textTheme.bodySmall?.copyWith(\n                      color: context.colorScheme.outline,\n                    ),\n                  ),\n              ],\n            ),\n          ),\n          Row(\n            mainAxisSize: MainAxisSize.min,\n            mainAxisAlignment: MainAxisAlignment.end,\n            children: [...genActions(actions, space: space)],\n          ),\n        ],\n      ),\n    );\n  }\n}\n\nList<Widget> generateSection({\n  String? title,\n  required Iterable<Widget> items,\n  List<Widget>? actions,\n  bool isFirst = false,\n  bool separated = true,\n}) {\n  final genItems = separated\n      ? items.separated(const Divider(height: 0))\n      : items;\n  return [\n    if (items.isNotEmpty && title != null)\n      ListHeader(\n        title: title,\n        actions: actions,\n        padding: isFirst\n            ? listHeaderPadding.copyWith(top: 8.ap)\n            : listHeaderPadding,\n      ),\n    ...genItems,\n  ];\n}\n\nWidget generateSectionV2({\n  String? title,\n  required Iterable<Widget> items,\n  List<Widget>? actions,\n  bool separated = true,\n}) {\n  final genItems = items\n      .map<Widget>((item) {\n        return ClipRRect(\n          borderRadius: BorderRadius.circular(4),\n          child: CommonCard(\n            type: CommonCardType.filled,\n            radius: 0,\n            child: item,\n          ),\n        );\n      })\n      .separated(const Divider(height: 2, color: Colors.transparent));\n  return Column(\n    children: [\n      if (items.isNotEmpty && title != null)\n        ListHeader(title: title, actions: actions),\n      ClipRRect(\n        borderRadius: BorderRadius.circular(18),\n        child: Column(children: [...genItems]),\n      ),\n    ],\n  );\n}\n\nList<Widget> generateInfoSection({\n  required Info info,\n  required Iterable<Widget> items,\n  List<Widget>? actions,\n  bool separated = true,\n}) {\n  final genItems = separated\n      ? items.separated(const Divider(height: 0))\n      : items;\n  return [\n    if (items.isNotEmpty) InfoHeader(info: info, actions: actions),\n    ...genItems,\n  ];\n}\n\nWidget generateListView(List<Widget> items) {\n  return ListView.builder(\n    itemCount: items.length,\n    itemBuilder: (_, index) => items[index],\n    padding: const EdgeInsets.only(bottom: 16),\n  );\n}\n\nclass CommonSelectedListItem extends StatelessWidget {\n  final bool isSelected;\n  final bool isEditing;\n  final Widget title;\n  final VoidCallback onSelected;\n  final VoidCallback onPressed;\n\n  const CommonSelectedListItem({\n    super.key,\n    required this.isSelected,\n    required this.onSelected,\n    this.isEditing = false,\n    required this.title,\n    required this.onPressed,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return Material(\n      color: Colors.transparent,\n      child: Container(\n        margin: EdgeInsets.symmetric(vertical: 4, horizontal: 16),\n        color: Colors.transparent,\n        child: CommonCard(\n          padding: EdgeInsets.zero,\n          radius: 18,\n          type: CommonCardType.filled,\n          isSelected: isSelected,\n          onPressed: () {\n            if (isEditing) {\n              onSelected();\n              return;\n            }\n            onPressed();\n          },\n          child: ListTile(\n            minTileHeight: 32 + globalState.measure.bodyMediumHeight,\n            minVerticalPadding: 12,\n            contentPadding: const EdgeInsets.symmetric(horizontal: 16),\n            trailing: SizedBox(\n              width: 24,\n              height: 24,\n              child: CommonCheckBox(\n                value: isSelected,\n                isCircle: true,\n                onChanged: (_) {\n                  onSelected();\n                },\n              ),\n            ),\n            title: title,\n          ),\n        ),\n      ),\n    );\n  }\n}\n\nclass CommonInputListItem extends StatelessWidget {\n  final bool isDecorator;\n  final bool isFirst;\n  final bool isLast;\n  final Widget? title;\n  final Widget? subtitle;\n  final Widget? leading;\n  final Widget? trailing;\n  final bool? isSelected;\n  final VoidCallback? onPressed;\n\n  const CommonInputListItem({\n    super.key,\n    this.isDecorator = false,\n    this.isFirst = false,\n    this.isLast = false,\n    this.title,\n    this.leading,\n    this.trailing,\n    this.subtitle,\n    this.isSelected,\n    this.onPressed,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return Container(\n      clipBehavior: Clip.hardEdge,\n      decoration: ShapeDecoration(\n        shape: isDecorator == true\n            ? LinearBorder.none\n            : RoundedSuperellipseBorder(\n                borderRadius: BorderRadius.vertical(\n                  top: isFirst ? Radius.circular(24) : Radius.zero,\n                  bottom: isLast ? Radius.circular(24) : Radius.zero,\n                ),\n              ),\n      ),\n      child: CommonCard(\n        radius: 0,\n        isSelected: isSelected,\n        type: CommonCardType.filled,\n        onPressed: onPressed,\n        child: Column(\n          mainAxisSize: MainAxisSize.min,\n          children: [\n            Flexible(\n              child: ListTile(\n                leading: leading,\n                contentPadding: const EdgeInsets.only(right: 16, left: 16),\n                title: title,\n                subtitle: subtitle,\n                minVerticalPadding: 14,\n                trailing: trailing,\n              ),\n            ),\n            if (isDecorator != true && !isLast)\n              Divider(height: 0, indent: 14, endIndent: 14),\n          ],\n        ),\n      ),\n    );\n  }\n}\n\nclass CommonSelectedInputListItem extends StatelessWidget {\n  final bool isSelected;\n  final bool isEditing;\n  final Widget title;\n  final Widget? subtitle;\n  final VoidCallback onSelected;\n  final VoidCallback onPressed;\n  final bool isFirst;\n  final bool isLast;\n  final bool isDecorator;\n  final Widget? leading;\n\n  const CommonSelectedInputListItem({\n    super.key,\n    required this.isSelected,\n    required this.onSelected,\n    this.isEditing = false,\n    required this.title,\n    required this.onPressed,\n    this.isFirst = false,\n    this.isLast = false,\n    this.isDecorator = false,\n    this.subtitle,\n    this.leading,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonInputListItem(\n      title: title,\n      isDecorator: isDecorator,\n      isSelected: isSelected,\n      isFirst: isFirst,\n      isLast: isLast,\n      leading: leading,\n      onPressed: isDecorator\n          ? null\n          : () {\n              if (isEditing) {\n                onSelected();\n                return;\n              }\n              onPressed();\n            },\n      subtitle: subtitle,\n      trailing: SizedBox(\n        width: 24,\n        height: 24,\n        child: CommonCheckBox(\n          value: isSelected,\n          isCircle: true,\n          onChanged: (_) {\n            onSelected();\n          },\n        ),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/loading.dart",
    "content": "import 'package:flutter/material.dart';\n\nclass CommonCircleLoading extends StatefulWidget {\n  final Color? color;\n\n  const CommonCircleLoading({super.key, this.color});\n\n  @override\n  State<CommonCircleLoading> createState() => _CommonCircleLoadingState();\n}\n\nclass _CommonCircleLoadingState extends State<CommonCircleLoading>\n    with TickerProviderStateMixin {\n  late AnimationController _rotateController;\n  late AnimationController _pointsController;\n  late Animation<double> _pointsAnimation;\n\n  @override\n  void initState() {\n    super.initState();\n    _rotateController = AnimationController(\n      duration: const Duration(seconds: 3),\n      vsync: this,\n    )..repeat();\n\n    _pointsController = AnimationController(\n      duration: const Duration(seconds: 1),\n      vsync: this,\n    )..repeat(reverse: true);\n\n    _pointsAnimation = Tween<double>(begin: 3.0, end: 9.0).animate(\n      CurvedAnimation(parent: _pointsController, curve: Curves.easeInOut),\n    );\n  }\n\n  @override\n  void dispose() {\n    _rotateController.dispose();\n    _pointsController.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final color = widget.color ?? Theme.of(context).colorScheme.primary;\n\n    return RepaintBoundary(\n      child: RotationTransition(\n        turns: _rotateController,\n        child: SizedBox.expand(\n          child: AnimatedBuilder(\n            animation: _pointsController,\n            builder: (context, child) {\n              return CustomPaint(\n                painter: _StarPainter(\n                  points: _pointsAnimation.value,\n                  color: color,\n                ),\n              );\n            },\n          ),\n        ),\n      ),\n    );\n  }\n}\n\nclass _StarPainter extends CustomPainter {\n  final double points;\n  final Color color;\n  final Paint _paint;\n\n  _StarPainter({required this.points, required this.color})\n    : _paint = Paint()..color = color;\n\n  @override\n  void paint(Canvas canvas, Size size) {\n    final rect = Offset.zero & size;\n    final starBorder = StarBorder(\n      points: points,\n      innerRadiusRatio: 0.8,\n      pointRounding: 0.5,\n      valleyRounding: 0.1,\n      squash: 0.5,\n    );\n\n    final path = starBorder.getOuterPath(rect);\n    canvas.drawPath(path, _paint);\n  }\n\n  @override\n  bool shouldRepaint(covariant _StarPainter oldDelegate) {\n    return oldDelegate.points != points || oldDelegate.color != color;\n  }\n}\n"
  },
  {
    "path": "lib/widgets/notification.dart",
    "content": "import 'package:fl_clash/models/config.dart';\nimport 'package:fl_clash/providers/config.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_riverpod/flutter_riverpod.dart';\n\nclass TextScaleNotification extends StatelessWidget {\n  final Widget child;\n  final Function(TextScale textScale) onNotification;\n\n  const TextScaleNotification({\n    super.key,\n    required this.child,\n    required this.onNotification,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return Consumer(\n      builder: (_, ref, child) {\n        ref.listen(\n          themeSettingProvider.select((state) => state.textScale),\n          (prev, next) {\n            if (prev != next) {\n              onNotification(next);\n            }\n          },\n        );\n        return child!;\n      },\n      child: child,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/null_status.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/services.dart';\nimport 'package:flutter_svg/svg.dart';\n\nclass NullStatus extends StatelessWidget {\n  final String label;\n  final Widget illustration;\n\n  const NullStatus({\n    super.key,\n    required this.label,\n    this.illustration = const DataEmptyIllustration(),\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return Align(\n      alignment: Alignment(0.0, -0.25),\n      child: Wrap(\n        direction: Axis.vertical,\n        runAlignment: WrapAlignment.center,\n        crossAxisAlignment: WrapCrossAlignment.center,\n        children: [\n          illustration,\n          SizedBox(height: 16),\n          Text(\n            label,\n            style: Theme.of(context).textTheme.titleMedium?.toBold.toLight,\n          ),\n        ],\n      ),\n    );\n  }\n}\n\nclass LogEmptyIllustration extends StatelessWidget {\n  const LogEmptyIllustration({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Container(\n      decoration: ShapeDecoration(\n        color: context.colorScheme.primaryContainer,\n        shape: StarBorder(\n          points: 5,\n          innerRadiusRatio: 0.8,\n          pointRounding: 0.7,\n          valleyRounding: 0.1,\n          squash: 0.5,\n        ),\n      ),\n      child: _ThemeAwareSvg('assets/images/empty/log.svg'),\n    );\n  }\n}\n\nclass ProxyEmptyIllustration extends StatelessWidget {\n  const ProxyEmptyIllustration({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Container(\n      decoration: ShapeDecoration(\n        color: context.colorScheme.secondaryContainer,\n        shape: StarBorder(\n          points: 12,\n          innerRadiusRatio: 0.8,\n          pointRounding: 0.5,\n          valleyRounding: 0.4,\n          squash: 0.6,\n        ),\n      ),\n      child: _ThemeAwareSvg('assets/images/empty/proxy.svg'),\n    );\n  }\n}\n\nclass DataEmptyIllustration extends StatelessWidget {\n  const DataEmptyIllustration({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Container(\n      decoration: ShapeDecoration(\n        color: context.colorScheme.secondaryContainer,\n        shape: StarBorder(\n          points: 3,\n          innerRadiusRatio: 1,\n          pointRounding: 0.3,\n          valleyRounding: 0.5,\n          squash: 0.2,\n        ),\n      ),\n      child: _ThemeAwareSvg('assets/images/empty/data.svg'),\n    );\n  }\n}\n\nclass ProfileEmptyIllustration extends StatelessWidget {\n  const ProfileEmptyIllustration({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Container(\n      decoration: ShapeDecoration(\n        color: context.colorScheme.secondaryContainer,\n        shape: StarBorder(\n          points: 8,\n          innerRadiusRatio: 0.6,\n          pointRounding: 1,\n          valleyRounding: 0,\n          squash: 1,\n        ),\n      ),\n      child: _ThemeAwareSvg('assets/images/empty/profile.svg'),\n    );\n  }\n}\n\nclass ScriptEmptyIllustration extends StatelessWidget {\n  const ScriptEmptyIllustration({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Container(\n      decoration: ShapeDecoration(\n        color: context.colorScheme.secondaryContainer,\n        shape: StarBorder(\n          points: 3,\n          innerRadiusRatio: 0.6,\n          pointRounding: 0.6,\n          valleyRounding: 0.2,\n          squash: 0.1,\n        ),\n      ),\n      child: _ThemeAwareSvg('assets/images/empty/script.svg'),\n    );\n  }\n}\n\nclass RuleEmptyIllustration extends StatelessWidget {\n  const RuleEmptyIllustration({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Container(\n      decoration: ShapeDecoration(\n        color: context.colorScheme.secondaryContainer,\n        shape: StarBorder(\n          points: 7,\n          innerRadiusRatio: 0.3,\n          pointRounding: 0.9,\n          valleyRounding: 0.1,\n          squash: 0,\n        ),\n      ),\n      child: _ThemeAwareSvg('assets/images/empty/rule.svg'),\n    );\n  }\n}\n\nclass ConnectionEmptyIllustration extends StatelessWidget {\n  const ConnectionEmptyIllustration({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return Container(\n      decoration: ShapeDecoration(\n        color: context.colorScheme.secondaryContainer,\n        shape: StarBorder(\n          points: 4,\n          innerRadiusRatio: 0.1,\n          pointRounding: 1,\n          valleyRounding: 0,\n          squash: 1,\n          rotation: 45,\n        ),\n      ),\n      child: _ThemeAwareSvg('assets/images/empty/connection.svg'),\n    );\n  }\n}\n\nclass _ThemeAwareSvg extends StatelessWidget {\n  final String assetPath;\n\n  const _ThemeAwareSvg(this.assetPath);\n\n  String _colorToHex(Color color) {\n    return color.toARGB32().toRadixString(16).substring(2);\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final colorScheme = context.colorScheme;\n    return FutureBuilder<String>(\n      future: rootBundle.loadString(assetPath),\n      builder: (context, snapshot) {\n        if (snapshot.hasData) {\n          String svgString = snapshot.data!;\n          svgString = svgString.replaceAll(\n            '#E8DEF8',\n            '#${_colorToHex(colorScheme.secondaryContainer)}',\n          );\n          // primary ??\n          svgString = svgString.replaceAll(\n            '#6750A4',\n            '#${_colorToHex(colorScheme.primary)}',\n          );\n          // surface ??\n          svgString = svgString.replaceAll(\n            '#FDF7FF',\n            '#${_colorToHex(colorScheme.surface)}',\n          );\n          svgString = svgString.replaceAll(\n            '#C4C7C5',\n            '#${_colorToHex(colorScheme.outlineVariant)}',\n          );\n          return SvgPicture.string(svgString, width: 200, height: 200);\n        } else if (snapshot.hasError) {\n          return const Icon(Icons.error);\n        }\n        return SizedBox(width: 200, height: 200);\n      },\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/open_container.dart",
    "content": "import 'package:flutter/material.dart';\nimport 'package:flutter/scheduler.dart';\n\ntypedef CloseContainerActionCallback<S> = void Function({S? returnValue});\ntypedef OpenContainerBuilder<S> =\n    Widget Function(\n      BuildContext context,\n      CloseContainerActionCallback<S> action,\n    );\ntypedef CloseContainerBuilder =\n    Widget Function(BuildContext context, VoidCallback action);\n\nenum ContainerTransitionType { fade, fadeThrough }\n\ntypedef ClosedCallback<S> = void Function(S data);\n\n@optionalTypeArgs\nclass OpenContainer<T extends Object?> extends StatefulWidget {\n  const OpenContainer({\n    super.key,\n    this.middleColor,\n    this.onClosed,\n    required this.closedBuilder,\n    required this.openBuilder,\n    this.tappable = true,\n    this.transitionDuration = const Duration(milliseconds: 300),\n    this.transitionType = ContainerTransitionType.fade,\n    this.useRootNavigator = false,\n    this.routeSettings,\n    this.clipBehavior = Clip.antiAlias,\n  });\n\n  final Color? middleColor;\n  final ClosedCallback<T?>? onClosed;\n  final CloseContainerBuilder closedBuilder;\n  final OpenContainerBuilder<T> openBuilder;\n  final bool tappable;\n  final Duration transitionDuration;\n  final ContainerTransitionType transitionType;\n  final bool useRootNavigator;\n  final RouteSettings? routeSettings;\n  final Clip clipBehavior;\n\n  @override\n  State<OpenContainer<T?>> createState() => _OpenContainerState<T>();\n}\n\nclass _OpenContainerState<T> extends State<OpenContainer<T?>> {\n  final GlobalKey<_HideableState> _hideableKey = GlobalKey<_HideableState>();\n  final GlobalKey _closedBuilderKey = GlobalKey();\n\n  Future<void> openContainer() async {\n    final Color middleColor =\n        widget.middleColor ?? Theme.of(context).canvasColor;\n    final T? data =\n        await Navigator.of(\n          context,\n          rootNavigator: widget.useRootNavigator,\n        ).push(\n          _OpenContainerRoute<T>(\n            middleColor: middleColor,\n            closedBuilder: widget.closedBuilder,\n            openBuilder: widget.openBuilder,\n            hideableKey: _hideableKey,\n            closedBuilderKey: _closedBuilderKey,\n            transitionDuration: widget.transitionDuration,\n            transitionType: widget.transitionType,\n            useRootNavigator: widget.useRootNavigator,\n            routeSettings: widget.routeSettings,\n          ),\n        );\n    if (widget.onClosed != null) {\n      widget.onClosed!(data);\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return _Hideable(\n      key: _hideableKey,\n      child: GestureDetector(\n        onTap: widget.tappable ? openContainer : null,\n        child: Material(\n          color: Colors.transparent,\n          clipBehavior: widget.clipBehavior,\n          child: Builder(\n            key: _closedBuilderKey,\n            builder: (BuildContext context) {\n              return widget.closedBuilder(context, openContainer);\n            },\n          ),\n        ),\n      ),\n    );\n  }\n}\n\nclass _Hideable extends StatefulWidget {\n  const _Hideable({super.key, required this.child});\n\n  final Widget child;\n\n  @override\n  State<_Hideable> createState() => _HideableState();\n}\n\nclass _HideableState extends State<_Hideable> {\n  Size? get placeholderSize => _placeholderSize;\n  Size? _placeholderSize;\n\n  set placeholderSize(Size? value) {\n    if (_placeholderSize == value) {\n      return;\n    }\n    setState(() {\n      _placeholderSize = value;\n    });\n  }\n\n  bool get isVisible => _visible;\n  bool _visible = true;\n\n  set isVisible(bool value) {\n    if (_visible == value) {\n      return;\n    }\n    setState(() {\n      _visible = value;\n    });\n  }\n\n  bool get isInTree => _placeholderSize == null;\n\n  @override\n  Widget build(BuildContext context) {\n    if (_placeholderSize != null) {\n      return SizedBox.fromSize(size: _placeholderSize);\n    }\n    return Visibility(\n      visible: _visible,\n      maintainSize: true,\n      maintainState: true,\n      maintainAnimation: true,\n      child: widget.child,\n    );\n  }\n}\n\nclass _OpenContainerRoute<T> extends ModalRoute<T> {\n  _OpenContainerRoute({\n    required this.middleColor,\n    required this.closedBuilder,\n    required this.openBuilder,\n    required this.hideableKey,\n    required this.closedBuilderKey,\n    required this.transitionDuration,\n    required this.transitionType,\n    required this.useRootNavigator,\n    required RouteSettings? routeSettings,\n  }) : _closedOpacityTween = _getClosedOpacityTween(transitionType),\n       _openOpacityTween = _getOpenOpacityTween(transitionType),\n       super(settings: routeSettings);\n\n  static _FlippableTweenSequence<Color?> _getColorTween({\n    required ContainerTransitionType transitionType,\n    required Color closedColor,\n    required Color openColor,\n    required Color middleColor,\n  }) {\n    switch (transitionType) {\n      case ContainerTransitionType.fade:\n        return _FlippableTweenSequence<Color?>(<TweenSequenceItem<Color?>>[\n          TweenSequenceItem<Color>(\n            tween: ConstantTween<Color>(closedColor),\n            weight: 1 / 5,\n          ),\n          TweenSequenceItem<Color?>(\n            tween: ColorTween(begin: closedColor, end: openColor),\n            weight: 1 / 5,\n          ),\n          TweenSequenceItem<Color>(\n            tween: ConstantTween<Color>(openColor),\n            weight: 3 / 5,\n          ),\n        ]);\n      case ContainerTransitionType.fadeThrough:\n        return _FlippableTweenSequence<Color?>(<TweenSequenceItem<Color?>>[\n          TweenSequenceItem<Color?>(\n            tween: ColorTween(begin: closedColor, end: middleColor),\n            weight: 1 / 5,\n          ),\n          TweenSequenceItem<Color?>(\n            tween: ColorTween(begin: middleColor, end: openColor),\n            weight: 4 / 5,\n          ),\n        ]);\n    }\n  }\n\n  static _FlippableTweenSequence<double> _getClosedOpacityTween(\n    ContainerTransitionType transitionType,\n  ) {\n    switch (transitionType) {\n      case ContainerTransitionType.fade:\n        return _FlippableTweenSequence<double>(<TweenSequenceItem<double>>[\n          TweenSequenceItem<double>(\n            tween: ConstantTween<double>(1.0),\n            weight: 1,\n          ),\n        ]);\n      case ContainerTransitionType.fadeThrough:\n        return _FlippableTweenSequence<double>(<TweenSequenceItem<double>>[\n          TweenSequenceItem<double>(\n            tween: Tween<double>(begin: 1.0, end: 0.0),\n            weight: 1 / 5,\n          ),\n          TweenSequenceItem<double>(\n            tween: ConstantTween<double>(0.0),\n            weight: 4 / 5,\n          ),\n        ]);\n    }\n  }\n\n  static _FlippableTweenSequence<double> _getOpenOpacityTween(\n    ContainerTransitionType transitionType,\n  ) {\n    switch (transitionType) {\n      case ContainerTransitionType.fade:\n        return _FlippableTweenSequence<double>(<TweenSequenceItem<double>>[\n          TweenSequenceItem<double>(\n            tween: ConstantTween<double>(0.0),\n            weight: 1 / 5,\n          ),\n          TweenSequenceItem<double>(\n            tween: Tween<double>(begin: 0.0, end: 1.0),\n            weight: 1 / 5,\n          ),\n          TweenSequenceItem<double>(\n            tween: ConstantTween<double>(1.0),\n            weight: 3 / 5,\n          ),\n        ]);\n      case ContainerTransitionType.fadeThrough:\n        return _FlippableTweenSequence<double>(<TweenSequenceItem<double>>[\n          TweenSequenceItem<double>(\n            tween: ConstantTween<double>(0.0),\n            weight: 1 / 5,\n          ),\n          TweenSequenceItem<double>(\n            tween: Tween<double>(begin: 0.0, end: 1.0),\n            weight: 4 / 5,\n          ),\n        ]);\n    }\n  }\n\n  final Color middleColor;\n  final CloseContainerBuilder closedBuilder;\n  final OpenContainerBuilder<T> openBuilder;\n  final GlobalKey<_HideableState> hideableKey;\n  final GlobalKey closedBuilderKey;\n\n  @override\n  final Duration transitionDuration;\n  final ContainerTransitionType transitionType;\n\n  final bool useRootNavigator;\n\n  final _FlippableTweenSequence<double> _closedOpacityTween;\n  final _FlippableTweenSequence<double> _openOpacityTween;\n  late _FlippableTweenSequence<Color?> _colorTween;\n  final GlobalKey _openBuilderKey = GlobalKey();\n  final RectTween _rectTween = RectTween();\n\n  AnimationStatus? _lastAnimationStatus;\n  AnimationStatus? _currentAnimationStatus;\n\n  @override\n  TickerFuture didPush() {\n    _takeMeasurements(navigatorContext: hideableKey.currentContext!);\n\n    animation!.addStatusListener((AnimationStatus status) {\n      _lastAnimationStatus = _currentAnimationStatus;\n      _currentAnimationStatus = status;\n      switch (status) {\n        case AnimationStatus.dismissed:\n          _toggleHideable(hide: false);\n          break;\n        case AnimationStatus.completed:\n          _toggleHideable(hide: true);\n          break;\n        case AnimationStatus.forward:\n        case AnimationStatus.reverse:\n          break;\n      }\n    });\n\n    return super.didPush();\n  }\n\n  @override\n  bool didPop(T? result) {\n    _takeMeasurements(\n      navigatorContext: subtreeContext!,\n      delayForSourceRoute: true,\n    );\n    return super.didPop(result);\n  }\n\n  @override\n  void dispose() {\n    if (hideableKey.currentState?.isVisible == false) {\n      SchedulerBinding.instance.addPostFrameCallback(\n        (Duration d) => _toggleHideable(hide: false),\n      );\n    }\n    super.dispose();\n  }\n\n  void _toggleHideable({required bool hide}) {\n    if (hideableKey.currentState != null) {\n      hideableKey.currentState!\n        ..placeholderSize = null\n        ..isVisible = !hide;\n    }\n  }\n\n  void _takeMeasurements({\n    required BuildContext navigatorContext,\n    bool delayForSourceRoute = false,\n  }) {\n    final RenderBox navigator =\n        Navigator.of(\n              navigatorContext,\n              rootNavigator: useRootNavigator,\n            ).context.findRenderObject()!\n            as RenderBox;\n    final Size navSize = _getSize(navigator);\n    _rectTween.end = Offset.zero & navSize;\n\n    void takeMeasurementsInSourceRoute([Duration? _]) {\n      if (!navigator.attached || hideableKey.currentContext == null) {\n        return;\n      }\n      _rectTween.begin = _getRect(hideableKey, navigator);\n      hideableKey.currentState!.placeholderSize = _rectTween.begin!.size;\n    }\n\n    if (delayForSourceRoute) {\n      SchedulerBinding.instance.addPostFrameCallback(\n        takeMeasurementsInSourceRoute,\n      );\n    } else {\n      takeMeasurementsInSourceRoute();\n    }\n  }\n\n  Size _getSize(RenderBox render) {\n    assert(render.hasSize);\n    return render.size;\n  }\n\n  Rect _getRect(GlobalKey key, RenderBox ancestor) {\n    assert(key.currentContext != null);\n    assert(ancestor.hasSize);\n    final RenderBox render =\n        key.currentContext!.findRenderObject()! as RenderBox;\n    assert(render.hasSize);\n    return MatrixUtils.transformRect(\n      render.getTransformTo(ancestor),\n      Offset.zero & render.size,\n    );\n  }\n\n  bool get _transitionWasInterrupted {\n    bool wasInProgress = false;\n    bool isInProgress = false;\n\n    switch (_currentAnimationStatus) {\n      case AnimationStatus.completed:\n      case AnimationStatus.dismissed:\n        isInProgress = false;\n        break;\n      case AnimationStatus.forward:\n      case AnimationStatus.reverse:\n        isInProgress = true;\n        break;\n      case null:\n        break;\n    }\n    switch (_lastAnimationStatus) {\n      case AnimationStatus.completed:\n      case AnimationStatus.dismissed:\n        wasInProgress = false;\n        break;\n      case AnimationStatus.forward:\n      case AnimationStatus.reverse:\n        wasInProgress = true;\n        break;\n      case null:\n        break;\n    }\n    return wasInProgress && isInProgress;\n  }\n\n  void closeContainer({T? returnValue}) {\n    Navigator.of(subtreeContext!).pop(returnValue);\n  }\n\n  @override\n  Widget buildPage(\n    BuildContext context,\n    Animation<double> animation,\n    Animation<double> secondaryAnimation,\n  ) {\n    _colorTween = _getColorTween(\n      transitionType: transitionType,\n      closedColor: Theme.of(context).colorScheme.surface,\n      openColor: Theme.of(context).colorScheme.surface,\n      middleColor: middleColor,\n    );\n    return Align(\n      alignment: Alignment.topLeft,\n      child: AnimatedBuilder(\n        animation: animation,\n        builder: (BuildContext context, Widget? child) {\n          if (animation.isCompleted) {\n            return SizedBox.expand(\n              child: Material(\n                child: Builder(\n                  key: _openBuilderKey,\n                  builder: (BuildContext context) {\n                    return openBuilder(context, closeContainer);\n                  },\n                ),\n              ),\n            );\n          }\n\n          final Animation<double> curvedAnimation = CurvedAnimation(\n            parent: animation,\n            curve: Curves.fastOutSlowIn,\n            reverseCurve: _transitionWasInterrupted\n                ? null\n                : Curves.fastOutSlowIn.flipped,\n          );\n          TweenSequence<Color?>? colorTween;\n          TweenSequence<double>? closedOpacityTween, openOpacityTween;\n          switch (animation.status) {\n            case AnimationStatus.dismissed:\n            case AnimationStatus.forward:\n              closedOpacityTween = _closedOpacityTween;\n              openOpacityTween = _openOpacityTween;\n              colorTween = _colorTween;\n              break;\n            case AnimationStatus.reverse:\n              if (_transitionWasInterrupted) {\n                closedOpacityTween = _closedOpacityTween;\n                openOpacityTween = _openOpacityTween;\n                colorTween = _colorTween;\n                break;\n              }\n              closedOpacityTween = _closedOpacityTween.flipped;\n              openOpacityTween = _openOpacityTween.flipped;\n              colorTween = _colorTween.flipped;\n              break;\n            case AnimationStatus.completed:\n              assert(false); // Unreachable.\n              break;\n          }\n          assert(colorTween != null);\n          assert(closedOpacityTween != null);\n          assert(openOpacityTween != null);\n\n          final Rect rect = _rectTween.evaluate(curvedAnimation)!;\n          return SizedBox.expand(\n            child: Align(\n              alignment: Alignment.topLeft,\n              child: Transform.translate(\n                offset: Offset(rect.left, rect.top),\n                child: SizedBox(\n                  width: rect.width,\n                  height: rect.height,\n                  child: Material(\n                    clipBehavior: Clip.antiAlias,\n                    animationDuration: Duration.zero,\n                    color: colorTween!.evaluate(animation),\n                    child: Stack(\n                      fit: StackFit.passthrough,\n                      children: <Widget>[\n                        // Closed child fading out.\n                        FittedBox(\n                          fit: BoxFit.fitWidth,\n                          alignment: Alignment.topLeft,\n                          child: SizedBox(\n                            width: _rectTween.begin!.width,\n                            height: _rectTween.begin!.height,\n                            child: (hideableKey.currentState?.isInTree ?? false)\n                                ? null\n                                : FadeTransition(\n                                    opacity: closedOpacityTween!.animate(\n                                      animation,\n                                    ),\n                                    child: Builder(\n                                      key: closedBuilderKey,\n                                      builder: (BuildContext context) {\n                                        // Use dummy \"open container\" callback\n                                        // since we are in the process of opening.\n                                        return closedBuilder(context, () {});\n                                      },\n                                    ),\n                                  ),\n                          ),\n                        ),\n                        // Open child fading in.\n                        OverflowBox(\n                          maxWidth: _rectTween.end!.width,\n                          maxHeight: _rectTween.end!.height,\n                          alignment: Alignment.topLeft,\n                          child: FadeTransition(\n                            opacity: openOpacityTween!.animate(animation),\n                            child: Builder(\n                              key: _openBuilderKey,\n                              builder: (BuildContext context) {\n                                return openBuilder(context, closeContainer);\n                              },\n                            ),\n                          ),\n                        ),\n                      ],\n                    ),\n                  ),\n                ),\n              ),\n            ),\n          );\n        },\n      ),\n    );\n  }\n\n  @override\n  bool get maintainState => true;\n\n  @override\n  Color? get barrierColor => null;\n\n  @override\n  bool get opaque => true;\n\n  @override\n  bool get barrierDismissible => false;\n\n  @override\n  String? get barrierLabel => null;\n}\n\nclass _FlippableTweenSequence<T> extends TweenSequence<T> {\n  _FlippableTweenSequence(this._items) : super(_items);\n\n  final List<TweenSequenceItem<T>> _items;\n  _FlippableTweenSequence<T>? _flipped;\n\n  _FlippableTweenSequence<T>? get flipped {\n    if (_flipped == null) {\n      final List<TweenSequenceItem<T>> newItems = <TweenSequenceItem<T>>[];\n      for (int i = 0; i < _items.length; i++) {\n        newItems.add(\n          TweenSequenceItem<T>(\n            tween: _items[i].tween,\n            weight: _items[_items.length - 1 - i].weight,\n          ),\n        );\n      }\n      _flipped = _FlippableTweenSequence<T>(newItems);\n    }\n    return _flipped;\n  }\n}\n"
  },
  {
    "path": "lib/widgets/palette.dart",
    "content": "import 'dart:math' as math;\n\nimport 'package:flutter/gestures.dart';\nimport 'package:flutter/material.dart';\n\n@immutable\nclass Palette extends StatefulWidget {\n  const Palette({super.key, required this.controller});\n\n  final ValueNotifier<Color> controller;\n\n  @override\n  State<Palette> createState() => _PaletteState();\n}\n\nclass _PaletteState extends State<Palette> {\n  final double _thickness = 20;\n  final double _radius = 4;\n  final double _padding = 8;\n  final GlobalKey renderBoxKey = GlobalKey();\n  bool isSquare = false;\n  bool isTrack = false;\n  late double colorHue;\n  late double colorSaturation;\n  late double colorValue;\n\n  late FocusNode _focusNode;\n\n  Color get value => widget.controller.value;\n\n  HSVColor get color => HSVColor.fromColor(value);\n\n  @override\n  void initState() {\n    super.initState();\n    colorHue = color.hue;\n    colorSaturation = color.saturation;\n    colorValue = color.value;\n    _focusNode = FocusNode();\n  }\n\n  void _handleChange() {\n    widget.controller.value = HSVColor.fromAHSV(\n      color.alpha,\n      colorHue,\n      colorSaturation,\n      colorValue,\n    ).toColor();\n  }\n\n  @override\n  void dispose() {\n    _focusNode.dispose();\n    super.dispose();\n  }\n\n  double trackRadius(Size size) =>\n      math.min(size.width, size.height) / 2 - _thickness;\n\n  static double squareRadius(double radius, double trackSquarePadding) =>\n      (radius - trackSquarePadding) / math.sqrt(2);\n\n  void onStart(Offset offset) {\n    final RenderBox renderBox =\n        renderBoxKey.currentContext!.findRenderObject()! as RenderBox;\n    final size = renderBox.size;\n    final radius = trackRadius(size);\n    final radiusOuter = radius + _thickness;\n    final effectiveSquareRadius = squareRadius(radius, _padding);\n    final startPosition = renderBox.localToGlobal(Offset.zero);\n    final center = Offset(size.width / 2, size.height / 2);\n    final vector = offset - startPosition - center;\n    final vectorLength = _Computer.vectorLength(vector);\n    isSquare =\n        vector.dx.abs() < effectiveSquareRadius &&\n        vector.dy.abs() < effectiveSquareRadius;\n    isTrack = vectorLength >= radius && vectorLength <= radiusOuter;\n    if (isSquare) {\n      colorSaturation = _Computer.vectorToSaturation(\n        vector.dx,\n        effectiveSquareRadius,\n      ).clamp(0.0, 1.0);\n      colorValue = _Computer.vectorToValue(\n        vector.dy,\n        effectiveSquareRadius,\n      ).clamp(0.0, 1.0);\n      _handleChange();\n    } else if (isTrack) {\n      colorHue = _Computer.vectorToHue(vector);\n      _handleChange();\n    } else {\n      isTrack = false;\n      isSquare = false;\n    }\n  }\n\n  void onUpdate(Offset offset) {\n    final RenderBox renderBox =\n        renderBoxKey.currentContext!.findRenderObject()! as RenderBox;\n    final size = renderBox.size;\n    final radius = trackRadius(size);\n    final effectiveSquareRadius = squareRadius(radius, _padding);\n    final startPosition = renderBox.localToGlobal(Offset.zero);\n    final center = Offset(size.width / 2, size.height / 2);\n    final vector = offset - startPosition - center;\n    if (isSquare) {\n      isTrack = false;\n      colorSaturation = _Computer.vectorToSaturation(\n        vector.dx,\n        effectiveSquareRadius,\n      ).clamp(0.0, 1.0);\n      colorValue = _Computer.vectorToValue(\n        vector.dy,\n        effectiveSquareRadius,\n      ).clamp(0.0, 1.0);\n\n      _handleChange();\n    } else if (isTrack) {\n      isSquare = false;\n      colorHue = _Computer.vectorToHue(vector);\n      _handleChange();\n    } else {\n      isTrack = false;\n      isSquare = false;\n    }\n  }\n\n  void onEnd() {\n    isTrack = false;\n    isSquare = false;\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return ValueListenableBuilder(\n      valueListenable: widget.controller,\n      builder: (_, _, _) {\n        return GestureDetector(\n          dragStartBehavior: DragStartBehavior.down,\n          onVerticalDragDown: (DragDownDetails details) =>\n              onStart(details.globalPosition),\n          onVerticalDragUpdate: (DragUpdateDetails details) =>\n              onUpdate(details.globalPosition),\n          onHorizontalDragUpdate: (DragUpdateDetails details) =>\n              onUpdate(details.globalPosition),\n          onVerticalDragEnd: (DragEndDetails details) => onEnd(),\n          onHorizontalDragEnd: (DragEndDetails details) => onEnd(),\n          onTapUp: (TapUpDetails details) => onEnd(),\n          child: SizedBox(\n            key: renderBoxKey,\n            child: Focus(\n              focusNode: _focusNode,\n              child: MouseRegion(\n                cursor: WidgetStateMouseCursor.clickable,\n                child: Stack(\n                  fit: StackFit.expand,\n                  children: <Widget>[\n                    RepaintBoundary(\n                      child: CustomPaint(\n                        painter: _ShadePainter(\n                          colorHue: colorHue,\n                          colorSaturation: colorSaturation,\n                          colorValue: colorValue,\n                          thickness: _thickness,\n                          padding: _padding,\n                          trackBorderRadius: _radius,\n                        ),\n                      ),\n                    ),\n                    CustomPaint(\n                      painter: _ShadeThumbPainter(\n                        colorSaturation: colorSaturation,\n                        colorValue: colorValue,\n                        thickness: _thickness,\n                        padding: _padding,\n                      ),\n                    ),\n                    RepaintBoundary(\n                      child: CustomPaint(\n                        painter: _TrackPainter(\n                          thickness: _thickness,\n                          ticks: 360,\n                        ),\n                      ),\n                    ),\n                    CustomPaint(\n                      painter: _TrackThumbPainter(\n                        colorHue: colorHue,\n                        thickness: _thickness,\n                      ),\n                    ),\n                  ],\n                ),\n              ),\n            ),\n          ),\n        );\n      },\n    );\n  }\n}\n\nclass _ShadePainter extends CustomPainter {\n  const _ShadePainter({\n    required this.colorHue,\n    required this.colorSaturation,\n    required this.colorValue,\n    required this.thickness,\n    required this.padding,\n    required this.trackBorderRadius,\n  }) : super();\n\n  final double colorHue;\n  final double colorSaturation;\n  final double colorValue;\n\n  final double thickness;\n  final double padding;\n  final double trackBorderRadius;\n\n  static double trackRadius(Size size, double trackWidth) =>\n      math.min(size.width, size.height) / 2 - trackWidth / 2;\n\n  static double squareRadius(\n    double radius,\n    double trackWidth,\n    double padding,\n  ) => (radius - trackWidth / 2 - padding) / math.sqrt(2);\n\n  @override\n  void paint(Canvas canvas, Size size) {\n    final Offset center = Offset(size.width / 2, size.height / 2);\n    final double radius = trackRadius(size, thickness);\n    final double effectiveSquareRadius = squareRadius(\n      radius,\n      thickness,\n      padding,\n    );\n\n    final Rect rectBox = Rect.fromLTWH(\n      center.dx - effectiveSquareRadius,\n      center.dy - effectiveSquareRadius,\n      effectiveSquareRadius * 2,\n      effectiveSquareRadius * 2,\n    );\n    final RSuperellipse rSuperellipse = RSuperellipse.fromRectAndRadius(\n      rectBox,\n      Radius.circular(trackBorderRadius),\n    );\n\n    final Shader horizontal = LinearGradient(\n      colors: <Color>[\n        Colors.white,\n        HSVColor.fromAHSV(1, colorHue, 1, 1).toColor(),\n      ],\n    ).createShader(rectBox);\n    canvas.drawRSuperellipse(\n      rSuperellipse,\n      Paint()\n        ..style = PaintingStyle.fill\n        ..shader = horizontal,\n    );\n\n    final Shader vertical = const LinearGradient(\n      begin: Alignment.topCenter,\n      end: Alignment.bottomCenter,\n      colors: <Color>[Colors.transparent, Colors.black],\n    ).createShader(rectBox);\n    canvas.drawRSuperellipse(\n      rSuperellipse,\n      Paint()\n        ..style = PaintingStyle.fill\n        ..shader = vertical,\n    );\n  }\n\n  @override\n  bool shouldRepaint(_ShadePainter oldDelegate) {\n    return oldDelegate.thickness != thickness ||\n        oldDelegate.padding != padding ||\n        oldDelegate.trackBorderRadius != trackBorderRadius ||\n        oldDelegate.colorHue != colorHue ||\n        oldDelegate.colorSaturation != colorSaturation ||\n        oldDelegate.colorValue != colorValue;\n  }\n}\n\nclass _TrackPainter extends CustomPainter {\n  const _TrackPainter({this.ticks = 360, required this.thickness}) : super();\n  final int ticks;\n  final double thickness;\n\n  @override\n  void paint(Canvas canvas, Size size) {\n    final Offset center = Offset(size.width / 2, size.height / 2);\n\n    const double rads = (2 * math.pi) / 360;\n    const double step = 1;\n    const double aliasing = 0.5;\n\n    final double shortestRectSide = math.min(size.width, size.height);\n\n    final Rect rectCircle = Rect.fromCenter(\n      center: center,\n      width: shortestRectSide - thickness,\n      height: shortestRectSide - thickness,\n    );\n\n    for (int i = 0; i < ticks; i++) {\n      final double sRad = (i - aliasing) * rads;\n      final double eRad = (i + step) * rads;\n      final Paint segmentPaint = Paint()\n        ..color = HSVColor.fromAHSV(1, i.toDouble(), 1, 1).toColor()\n        ..style = PaintingStyle.stroke\n        ..strokeWidth = thickness;\n      canvas.drawArc(rectCircle, sRad, sRad - eRad, false, segmentPaint);\n    }\n  }\n\n  @override\n  bool shouldRepaint(_TrackPainter oldDelegate) {\n    return oldDelegate.thickness != thickness || oldDelegate.ticks != ticks;\n  }\n}\n\nclass _ShadeThumbPainter extends CustomPainter {\n  const _ShadeThumbPainter({\n    required this.colorSaturation,\n    required this.colorValue,\n    required this.thickness,\n    required this.padding,\n  }) : super();\n\n  final double colorSaturation;\n  final double colorValue;\n  final double thickness;\n  final double padding;\n\n  static double trackRadius(Size size, double thickness) =>\n      math.min(size.width, size.height) / 2 - thickness / 2;\n\n  static double squareRadius(\n    double radius,\n    double thickness,\n    double trackSquarePadding,\n  ) => (radius - thickness / 2 - trackSquarePadding) / math.sqrt(2);\n\n  @override\n  void paint(Canvas canvas, Size size) {\n    final Offset center = Offset(size.width / 2, size.height / 2);\n    final double radius = trackRadius(size, thickness);\n    final double effectiveSquareRadius = squareRadius(\n      radius,\n      thickness,\n      padding,\n    );\n\n    final Paint paintBlack = Paint()\n      ..color = Colors.black\n      ..strokeWidth = 5\n      ..style = PaintingStyle.stroke;\n    final Paint paintWhite = Paint()\n      ..color = Colors.white\n      ..strokeWidth = 3\n      ..style = PaintingStyle.stroke;\n\n    final double paletteX = _Computer.saturationToVector(\n      colorSaturation,\n      effectiveSquareRadius,\n      center.dx,\n    );\n    final double paletteY = _Computer.valueToVector(\n      colorValue,\n      effectiveSquareRadius,\n      center.dy,\n    );\n    final Offset paletteVector = Offset(paletteX, paletteY);\n    canvas.drawCircle(paletteVector, 12, paintBlack);\n    canvas.drawCircle(paletteVector, 12, paintWhite);\n  }\n\n  @override\n  bool shouldRepaint(_ShadeThumbPainter oldDelegate) {\n    return oldDelegate.thickness != thickness ||\n        oldDelegate.colorSaturation != colorSaturation ||\n        oldDelegate.colorValue != colorValue ||\n        oldDelegate.padding != padding;\n  }\n}\n\nclass _TrackThumbPainter extends CustomPainter {\n  const _TrackThumbPainter({required this.colorHue, required this.thickness})\n    : super();\n\n  final double colorHue;\n  final double thickness;\n\n  static double trackRadius(Size size, double thickness) =>\n      math.min(size.width, size.height) / 2 - thickness / 2;\n\n  @override\n  void paint(Canvas canvas, Size size) {\n    final Offset center = Offset(size.width / 2, size.height / 2);\n    final double radius = trackRadius(size, thickness);\n    final Paint paintBlack = Paint()\n      ..color = Colors.black\n      ..strokeWidth = 5\n      ..style = PaintingStyle.stroke;\n    final Paint paintWhite = Paint()\n      ..color = Colors.white\n      ..strokeWidth = 3\n      ..style = PaintingStyle.stroke;\n    final Offset track = _Computer.hueToVector(\n      (colorHue + 360.0) * math.pi / 180.0,\n      radius,\n      center,\n    );\n    canvas.drawCircle(track, thickness / 2 + 4, paintBlack);\n    canvas.drawCircle(track, thickness / 2 + 4, paintWhite);\n  }\n\n  @override\n  bool shouldRepaint(_TrackThumbPainter oldDelegate) {\n    return oldDelegate.thickness != thickness ||\n        oldDelegate.colorHue != colorHue;\n  }\n}\n\nclass _Computer {\n  static double vectorLength(Offset vector) =>\n      math.sqrt(vector.dx * vector.dx + vector.dy * vector.dy);\n\n  static double vectorToHue(Offset vector) =>\n      (((math.atan2(vector.dy, vector.dx)) * 180.0 / math.pi) + 360.0) % 360.0;\n\n  static double vectorToSaturation(double vectorX, double squareRadius) =>\n      vectorX * 0.5 / squareRadius + 0.5;\n\n  static double vectorToValue(double vectorY, double squareRadius) =>\n      0.5 - vectorY * 0.5 / squareRadius;\n\n  static Offset hueToVector(double h, double radius, Offset center) => Offset(\n    math.cos(h) * radius + center.dx,\n    math.sin(h) * radius + center.dy,\n  );\n\n  static double saturationToVector(\n    double s,\n    double squareRadius,\n    double centerX,\n  ) => (s - 0.5) * squareRadius / 0.5 + centerX;\n\n  static double valueToVector(double l, double squareRadius, double centerY) =>\n      (0.5 - l) * squareRadius / 0.5 + centerY;\n}\n"
  },
  {
    "path": "lib/widgets/pop_scope.dart",
    "content": "import 'dart:async';\n\nimport 'package:fl_clash/controller.dart';\nimport 'package:flutter/widgets.dart';\n\nclass CommonPopScope extends StatelessWidget {\n  final Widget child;\n  final FutureOr<bool> Function(BuildContext context)? onPop;\n  final FutureOr<void> Function()? onPopSuccess;\n\n  const CommonPopScope({\n    super.key,\n    required this.child,\n    this.onPop,\n    this.onPopSuccess,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return PopScope(\n      canPop: onPop == null ? true : false,\n      onPopInvokedWithResult: onPop == null\n          ? null\n          : (didPop, _) async {\n              if (didPop) {\n                return;\n              }\n              final res = await onPop!(context);\n              if (!context.mounted) {\n                return;\n              }\n              if (!res) {\n                return;\n              }\n              Navigator.of(context).pop();\n              if (onPopSuccess != null) {\n                await onPopSuccess!();\n              }\n            },\n      child: child,\n    );\n  }\n}\n\nclass SystemBackBlock extends StatefulWidget {\n  final Widget child;\n\n  const SystemBackBlock({super.key, required this.child});\n\n  @override\n  State<SystemBackBlock> createState() => _SystemBackBlockState();\n}\n\nclass _SystemBackBlockState extends State<SystemBackBlock> {\n  @override\n  void initState() {\n    super.initState();\n    WidgetsBinding.instance.addPostFrameCallback((_) {\n      appController.backBlock();\n    });\n  }\n\n  @override\n  void dispose() {\n    super.dispose();\n    WidgetsBinding.instance.addPostFrameCallback((_) {\n      appController.unBackBlock();\n    });\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return widget.child;\n  }\n}\n"
  },
  {
    "path": "lib/widgets/popup.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/models/common.dart';\nimport 'package:flutter/material.dart';\n\nimport 'animated_cross_slide.dart';\n\nclass CommonPopupRoute<T> extends PopupRoute<T> {\n  final WidgetBuilder builder;\n  ValueNotifier<Offset> offsetNotifier;\n\n  CommonPopupRoute({\n    required this.barrierLabel,\n    required this.builder,\n    required this.offsetNotifier,\n  });\n\n  @override\n  String? barrierLabel;\n\n  @override\n  Color? get barrierColor => null;\n\n  @override\n  bool get barrierDismissible => true;\n\n  @override\n  Widget buildPage(\n    BuildContext context,\n    Animation<double> animation,\n    Animation<double> secondaryAnimation,\n  ) {\n    return builder(context);\n  }\n\n  @override\n  Widget buildTransitions(\n    BuildContext context,\n    Animation<double> animation,\n    Animation<double> secondaryAnimation,\n    Widget child,\n  ) {\n    final align = Alignment.topRight;\n    final curveAnimation = animation\n        .drive(Tween(begin: 0.0, end: 1.0))\n        .drive(CurveTween(curve: Curves.easeOutBack));\n    return SafeArea(\n      child: ValueListenableBuilder(\n        valueListenable: offsetNotifier,\n        builder: (_, value, child) {\n          return Align(\n            alignment: align,\n            child: CustomSingleChildLayout(\n              delegate: OverflowAwareLayoutDelegate(\n                offset: value.translate(48, -8),\n              ),\n              child: child,\n            ),\n          );\n        },\n        child: AnimatedBuilder(\n          animation: animation,\n          builder: (_, child) {\n            return FadeTransition(\n              opacity: curveAnimation,\n              child: ScaleTransition(\n                alignment: align,\n                scale: curveAnimation,\n                child: SlideTransition(\n                  position: curveAnimation.drive(\n                    Tween(begin: const Offset(0, -0.02), end: Offset.zero),\n                  ),\n                  child: child,\n                ),\n              ),\n            );\n          },\n          child: builder(context),\n        ),\n      ),\n    );\n  }\n\n  @override\n  Duration get transitionDuration => const Duration(milliseconds: 250);\n}\n\nclass PopupController extends ValueNotifier<bool> {\n  PopupController() : super(false);\n\n  void open() {\n    value = true;\n  }\n\n  void close() {\n    value = false;\n  }\n}\n\ntypedef PopupOpen = Function({Offset offset});\n\nclass CommonPopupBox extends StatefulWidget {\n  final Widget Function(PopupOpen open) targetBuilder;\n  final Widget popup;\n\n  const CommonPopupBox({\n    super.key,\n    required this.targetBuilder,\n    required this.popup,\n  });\n\n  @override\n  State<CommonPopupBox> createState() => _CommonPopupBoxState();\n}\n\nclass _CommonPopupBoxState extends State<CommonPopupBox> {\n  bool _isOpen = false;\n  final _targetOffsetValueNotifier = ValueNotifier<Offset>(Offset.zero);\n  Offset _offset = Offset.zero;\n\n  void _open({Offset offset = Offset.zero}) {\n    _offset = offset;\n    _updateOffset();\n    _isOpen = true;\n    Navigator.of(context)\n        .push(\n          CommonPopupRoute(\n            barrierLabel: utils.id,\n            builder: (BuildContext context) {\n              return widget.popup;\n            },\n            offsetNotifier: _targetOffsetValueNotifier,\n          ),\n        )\n        .then((_) {\n          _isOpen = false;\n        });\n  }\n\n  void _updateOffset() {\n    final renderBox = context.findRenderObject() as RenderBox?;\n    if (renderBox == null) {\n      return;\n    }\n    final viewPadding = MediaQuery.of(context).viewPadding;\n    _targetOffsetValueNotifier.value = renderBox\n        .localToGlobal(\n          Offset.zero.translate(viewPadding.right, viewPadding.top),\n        )\n        .translate(_offset.dx, _offset.dy);\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return LayoutBuilder(\n      builder: (_, _) {\n        WidgetsBinding.instance.addPostFrameCallback((_) {\n          if (_isOpen) {\n            _updateOffset();\n          }\n        });\n        return widget.targetBuilder(_open);\n      },\n    );\n  }\n}\n\nclass OverflowAwareLayoutDelegate extends SingleChildLayoutDelegate {\n  final Offset offset;\n\n  OverflowAwareLayoutDelegate({required this.offset});\n\n  @override\n  Size getSize(BoxConstraints constraints) {\n    return Size(constraints.maxWidth, constraints.maxHeight);\n  }\n\n  @override\n  Offset getPositionForChild(Size size, Size childSize) {\n    final safeOffset = Offset(16, 16);\n    double x = (offset.dx - childSize.width).clamp(\n      0,\n      size.width - safeOffset.dx - childSize.width,\n    );\n    double y = (offset.dy).clamp(\n      0,\n      size.height - safeOffset.dy - childSize.height,\n    );\n    return Offset(x, y);\n  }\n\n  @override\n  bool shouldRelayout(covariant OverflowAwareLayoutDelegate oldDelegate) {\n    return oldDelegate.offset != offset;\n  }\n}\n\nclass CommonPopupMenu extends StatelessWidget {\n  final List<PopupMenuItemData> items;\n  final double minWidth;\n  final double minItemVerticalPadding;\n  final double fontSize;\n\n  const CommonPopupMenu({\n    super.key,\n    required this.items,\n    this.minWidth = 200,\n    this.minItemVerticalPadding = 16,\n    this.fontSize = 15,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return Card(\n      elevation: 12,\n      color: context.colorScheme.surfaceContainer,\n      clipBehavior: Clip.antiAlias,\n      shape: RoundedSuperellipseBorder(borderRadius: BorderRadius.circular(14)),\n      child: IntrinsicWidth(\n        child: _CommonPopupMenuItems(\n          items: items,\n          minWidth: minWidth,\n          minItemVerticalPadding: minItemVerticalPadding,\n          fontSize: fontSize,\n        ),\n      ),\n    );\n  }\n}\n\nclass _CommonPopupMenuItems extends StatefulWidget {\n  final List<PopupMenuItemData> items;\n  final double minWidth;\n  final double minItemVerticalPadding;\n  final double fontSize;\n\n  const _CommonPopupMenuItems({\n    required this.items,\n    required this.minWidth,\n    required this.minItemVerticalPadding,\n    required this.fontSize,\n  });\n\n  @override\n  State<_CommonPopupMenuItems> createState() => _CommonPopupMenuItemsState();\n}\n\nclass _CommonPopupMenuItemsState extends State<_CommonPopupMenuItems> {\n  List<PopupMenuItemData> _nextItems = [];\n  String? _subTitle;\n  bool _status = false;\n\n  Widget _popupMenuItem(\n    BuildContext context, {\n    required PopupMenuItemData item,\n    required int index,\n  }) {\n    final onPressed = item.subItems.isNotEmpty\n        ? () {\n            _nextItems = item.subItems;\n            _subTitle = item.label;\n            setState(() {\n              _status = true;\n            });\n          }\n        : item.onPressed;\n    final disabled = onPressed == null;\n    final color = item.danger\n        ? context.colorScheme.onError\n        : context.colorScheme.onSurface;\n    final foregroundColor = disabled ? color.opacity30 : color;\n    final backgroundColor = item.danger\n        ? context.colorScheme.error\n        : context.colorScheme.surfaceContainer;\n    return TextButton(\n      style: TextButton.styleFrom(\n        padding: EdgeInsets.zero,\n        shape: LinearBorder.none,\n        foregroundColor: foregroundColor,\n        backgroundColor: backgroundColor,\n      ),\n      onPressed: onPressed != null\n          ? () {\n              if (item.subItems.isEmpty) {\n                Navigator.of(context).pop();\n              }\n              onPressed();\n            }\n          : null,\n      child: Container(\n        constraints: BoxConstraints(minWidth: widget.minWidth),\n        padding: EdgeInsets.only(\n          left: 16,\n          right: 64,\n          top: widget.minItemVerticalPadding,\n          bottom: widget.minItemVerticalPadding,\n        ),\n        child: Row(\n          mainAxisSize: MainAxisSize.max,\n          children: [\n            if (item.icon != null) ...[\n              Icon(\n                item.icon,\n                size: widget.fontSize + 4,\n                color: foregroundColor,\n              ),\n              SizedBox(width: 16),\n            ],\n            Flexible(\n              child: Text(\n                item.label,\n                style: context.textTheme.bodyMedium?.copyWith(\n                  color: foregroundColor,\n                  fontSize: widget.fontSize,\n                ),\n              ),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n\n  Widget _buildItems(List<PopupMenuItemData> items) {\n    return Column(\n      mainAxisSize: MainAxisSize.min,\n      crossAxisAlignment: CrossAxisAlignment.start,\n      children: [\n        for (final item in items.asMap().entries) ...[\n          _popupMenuItem(context, item: item.value, index: item.key),\n          if (item.value != items.last) Divider(height: 0),\n        ],\n      ],\n    );\n  }\n\n  Widget _buildSubMenu() {\n    return Column(\n      mainAxisSize: MainAxisSize.min,\n      crossAxisAlignment: CrossAxisAlignment.start,\n      children: [\n        Padding(\n          padding: EdgeInsets.only(left: 8, top: 6, bottom: 2),\n          child: Row(\n            spacing: 4,\n            children: [\n              IconButton(\n                icon: Icon(\n                  Icons.arrow_back_outlined,\n                  color: context.colorScheme.onSurfaceVariant.opacity80,\n                ),\n                onPressed: () {\n                  setState(() {\n                    _status = false;\n                  });\n                },\n                iconSize: 18,\n                style: ButtonStyle(\n                  tapTargetSize: MaterialTapTargetSize.shrinkWrap,\n                  minimumSize: WidgetStatePropertyAll(Size.zero),\n                  padding: WidgetStatePropertyAll(EdgeInsets.all(8)),\n                ),\n              ),\n              if (_subTitle != null)\n                Text(\n                  _subTitle!,\n                  style: context.textTheme.bodySmall?.copyWith(\n                    color: context.colorScheme.onSurfaceVariant.opacity80,\n                  ),\n                ),\n            ],\n          ),\n        ),\n        _CommonPopupMenuItems(\n          items: _nextItems,\n          minWidth: widget.minWidth,\n          minItemVerticalPadding: widget.minItemVerticalPadding,\n          fontSize: widget.fontSize,\n        ),\n      ],\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return AnimatedCrossSlide(\n      secondCurve: Curves.easeOut,\n      firstChild: _buildItems(widget.items),\n      secondChild: _nextItems.isEmpty ? Container() : _buildSubMenu(),\n      crossSlideState: _status\n          ? CrossSlideState.showSecond\n          : CrossSlideState.showFirst,\n      duration: Duration(milliseconds: 250),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/scaffold.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:fl_clash/widgets/pop_scope.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/rendering.dart';\n\nimport 'chip.dart';\nimport 'inherited.dart';\n\ntypedef OnKeywordsUpdateCallback = void Function(List<String> keywords);\n\ntypedef AppBarSearchStateBuilder =\n    AppBarSearchState? Function(AppBarSearchState? state);\n\nclass CommonScaffold extends StatefulWidget {\n  final AppBar? appBar;\n  final Widget body;\n  final Color? backgroundColor;\n  final String? title;\n  final bool isLoading;\n  final List<Widget>? actions;\n  final bool? centerTitle;\n  final Widget? floatingActionButton;\n  final AppBarEditState? editState;\n  final AppBarSearchState? searchState;\n  final OnKeywordsUpdateCallback? onKeywordsUpdate;\n  final bool? resizeToAvoidBottomInset;\n\n  const CommonScaffold({\n    super.key,\n    this.appBar,\n    required this.body,\n    this.backgroundColor,\n    this.title,\n    this.actions,\n    this.centerTitle,\n    this.editState,\n    this.isLoading = false,\n    this.searchState,\n    this.floatingActionButton,\n    this.onKeywordsUpdate,\n    this.resizeToAvoidBottomInset,\n  });\n\n  @override\n  State<CommonScaffold> createState() => CommonScaffoldState();\n}\n\nclass CommonScaffoldState extends State<CommonScaffold> {\n  late final ValueNotifier<AppBarState> _appBarState;\n  final ValueNotifier<bool> _loadingNotifier = ValueNotifier(false);\n  final ValueNotifier<bool> _isFabExtendedNotifier = ValueNotifier(true);\n  final ValueNotifier<List<String>> _keywordsNotifier = ValueNotifier([]);\n  final _textController = TextEditingController();\n\n  bool get _isSearch {\n    return _appBarState.value.searchState?.query != null;\n  }\n\n  bool get _isEdit {\n    final editState = _appBarState.value.editState;\n    if (editState == null) {\n      return false;\n    }\n    return editState.editCount > 0;\n  }\n\n  @override\n  void initState() {\n    super.initState();\n    _appBarState = ValueNotifier(\n      AppBarState(editState: widget.editState, searchState: widget.searchState),\n    );\n    _loadingNotifier.value = widget.isLoading;\n  }\n\n  Future<void> _updateSearchState(AppBarSearchStateBuilder builder) async {\n    _appBarState.value = _appBarState.value.copyWith(\n      searchState: builder(_appBarState.value.searchState),\n    );\n  }\n\n  void handleToSearch() {\n    _updateSearchState((state) => state?.copyWith(query: ''));\n  }\n\n  Widget _buildSearchingAppBarTheme(Widget child) {\n    final ThemeData theme = Theme.of(context);\n    final ColorScheme colorScheme = theme.colorScheme;\n    return Theme(\n      data: theme.copyWith(\n        appBarTheme: theme.appBarTheme.copyWith(\n          backgroundColor: colorScheme.brightness == Brightness.dark\n              ? Colors.grey[900]\n              : Colors.white,\n          iconTheme: theme.primaryIconTheme.copyWith(color: Colors.grey),\n          titleTextStyle: theme.textTheme.titleLarge,\n          toolbarTextStyle: theme.textTheme.bodyMedium,\n        ),\n        inputDecorationTheme: InputDecorationTheme(\n          hintStyle: theme.inputDecorationTheme.hintStyle,\n          border: InputBorder.none,\n        ),\n      ),\n      child: child,\n    );\n  }\n\n  @override\n  void didUpdateWidget(CommonScaffold oldWidget) {\n    super.didUpdateWidget(oldWidget);\n    if (oldWidget.editState != widget.editState) {\n      _appBarState.value = _appBarState.value.copyWith(\n        editState: widget.editState,\n      );\n    }\n    if (oldWidget.searchState != widget.searchState) {\n      _appBarState.value = _appBarState.value.copyWith(\n        searchState: widget.searchState,\n      );\n    }\n    if (oldWidget.isLoading != widget.isLoading) {\n      _loadingNotifier.value = widget.isLoading;\n    }\n  }\n\n  void _handleClearInput() {\n    _textController.text = '';\n    if (_appBarState.value.searchState != null) {\n      _appBarState.value.searchState!.onSearch('');\n    }\n  }\n\n  void _handleClear() {\n    if (_textController.text.isNotEmpty) {\n      _handleClearInput();\n      return;\n    }\n    _updateSearchState((state) => state?.copyWith(query: null));\n  }\n\n  void handleExitSearching() {\n    if (!_isSearch) {\n      return;\n    }\n    _handleClearInput();\n    _updateSearchState((state) => state?.copyWith(query: null));\n  }\n\n  @override\n  void dispose() {\n    _appBarState.dispose();\n    _textController.dispose();\n    _isFabExtendedNotifier.dispose();\n    _loadingNotifier.dispose();\n    super.dispose();\n  }\n\n  void addKeyword(String keyword) {\n    final isContains = _keywordsNotifier.value.contains(keyword);\n    if (isContains) return;\n    final keywords = List<String>.from(_keywordsNotifier.value)..add(keyword);\n    _keywordsNotifier.value = keywords;\n  }\n\n  void _deleteKeyword(String keyword) {\n    final isContains = _keywordsNotifier.value.contains(keyword);\n    if (!isContains) return;\n    final keywords = List<String>.from(_keywordsNotifier.value)\n      ..remove(keyword);\n    _keywordsNotifier.value = keywords;\n  }\n\n  Widget? _buildLeading(VoidCallback? backAction) {\n    if (_isEdit) {\n      return IconButton(\n        onPressed: _appBarState.value.editState?.onExit,\n        icon: Icon(Icons.close),\n      );\n    }\n    if (_isSearch) {\n      return IconButton(\n        onPressed: handleExitSearching,\n        icon: Icon(Icons.arrow_back),\n      );\n    }\n    return backAction != null\n        ? BackButton(\n            onPressed: () {\n              if (!mounted) {\n                return;\n              }\n              backAction();\n            },\n          )\n        : null;\n  }\n\n  Widget _buildTitle(AppBarSearchState? startState) {\n    return _isSearch\n        ? TextField(\n            autofocus: true,\n            controller: _textController,\n            style: context.textTheme.titleLarge,\n            onChanged: (value) {\n              if (startState != null) {\n                startState.onSearch(value);\n              }\n            },\n            decoration: InputDecoration(hintText: appLocalizations.search),\n          )\n        : Text(\n            !_isEdit\n                ? widget.title!\n                : appLocalizations.selectedCountTitle(\n                    '${_appBarState.value.editState?.editCount ?? 0}',\n                  ),\n          );\n  }\n\n  List<Widget> _buildActions(bool hasSearch, List<Widget> actions) {\n    if (_isSearch) {\n      return genActions([\n        IconButton(onPressed: _handleClear, icon: Icon(Icons.close)),\n      ]);\n    }\n    return genActions([\n      if (hasSearch && widget.searchState?.autoAddSearch == true)\n        IconButton(\n          onPressed: () {\n            _updateSearchState((state) => state?.copyWith(query: ''));\n          },\n          icon: Icon(Icons.search),\n        ),\n      ...actions,\n    ]);\n  }\n\n  Widget _buildAppBarWrap(Widget child) {\n    final appBar = _isSearch ? _buildSearchingAppBarTheme(child) : child;\n    if (_isEdit || _isSearch) {\n      return SystemBackBlock(\n        child: CommonPopScope(\n          onPop: (context) {\n            if (_isEdit || _isSearch) {\n              handleExitSearching();\n              _appBarState.value.editState?.onExit();\n              return false;\n            }\n            return true;\n          },\n          child: appBar,\n        ),\n      );\n    }\n    return appBar;\n  }\n\n  PreferredSizeWidget _buildAppBar(VoidCallback? backAction) {\n    return PreferredSize(\n      preferredSize: const Size.fromHeight(kToolbarHeight),\n      child: Stack(\n        alignment: Alignment.bottomCenter,\n        children: [\n          widget.appBar ??\n              ValueListenableBuilder<AppBarState>(\n                valueListenable: _appBarState,\n                builder: (_, state, _) {\n                  return _buildAppBarWrap(\n                    AppBar(\n                      automaticallyImplyLeading: backAction != null\n                          ? false\n                          : true,\n                      animateColor: true,\n                      centerTitle: widget.centerTitle ?? false,\n                      leading: _buildLeading(backAction),\n                      title: _buildTitle(state.searchState),\n                      actions: _buildActions(\n                        state.searchState != null,\n                        state.actions.isNotEmpty\n                            ? state.actions\n                            : widget.actions ?? [],\n                      ),\n                    ),\n                  );\n                },\n              ),\n          ValueListenableBuilder(\n            valueListenable: _loadingNotifier,\n            builder: (_, value, _) {\n              return value == true\n                  ? const LinearProgressIndicator()\n                  : Container();\n            },\n          ),\n        ],\n      ),\n    );\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    assert(widget.appBar != null || widget.title != null);\n    final backActionProvider = CommonScaffoldBackActionProvider.of(context);\n    final body = SafeArea(\n      child: Column(\n        crossAxisAlignment: CrossAxisAlignment.start,\n        children: [\n          ValueListenableBuilder(\n            valueListenable: _keywordsNotifier,\n            builder: (_, keywords, _) {\n              if (widget.onKeywordsUpdate != null) {\n                WidgetsBinding.instance.addPostFrameCallback((_) {\n                  widget.onKeywordsUpdate!(keywords);\n                });\n              }\n              if (keywords.isEmpty) {\n                return SizedBox();\n              }\n              return Padding(\n                padding: const EdgeInsets.symmetric(\n                  horizontal: 16,\n                  vertical: 16,\n                ),\n                child: Wrap(\n                  runSpacing: 8,\n                  spacing: 8,\n                  children: [\n                    for (final keyword in keywords)\n                      CommonChip(\n                        label: keyword,\n                        type: ChipType.delete,\n                        onPressed: () {\n                          _deleteKeyword(keyword);\n                        },\n                      ),\n                  ],\n                ),\n              );\n            },\n          ),\n          Expanded(child: widget.body),\n        ],\n      ),\n    );\n    return Scaffold(\n      appBar: _buildAppBar(backActionProvider?.backAction),\n      body: NotificationListener<UserScrollNotification>(\n        child: body,\n        onNotification: (notification) {\n          if (notification.direction == ScrollDirection.reverse) {\n            _isFabExtendedNotifier.value = false;\n          } else if (notification.direction == ScrollDirection.forward) {\n            _isFabExtendedNotifier.value = true;\n          }\n          return true;\n        },\n      ),\n      resizeToAvoidBottomInset: widget.resizeToAvoidBottomInset,\n      backgroundColor: widget.backgroundColor,\n      floatingActionButton: widget.floatingActionButton != null\n          ? ValueListenableBuilder<bool>(\n              valueListenable: _isFabExtendedNotifier,\n              builder: (_, isExtended, child) {\n                return CommonScaffoldFabExtendedProvider(\n                  isExtended: isExtended,\n                  child: child!,\n                );\n              },\n              child: widget.floatingActionButton,\n            )\n          : null,\n    );\n  }\n}\n\nList<Widget> genActions(List<Widget> actions, {double? space}) {\n  return <Widget>[\n    ...actions.separated(SizedBox(width: space ?? 4)),\n    SizedBox(width: 8),\n  ];\n}\n\nclass BaseScaffold extends StatelessWidget {\n  final String title;\n  final List<Widget> actions;\n  final Widget body;\n\n  const BaseScaffold({\n    super.key,\n    required this.title,\n    this.actions = const [],\n    required this.body,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonScaffold(body: body, title: title, actions: actions);\n  }\n}\n"
  },
  {
    "path": "lib/widgets/scroll.dart",
    "content": "import 'dart:async';\n\nimport 'package:collection/collection.dart';\nimport 'package:flutter/material.dart';\n\nclass CommonScrollBar extends StatelessWidget {\n  final ScrollController? controller;\n  final Widget child;\n  final bool trackVisibility;\n  final bool thumbVisibility;\n\n  const CommonScrollBar({\n    super.key,\n    required this.child,\n    required this.controller,\n    this.trackVisibility = false,\n    this.thumbVisibility = false,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return Scrollbar(\n      controller: controller,\n      thumbVisibility: thumbVisibility,\n      trackVisibility: trackVisibility,\n      thickness: 6,\n      radius: const Radius.circular(6),\n      interactive: true,\n      child: child,\n    );\n  }\n}\n\nclass ScrollToEndBox<T> extends StatefulWidget {\n  final ScrollController controller;\n  final List<T> dataSource;\n  final Widget child;\n  final bool enable;\n  final VoidCallback? onCancelToEnd;\n\n  const ScrollToEndBox({\n    super.key,\n    required this.child,\n    required this.controller,\n    required this.dataSource,\n    this.onCancelToEnd,\n    this.enable = true,\n  });\n\n  @override\n  State<ScrollToEndBox<T>> createState() => _ScrollToEndBoxState<T>();\n}\n\nclass _ScrollToEndBoxState<T> extends State<ScrollToEndBox<T>> {\n  final equals = ListEquality<T>();\n  bool _isFastToEnd = false;\n\n  @override\n  void initState() {\n    super.initState();\n  }\n\n  Future<bool> _handleTryToEnd() {\n    final completer = Completer<bool>();\n    WidgetsBinding.instance.addPostFrameCallback((_) async {\n      if (mounted &&\n          widget.controller.hasClients &&\n          widget.controller.position.pixels !=\n              widget.controller.position.maxScrollExtent) {\n        await widget.controller.animateTo(\n          duration: kThemeAnimationDuration,\n          widget.controller.position.maxScrollExtent,\n          curve: Curves.easeOut,\n        );\n      }\n      completer.complete(true);\n    });\n    return completer.future;\n  }\n\n  @override\n  void didUpdateWidget(ScrollToEndBox<T> oldWidget) {\n    super.didUpdateWidget(oldWidget);\n    if (widget.enable == true && oldWidget.enable != true) {\n      _handleFastToEnd();\n      return;\n    }\n    if (widget.enable &&\n        !equals.equals(oldWidget.dataSource, widget.dataSource)) {\n      _handleTryToEnd();\n    }\n  }\n\n  Future<void> _handleFastToEnd() async {\n    _isFastToEnd = true;\n    await _handleTryToEnd();\n    _isFastToEnd = false;\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return NotificationListener<UserScrollNotification>(\n      onNotification: (details) {\n        if (_isFastToEnd) {\n          return false;\n        }\n        if (widget.onCancelToEnd != null) {\n          widget.onCancelToEnd!();\n        }\n        return false;\n      },\n      child: widget.child,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/setting.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:flutter/material.dart';\n\nimport 'card.dart';\n\nclass SettingInfoCard extends StatelessWidget {\n  final Info info;\n  final bool? isSelected;\n  final VoidCallback onPressed;\n\n  const SettingInfoCard(\n    this.info, {\n    super.key,\n    this.isSelected,\n    required this.onPressed,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonCard(\n      isSelected: isSelected,\n      onPressed: onPressed,\n      child: Padding(\n        padding: const EdgeInsets.all(12),\n        child: Row(\n          mainAxisSize: MainAxisSize.min,\n          mainAxisAlignment: MainAxisAlignment.start,\n          children: [\n            Flexible(child: Icon(info.iconData)),\n            const SizedBox(width: 8),\n            Flexible(\n              child: Text(info.label, style: context.textTheme.bodyMedium),\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n\nclass SettingTextCard extends StatelessWidget {\n  final String text;\n  final bool? isSelected;\n  final VoidCallback onPressed;\n\n  const SettingTextCard(\n    this.text, {\n    super.key,\n    this.isSelected,\n    required this.onPressed,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return CommonCard(\n      onPressed: onPressed,\n      isSelected: isSelected,\n      child: Padding(\n        padding: const EdgeInsets.all(12),\n        child: Text(text, style: context.textTheme.bodyMedium),\n      ),\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/sheet.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/controller.dart';\nimport 'package:flutter/material.dart';\n\nimport 'scaffold.dart';\nimport 'side_sheet.dart';\n\n@immutable\nclass SheetProps {\n  final double? maxWidth;\n  final double? maxHeight;\n  final bool isScrollControlled;\n  final bool useSafeArea;\n  final bool blur;\n\n  const SheetProps({\n    this.maxWidth,\n    this.maxHeight,\n    this.useSafeArea = true,\n    this.isScrollControlled = false,\n    this.blur = true,\n  });\n}\n\n@immutable\nclass ExtendProps {\n  final double? maxWidth;\n  final bool useSafeArea;\n  final bool blur;\n  final bool forceFull;\n\n  const ExtendProps({\n    this.maxWidth,\n    this.useSafeArea = true,\n    this.blur = true,\n    this.forceFull = false,\n  });\n}\n\nenum SheetType { page, bottomSheet, sideSheet }\n\ntypedef SheetBuilder = Widget Function(BuildContext context, SheetType type);\n\nFuture<T?> showSheet<T>({\n  required BuildContext context,\n  required SheetBuilder builder,\n  SheetProps props = const SheetProps(),\n}) {\n  final isMobile = appController.isMobile;\n  return switch (isMobile) {\n    true => showModalBottomSheet<T>(\n      context: context,\n      isScrollControlled: props.isScrollControlled,\n      builder: (_) {\n        return builder(context, SheetType.bottomSheet);\n      },\n      showDragHandle: false,\n      useSafeArea: props.useSafeArea,\n    ),\n    false => showModalSideSheet<T>(\n      useSafeArea: props.useSafeArea,\n      isScrollControlled: props.isScrollControlled,\n      context: context,\n      constraints: BoxConstraints(maxWidth: props.maxWidth ?? 360),\n      filter: props.blur ? commonFilter : null,\n      builder: (_) {\n        return builder(context, SheetType.sideSheet);\n      },\n    ),\n  };\n}\n\nFuture<T?> showExtend<T>(\n  BuildContext context, {\n  required SheetBuilder builder,\n  ExtendProps props = const ExtendProps(),\n}) {\n  final isMobile = appController.isMobile;\n  return switch (isMobile || props.forceFull) {\n    true => BaseNavigator.push(context, builder(context, SheetType.page)),\n    false => showModalSideSheet<T>(\n      useSafeArea: props.useSafeArea,\n      context: context,\n      constraints: BoxConstraints(maxWidth: props.maxWidth ?? 360),\n      filter: props.blur ? commonFilter : null,\n      builder: (context) {\n        return builder(context, SheetType.sideSheet);\n      },\n    ),\n  };\n}\n\nclass AdaptiveSheetScaffold extends StatefulWidget {\n  final SheetType type;\n  final Widget body;\n  final String title;\n  final bool? centerTitle;\n  final List<Widget> actions;\n\n  const AdaptiveSheetScaffold({\n    super.key,\n    required this.type,\n    required this.body,\n    required this.title,\n    this.centerTitle,\n    this.actions = const [],\n  });\n\n  @override\n  State<AdaptiveSheetScaffold> createState() => _AdaptiveSheetScaffoldState();\n}\n\nclass _AdaptiveSheetScaffoldState extends State<AdaptiveSheetScaffold> {\n  @override\n  Widget build(BuildContext context) {\n    final backgroundColor = context.colorScheme.surface;\n    final bottomSheet = widget.type == SheetType.bottomSheet;\n    final sideSheet = widget.type == SheetType.sideSheet;\n    final appBar = AppBar(\n      forceMaterialTransparency: bottomSheet ? true : false,\n      automaticallyImplyLeading: bottomSheet\n          ? false\n          : widget.actions.isEmpty && sideSheet\n          ? false\n          : true,\n      centerTitle:\n          widget.centerTitle ?? (bottomSheet && widget.actions.isEmpty),\n      backgroundColor: backgroundColor,\n      title: Text(widget.title),\n      actions: genActions([\n        if (widget.actions.isEmpty && sideSheet) CloseButton(),\n        ...widget.actions,\n      ]),\n    );\n    if (bottomSheet) {\n      final handleSize = Size(32, 4);\n      return Column(\n        mainAxisSize: MainAxisSize.min,\n        children: [\n          Padding(\n            padding: EdgeInsets.only(top: 16),\n            child: Container(\n              alignment: Alignment.center,\n              height: handleSize.height,\n              width: handleSize.width,\n              decoration: ShapeDecoration(\n                color: context.colorScheme.onSurfaceVariant,\n                shape: RoundedSuperellipseBorder(\n                  borderRadius: BorderRadius.circular(handleSize.height / 2),\n                ),\n              ),\n            ),\n          ),\n          Padding(padding: EdgeInsets.symmetric(horizontal: 8), child: appBar),\n          Flexible(flex: 1, child: widget.body),\n          SizedBox(height: MediaQuery.of(context).viewPadding.bottom),\n        ],\n      );\n    }\n    return CommonScaffold(\n      appBar: appBar,\n      backgroundColor: backgroundColor,\n      body: widget.body,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/side_sheet.dart",
    "content": "import 'dart:ui';\n\nimport 'package:fl_clash/common/color.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/rendering.dart';\n\nconst Duration _bottomSheetEnterDuration = Duration(milliseconds: 300);\nconst Duration _bottomSheetExitDuration = Duration(milliseconds: 200);\nconst Curve _modalBottomSheetCurve = Easing.standardDecelerate;\nconst double _defaultScrollControlDisabledMaxHeightRatio = 9.0 / 16.0;\n\nclass SideSheet extends StatefulWidget {\n  const SideSheet({\n    super.key,\n    this.animationController,\n    this.enableDrag = true,\n    this.showDragHandle,\n    this.dragHandleColor,\n    this.dragHandleSize,\n    this.onDragStart,\n    this.onDragEnd,\n    this.backgroundColor,\n    this.shadowColor,\n    this.elevation,\n    this.shape,\n    this.clipBehavior,\n    this.constraints,\n    required this.onClosing,\n    required this.builder,\n  }) : assert(elevation == null || elevation >= 0.0);\n\n  final AnimationController? animationController;\n\n  final VoidCallback onClosing;\n\n  final WidgetBuilder builder;\n\n  final bool enableDrag;\n\n  final bool? showDragHandle;\n\n  final Color? dragHandleColor;\n\n  final Size? dragHandleSize;\n\n  final BottomSheetDragStartHandler? onDragStart;\n\n  final BottomSheetDragEndHandler? onDragEnd;\n\n  final Color? backgroundColor;\n\n  final Color? shadowColor;\n\n  final double? elevation;\n\n  final ShapeBorder? shape;\n\n  final Clip? clipBehavior;\n\n  final BoxConstraints? constraints;\n\n  @override\n  State<SideSheet> createState() => _SideSheetState();\n\n  static AnimationController createAnimationController(TickerProvider vsync) {\n    return AnimationController(\n      duration: _bottomSheetEnterDuration,\n      reverseDuration: _bottomSheetExitDuration,\n      debugLabel: 'SideSheet',\n      vsync: vsync,\n    );\n  }\n}\n\nclass _SideSheetState extends State<SideSheet> {\n  final GlobalKey _childKey = GlobalKey(debugLabel: 'SideSheet child');\n\n  @override\n  Widget build(BuildContext context) {\n    final colorScheme = Theme.of(context).colorScheme;\n    final Color color = widget.backgroundColor ?? colorScheme.surface;\n    final Color surfaceTintColor = colorScheme.surfaceTint;\n    final Color shadowColor = widget.shadowColor ?? Colors.transparent;\n    final double elevation = widget.elevation ?? 0;\n    final ShapeBorder shape =\n        widget.shape ??\n        RoundedSuperellipseBorder(borderRadius: BorderRadius.circular(0));\n\n    final BoxConstraints constraints =\n        widget.constraints ??\n        const BoxConstraints(maxWidth: 320, minWidth: 320);\n\n    final Clip clipBehavior = widget.clipBehavior ?? Clip.none;\n\n    Widget sideSheet = Material(\n      key: _childKey,\n      color: color,\n      elevation: elevation,\n      surfaceTintColor: surfaceTintColor,\n      shadowColor: shadowColor,\n      shape: shape,\n      clipBehavior: clipBehavior,\n      child: widget.builder(context),\n    );\n\n    return ConstrainedBox(constraints: constraints, child: sideSheet);\n  }\n}\n\ntypedef _SizeChangeCallback<Size> = void Function(Size);\n\nclass _SideSheetLayoutWithSizeListener extends SingleChildRenderObjectWidget {\n  const _SideSheetLayoutWithSizeListener({\n    required this.onChildSizeChanged,\n    required this.animationValue,\n    required this.isScrollControlled,\n    required this.scrollControlDisabledMaxHeightRatio,\n    super.child,\n  });\n\n  final _SizeChangeCallback<Size> onChildSizeChanged;\n  final double animationValue;\n  final bool isScrollControlled;\n  final double scrollControlDisabledMaxHeightRatio;\n\n  @override\n  _RenderSideSheetLayoutWithSizeListener createRenderObject(\n    BuildContext context,\n  ) {\n    return _RenderSideSheetLayoutWithSizeListener(\n      onChildSizeChanged: onChildSizeChanged,\n      animationValue: animationValue,\n      isScrollControlled: isScrollControlled,\n      scrollControlDisabledMaxHeightRatio: scrollControlDisabledMaxHeightRatio,\n    );\n  }\n\n  @override\n  void updateRenderObject(\n    BuildContext context,\n    _RenderSideSheetLayoutWithSizeListener renderObject,\n  ) {\n    renderObject.onChildSizeChanged = onChildSizeChanged;\n    renderObject.animationValue = animationValue;\n    renderObject.isScrollControlled = isScrollControlled;\n    renderObject.scrollControlDisabledMaxHeightRatio =\n        scrollControlDisabledMaxHeightRatio;\n  }\n}\n\nclass _RenderSideSheetLayoutWithSizeListener extends RenderShiftedBox {\n  _RenderSideSheetLayoutWithSizeListener({\n    RenderBox? child,\n    required _SizeChangeCallback<Size> onChildSizeChanged,\n    required double animationValue,\n    required bool isScrollControlled,\n    required double scrollControlDisabledMaxHeightRatio,\n  }) : _onChildSizeChanged = onChildSizeChanged,\n       _animationValue = animationValue,\n       _isScrollControlled = isScrollControlled,\n       _scrollControlDisabledMaxHeightRatio =\n           scrollControlDisabledMaxHeightRatio,\n       super(child);\n\n  Size _lastSize = Size.zero;\n\n  _SizeChangeCallback<Size> get onChildSizeChanged => _onChildSizeChanged;\n  _SizeChangeCallback<Size> _onChildSizeChanged;\n\n  set onChildSizeChanged(_SizeChangeCallback<Size> newCallback) {\n    if (_onChildSizeChanged == newCallback) {\n      return;\n    }\n\n    _onChildSizeChanged = newCallback;\n    markNeedsLayout();\n  }\n\n  double get animationValue => _animationValue;\n  double _animationValue;\n\n  set animationValue(double newValue) {\n    if (_animationValue == newValue) {\n      return;\n    }\n\n    _animationValue = newValue;\n    markNeedsLayout();\n  }\n\n  bool get isScrollControlled => _isScrollControlled;\n  bool _isScrollControlled;\n\n  set isScrollControlled(bool newValue) {\n    if (_isScrollControlled == newValue) {\n      return;\n    }\n\n    _isScrollControlled = newValue;\n    markNeedsLayout();\n  }\n\n  double get scrollControlDisabledMaxHeightRatio =>\n      _scrollControlDisabledMaxHeightRatio;\n  double _scrollControlDisabledMaxHeightRatio;\n\n  set scrollControlDisabledMaxHeightRatio(double newValue) {\n    if (_scrollControlDisabledMaxHeightRatio == newValue) {\n      return;\n    }\n\n    _scrollControlDisabledMaxHeightRatio = newValue;\n    markNeedsLayout();\n  }\n\n  Size _getSize(BoxConstraints constraints) {\n    return constraints.constrain(constraints.biggest);\n  }\n\n  @override\n  double computeMinIntrinsicWidth(double height) {\n    final double width = _getSize(\n      BoxConstraints.tightForFinite(height: height),\n    ).width;\n    if (width.isFinite) {\n      return width;\n    }\n    return 0.0;\n  }\n\n  @override\n  double computeMaxIntrinsicWidth(double height) {\n    final double width = _getSize(\n      BoxConstraints.tightForFinite(height: height),\n    ).width;\n    if (width.isFinite) {\n      return width;\n    }\n    return 0.0;\n  }\n\n  @override\n  double computeMinIntrinsicHeight(double width) {\n    final double height = _getSize(\n      BoxConstraints.tightForFinite(width: width),\n    ).height;\n    if (height.isFinite) {\n      return height;\n    }\n    return 0.0;\n  }\n\n  @override\n  double computeMaxIntrinsicHeight(double width) {\n    final double height = _getSize(\n      BoxConstraints.tightForFinite(width: width),\n    ).height;\n    if (height.isFinite) {\n      return height;\n    }\n    return 0.0;\n  }\n\n  @override\n  Size computeDryLayout(BoxConstraints constraints) {\n    return _getSize(constraints);\n  }\n\n  BoxConstraints _getConstraintsForChild(BoxConstraints constraints) {\n    return BoxConstraints(maxHeight: constraints.maxHeight);\n  }\n\n  Offset _getPositionForChild(Size size, Size childSize) {\n    return Offset(size.width - childSize.width * animationValue, 0.0);\n  }\n\n  @override\n  void performLayout() {\n    size = _getSize(constraints);\n    if (child != null) {\n      final BoxConstraints childConstraints = _getConstraintsForChild(\n        constraints,\n      );\n      assert(childConstraints.debugAssertIsValid(isAppliedConstraint: true));\n      child!.layout(\n        childConstraints,\n        parentUsesSize: !childConstraints.isTight,\n      );\n      final BoxParentData childParentData = child!.parentData! as BoxParentData;\n      childParentData.offset = _getPositionForChild(\n        size,\n        childConstraints.isTight ? childConstraints.smallest : child!.size,\n      );\n      final Size childSize = childConstraints.isTight\n          ? childConstraints.smallest\n          : child!.size;\n\n      if (_lastSize != childSize) {\n        _lastSize = childSize;\n        _onChildSizeChanged.call(_lastSize);\n      }\n    }\n  }\n}\n\nclass _ModalSideSheet<T> extends StatefulWidget {\n  const _ModalSideSheet({\n    super.key,\n    required this.route,\n    this.backgroundColor,\n    this.elevation,\n    this.shape,\n    this.clipBehavior,\n    this.constraints,\n    this.isScrollControlled = false,\n    this.scrollControlDisabledMaxHeightRatio =\n        _defaultScrollControlDisabledMaxHeightRatio,\n    this.enableDrag = true,\n    this.showDragHandle = false,\n  });\n\n  final ModalSideSheetRoute<T> route;\n  final bool isScrollControlled;\n  final double scrollControlDisabledMaxHeightRatio;\n  final Color? backgroundColor;\n  final double? elevation;\n  final ShapeBorder? shape;\n  final Clip? clipBehavior;\n  final BoxConstraints? constraints;\n  final bool enableDrag;\n  final bool showDragHandle;\n\n  @override\n  _ModalSideSheetState<T> createState() => _ModalSideSheetState<T>();\n}\n\nclass _ModalSideSheetState<T> extends State<_ModalSideSheet<T>> {\n  ParametricCurve<double> animationCurve = _modalBottomSheetCurve;\n\n  String _getRouteLabel(MaterialLocalizations localizations) {\n    switch (Theme.of(context).platform) {\n      case TargetPlatform.iOS:\n      case TargetPlatform.macOS:\n        return '';\n      case TargetPlatform.android:\n      case TargetPlatform.fuchsia:\n      case TargetPlatform.linux:\n      case TargetPlatform.windows:\n        return localizations.dialogLabel;\n    }\n  }\n\n  EdgeInsets _getNewClipDetails(Size topLayerSize) {\n    return EdgeInsets.fromLTRB(0, 0, 0, topLayerSize.height);\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    assert(debugCheckHasMediaQuery(context));\n    assert(debugCheckHasMaterialLocalizations(context));\n    final MaterialLocalizations localizations = MaterialLocalizations.of(\n      context,\n    );\n    final String routeLabel = _getRouteLabel(localizations);\n\n    return AnimatedBuilder(\n      animation: widget.route.animation!,\n      child: SideSheet(\n        animationController: widget.route._animationController,\n        onClosing: () {\n          if (widget.route.isCurrent) {\n            Navigator.pop(context);\n          }\n        },\n        builder: widget.route.builder,\n        backgroundColor: widget.backgroundColor,\n        elevation: widget.elevation,\n        shape: widget.shape,\n        clipBehavior: widget.clipBehavior,\n        constraints: widget.constraints,\n        enableDrag: widget.enableDrag,\n        showDragHandle: widget.showDragHandle,\n      ),\n      builder: (BuildContext context, Widget? child) {\n        final double animationValue = animationCurve.transform(\n          widget.route.animation!.value,\n        );\n        return Semantics(\n          scopesRoute: true,\n          namesRoute: true,\n          label: routeLabel,\n          explicitChildNodes: true,\n          child: ClipRect(\n            child: _SideSheetLayoutWithSizeListener(\n              onChildSizeChanged: (Size size) {\n                widget.route._didChangeBarrierSemanticsClip(\n                  _getNewClipDetails(size),\n                );\n              },\n              animationValue: animationValue,\n              isScrollControlled: widget.isScrollControlled,\n              scrollControlDisabledMaxHeightRatio:\n                  widget.scrollControlDisabledMaxHeightRatio,\n              child: child,\n            ),\n          ),\n        );\n      },\n    );\n  }\n}\n\nclass ModalSideSheetRoute<T> extends PopupRoute<T> {\n  ModalSideSheetRoute({\n    required this.builder,\n    this.capturedThemes,\n    this.barrierLabel,\n    this.barrierOnTapHint,\n    this.backgroundColor,\n    this.elevation,\n    this.shape,\n    this.clipBehavior,\n    this.constraints,\n    this.modalBarrierColor,\n    this.isDismissible = true,\n    this.isScrollControlled = false,\n    this.scrollControlDisabledMaxHeightRatio =\n        _defaultScrollControlDisabledMaxHeightRatio,\n    super.settings,\n    this.transitionAnimationController,\n    this.anchorPoint,\n    this.useSafeArea = false,\n    super.filter,\n  });\n\n  final WidgetBuilder builder;\n\n  final CapturedThemes? capturedThemes;\n\n  final bool isScrollControlled;\n\n  final double scrollControlDisabledMaxHeightRatio;\n\n  final Color? backgroundColor;\n\n  final double? elevation;\n\n  final ShapeBorder? shape;\n\n  final Clip? clipBehavior;\n\n  final BoxConstraints? constraints;\n\n  final Color? modalBarrierColor;\n\n  final bool isDismissible;\n\n  final AnimationController? transitionAnimationController;\n\n  final Offset? anchorPoint;\n\n  final bool useSafeArea;\n\n  final String? barrierOnTapHint;\n\n  final ValueNotifier<EdgeInsets> _clipDetailsNotifier =\n      ValueNotifier<EdgeInsets>(EdgeInsets.zero);\n\n  @override\n  void dispose() {\n    _clipDetailsNotifier.dispose();\n    super.dispose();\n  }\n\n  bool _didChangeBarrierSemanticsClip(EdgeInsets newClipDetails) {\n    if (_clipDetailsNotifier.value == newClipDetails) {\n      return false;\n    }\n    _clipDetailsNotifier.value = newClipDetails;\n    return true;\n  }\n\n  @override\n  Duration get transitionDuration => _bottomSheetEnterDuration;\n\n  @override\n  Duration get reverseTransitionDuration => _bottomSheetExitDuration;\n\n  @override\n  bool get barrierDismissible => isDismissible;\n\n  @override\n  final String? barrierLabel;\n\n  @override\n  Color get barrierColor => modalBarrierColor ?? Colors.black54;\n\n  AnimationController? _animationController;\n\n  @override\n  AnimationController createAnimationController() {\n    assert(_animationController == null);\n    if (transitionAnimationController != null) {\n      _animationController = transitionAnimationController;\n      willDisposeAnimationController = false;\n    } else {\n      _animationController = SideSheet.createAnimationController(navigator!);\n    }\n    return _animationController!;\n  }\n\n  @override\n  Widget buildPage(\n    BuildContext context,\n    Animation<double> animation,\n    Animation<double> secondaryAnimation,\n  ) {\n    final Widget content = DisplayFeatureSubScreen(\n      anchorPoint: anchorPoint,\n      child: Builder(\n        builder: (BuildContext context) {\n          final colorScheme = Theme.of(context).colorScheme;\n          return _ModalSideSheet<T>(\n            route: this,\n            backgroundColor: backgroundColor ?? colorScheme.surface,\n            elevation: elevation ?? 0,\n            shape: shape,\n            clipBehavior: clipBehavior,\n            constraints: constraints,\n            isScrollControlled: isScrollControlled,\n            scrollControlDisabledMaxHeightRatio:\n                scrollControlDisabledMaxHeightRatio,\n          );\n        },\n      ),\n    );\n\n    final Widget sideSheet = content;\n\n    return capturedThemes?.wrap(sideSheet) ?? sideSheet;\n  }\n\n  @override\n  Widget buildModalBarrier() {\n    if (barrierColor.a != 0 && !offstage) {\n      assert(barrierColor != barrierColor.opacity0);\n      final Animation<Color?> color = animation!.drive(\n        ColorTween(\n          begin: barrierColor.opacity0,\n          end: barrierColor,\n        ).chain(CurveTween(curve: barrierCurve)),\n      );\n      return AnimatedModalBarrier(\n        color: color,\n        dismissible: barrierDismissible,\n        semanticsLabel: barrierLabel,\n        barrierSemanticsDismissible: semanticsDismissible,\n        clipDetailsNotifier: _clipDetailsNotifier,\n        semanticsOnTapHint: barrierOnTapHint,\n      );\n    } else {\n      return ModalBarrier(\n        dismissible: barrierDismissible,\n        semanticsLabel: barrierLabel,\n        barrierSemanticsDismissible: semanticsDismissible,\n        clipDetailsNotifier: _clipDetailsNotifier,\n        semanticsOnTapHint: barrierOnTapHint,\n      );\n    }\n  }\n}\n\nFuture<T?> showModalSideSheet<T>({\n  required BuildContext context,\n  required WidgetBuilder builder,\n  Color? backgroundColor,\n  String? barrierLabel,\n  double? elevation,\n  ShapeBorder? shape,\n  Clip? clipBehavior,\n  BoxConstraints? constraints,\n  Color? barrierColor,\n  bool isScrollControlled = false,\n  double scrollControlDisabledMaxHeightRatio =\n      _defaultScrollControlDisabledMaxHeightRatio,\n  bool useRootNavigator = false,\n  bool isDismissible = true,\n  bool useSafeArea = false,\n  RouteSettings? routeSettings,\n  AnimationController? transitionAnimationController,\n  Offset? anchorPoint,\n  ImageFilter? filter,\n}) {\n  assert(debugCheckHasMediaQuery(context));\n  assert(debugCheckHasMaterialLocalizations(context));\n\n  final NavigatorState navigator = Navigator.of(\n    context,\n    rootNavigator: useRootNavigator,\n  );\n  final MaterialLocalizations localizations = MaterialLocalizations.of(context);\n  return navigator.push(\n    ModalSideSheetRoute<T>(\n      builder: builder,\n      filter: filter,\n      capturedThemes: InheritedTheme.capture(\n        from: context,\n        to: navigator.context,\n      ),\n      isScrollControlled: isScrollControlled,\n      scrollControlDisabledMaxHeightRatio: scrollControlDisabledMaxHeightRatio,\n      barrierLabel: barrierLabel ?? localizations.scrimLabel,\n      barrierOnTapHint: localizations.scrimOnTapHint(\n        localizations.bottomSheetLabel,\n      ),\n      backgroundColor: backgroundColor,\n      elevation: elevation,\n      shape: shape,\n      clipBehavior: clipBehavior,\n      constraints: constraints,\n      isDismissible: isDismissible,\n      modalBarrierColor:\n          barrierColor ?? Theme.of(context).bottomSheetTheme.modalBarrierColor,\n      settings: routeSettings,\n      transitionAnimationController: transitionAnimationController,\n      anchorPoint: anchorPoint,\n      useSafeArea: useSafeArea,\n    ),\n  );\n}\n\n// class ModalAppBar extends StatelessWidget {\n//   final String title;\n//\n//   const ModalAppBar({\n//     super.key,\n//     required this.title,\n//   });\n//\n//   @override\n//   Widget build(BuildContext context) {\n//     return AppBar(\n//       automaticallyImplyLeading: false,\n//       title: Text(title),\n//       centerTitle: false,\n//       actions: const [\n//         SizedBox(\n//           height: kToolbarHeight,\n//           width: kToolbarHeight,\n//           child: CloseButton(),\n//         )\n//       ],\n//     );\n//   }\n// }\n"
  },
  {
    "path": "lib/widgets/subscription_info_view.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/models/models.dart';\nimport 'package:flutter/material.dart';\n\nclass SubscriptionInfoView extends StatelessWidget {\n  final SubscriptionInfo? subscriptionInfo;\n\n  const SubscriptionInfoView({super.key, this.subscriptionInfo});\n\n  @override\n  Widget build(BuildContext context) {\n    if (subscriptionInfo == null) {\n      return Container();\n    }\n    if (subscriptionInfo?.total == 0) {\n      return Container();\n    }\n    final use = subscriptionInfo!.upload + subscriptionInfo!.download;\n    final total = subscriptionInfo!.total;\n    final progress = use / total;\n\n    final useShow = use.traffic.show;\n    final totalShow = total.traffic.show;\n    final expireShow =\n        subscriptionInfo?.expire != null && subscriptionInfo!.expire != 0\n        ? DateTime.fromMillisecondsSinceEpoch(\n            subscriptionInfo!.expire * 1000,\n          ).show\n        : appLocalizations.infiniteTime;\n    return Column(\n      crossAxisAlignment: CrossAxisAlignment.start,\n      children: [\n        LinearProgressIndicator(\n          minHeight: 6,\n          value: progress,\n          backgroundColor: context.colorScheme.primary.opacity15,\n        ),\n        const SizedBox(height: 8),\n        Text(\n          '$useShow / $totalShow · $expireShow',\n          style: context.textTheme.labelMedium?.toLight,\n        ),\n        const SizedBox(height: 4),\n      ],\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/super_grid.dart",
    "content": "import 'dart:async';\nimport 'dart:math';\n\nimport 'package:defer_pointer/defer_pointer.dart';\nimport 'package:fl_clash/common/common.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:fl_clash/widgets/activate_box.dart';\nimport 'package:fl_clash/widgets/card.dart';\nimport 'package:fl_clash/widgets/grid.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/physics.dart';\n\ntypedef VoidCallback = void Function();\n\nclass SuperGrid extends StatefulWidget {\n  final List<GridItem> children;\n  final double mainAxisSpacing;\n  final double crossAxisSpacing;\n  final int crossAxisCount;\n  final VoidCallback? onUpdate;\n\n  const SuperGrid({\n    super.key,\n    required this.children,\n    this.crossAxisCount = 1,\n    this.mainAxisSpacing = 0,\n    this.crossAxisSpacing = 0,\n    this.onUpdate,\n  });\n\n  @override\n  State<SuperGrid> createState() => SuperGridState();\n}\n\nclass SuperGridState extends State<SuperGrid> with TickerProviderStateMixin {\n  final ValueNotifier<List<GridItem>> _childrenNotifier = ValueNotifier([]);\n  List<GridItem> children = [];\n\n  int get length => _childrenNotifier.value.length;\n  List<int> _tempIndexList = [];\n  List<BuildContext?> _itemContexts = [];\n  Size _containerSize = Size.zero;\n  int _targetIndex = -1;\n  Offset _targetOffset = Offset.zero;\n  List<Size> _sizes = [];\n  List<Offset> _offsets = [];\n  Offset _parentOffset = Offset.zero;\n  EdgeDraggingAutoScroller? _edgeDraggingAutoScroller;\n  Map<int, Tween<Offset>> _transformTweenMap = {};\n\n  final ValueNotifier<bool> _animating = ValueNotifier(false);\n\n  final _dragWidgetSizeNotifier = ValueNotifier(Size.zero);\n\n  final _dragIndexNotifier = ValueNotifier(-1);\n\n  late AnimationController _transformController;\n\n  Future<bool> get isTransformCompleter =>\n      _transformCompleter?.future ?? Future(() => true);\n\n  Completer<bool>? _transformCompleter;\n\n  Map<int, Animation<Offset>> _transformAnimationMap = {};\n\n  late AnimationController _fakeDragWidgetController;\n  Animation<Offset>? _fakeDragWidgetAnimation;\n\n  late AnimationController _shakeController;\n  late Animation<double> _shakeAnimation;\n  Rect _dragRect = Rect.zero;\n  Scrollable? _scrollable;\n\n  int get crossCount => widget.crossAxisCount;\n\n  void _onChildrenChange() {\n    _tempIndexList = List.generate(length, (index) => index);\n    _itemContexts = List.filled(length, null);\n  }\n\n  void _preTransformState() {\n    _sizes = _itemContexts.map((item) => item!.size!).toList();\n    _parentOffset = (context.findRenderObject() as RenderBox).localToGlobal(\n      Offset.zero,\n    );\n    _offsets = _itemContexts\n        .map(\n          (item) =>\n              (item!.findRenderObject() as RenderBox).localToGlobal(\n                Offset.zero,\n              ) -\n              _parentOffset,\n        )\n        .toList();\n    _containerSize = context.size!;\n  }\n\n  void _initState() {\n    _transformController.value = 0;\n    _sizes = List.generate(length, (index) => Size.zero);\n    _offsets = [];\n    _transformTweenMap.clear();\n    _transformAnimationMap.clear();\n    _containerSize = Size.zero;\n    _dragIndexNotifier.value = -1;\n    _dragWidgetSizeNotifier.value = Size.zero;\n    _targetOffset = Offset.zero;\n    _parentOffset = Offset.zero;\n    _dragRect = Rect.zero;\n    _targetIndex = -1;\n  }\n\n  @override\n  void initState() {\n    super.initState();\n    _childrenNotifier.addListener(() {\n      children = _childrenNotifier.value;\n      if (widget.onUpdate != null) {\n        widget.onUpdate!();\n      }\n    });\n\n    _childrenNotifier.value = widget.children;\n\n    _fakeDragWidgetController = AnimationController.unbounded(vsync: this);\n\n    _shakeController = AnimationController(\n      vsync: this,\n      duration: Duration(milliseconds: 120),\n    );\n\n    _shakeAnimation = Tween<double>(begin: -0.012, end: 0.012).animate(\n      CurvedAnimation(parent: _shakeController, curve: Curves.easeInOut),\n    );\n\n    _transformController = AnimationController(\n      vsync: this,\n      duration: commonDuration,\n    );\n    _initState();\n  }\n\n  void handleAdd(GridItem gridItem) {\n    _childrenNotifier.value = List.from(_childrenNotifier.value)..add(gridItem);\n  }\n\n  @override\n  void didChangeDependencies() {\n    super.didChangeDependencies();\n\n    final scrollable = context.findAncestorWidgetOfExactType<Scrollable>();\n    if (scrollable == null) {\n      return;\n    }\n    if (_scrollable != scrollable) {\n      _edgeDraggingAutoScroller = EdgeDraggingAutoScroller(\n        Scrollable.of(context),\n        onScrollViewScrolled: () {\n          _edgeDraggingAutoScroller?.startAutoScrollIfNecessary(_dragRect);\n        },\n        velocityScalar: 40,\n      );\n    }\n  }\n\n  Future _transform() async {\n    List<Offset> layoutOffsets = [Offset(_containerSize.width, 0)];\n    final List<Offset> nextOffsets = [];\n\n    for (final index in _tempIndexList) {\n      final size = _sizes[index];\n      final offset = _getNextOffset(layoutOffsets, size);\n      final layoutOffset = Offset(\n        min(\n          offset.dx + size.width + widget.crossAxisSpacing,\n          _containerSize.width,\n        ),\n        min(\n          offset.dy + size.height + widget.mainAxisSpacing,\n          _containerSize.height,\n        ),\n      );\n      final startLayoutOffsetX = offset.dx;\n      final endLayoutOffsetX = layoutOffset.dx;\n      nextOffsets.add(offset);\n\n      final startIndex = layoutOffsets.indexWhere(\n        (i) => i.dx >= startLayoutOffsetX,\n      );\n      final endIndex = layoutOffsets.indexWhere(\n        (i) => i.dx >= endLayoutOffsetX,\n      );\n      final endOffset = layoutOffsets[endIndex];\n\n      if (startIndex != endIndex) {\n        final startOffset = layoutOffsets[startIndex];\n        if (startOffset.dx != startLayoutOffsetX) {\n          layoutOffsets[startIndex] = Offset(\n            startLayoutOffsetX,\n            startOffset.dy,\n          );\n        }\n      }\n      if (endOffset.dx == endLayoutOffsetX) {\n        layoutOffsets[endIndex] = layoutOffset;\n      } else {\n        layoutOffsets.insert(endIndex, layoutOffset);\n      }\n      layoutOffsets.removeRange(min(startIndex + 1, endIndex), endIndex);\n    }\n\n    final Map<int, Tween<Offset>> transformTweenMap = {};\n\n    for (final index in _tempIndexList) {\n      final nextIndex = _tempIndexList.indexWhere((i) => i == index);\n      transformTweenMap[index] = Tween(\n        begin: _transformTweenMap[index]?.begin ?? Offset.zero,\n        end: nextOffsets[nextIndex] - _offsets[index],\n      );\n    }\n\n    _transformTweenMap = transformTweenMap;\n\n    _transformAnimationMap = transformTweenMap.map((key, value) {\n      final preAnimationValue = _transformAnimationMap[key]?.value;\n      return MapEntry(\n        key,\n        Tween(begin: preAnimationValue ?? Offset.zero, end: value.end).animate(\n          _transformController.drive(\n            Tween<double>(\n              begin: 0.0,\n              end: 1,\n            ).chain(CurveTween(curve: Easing.emphasizedAccelerate)),\n          ),\n        ),\n      );\n    });\n\n    if (_targetIndex != -1) {\n      _targetOffset = nextOffsets[_targetIndex];\n    }\n    return _transformController.forward(from: 0);\n  }\n\n  void _handleDragStarted(int index) {\n    _initState();\n    _preTransformState();\n    _dragIndexNotifier.value = index;\n    _dragWidgetSizeNotifier.value = _sizes[index];\n    _targetIndex = index;\n    _targetOffset = _offsets[index];\n    _dragRect = Rect.fromLTWH(\n      _targetOffset.dx + _parentOffset.dx,\n      _targetOffset.dy + _parentOffset.dy,\n      _sizes[index].width,\n      _sizes[index].height,\n    );\n  }\n\n  Future<void> _handleDragEnd(DraggableDetails details) async {\n    final children = List<GridItem>.from(_childrenNotifier.value);\n    children.insert(_targetIndex, children.removeAt(_dragIndexNotifier.value));\n    this.children = children;\n    debouncer.cancel(FunctionTag.handleWill);\n    if (_targetIndex == -1) {\n      return;\n    }\n    const tolerance = Tolerance(distance: 0.5, velocity: 0.01);\n    const spring = SpringDescription(mass: 1, stiffness: 100, damping: 10);\n    final simulation = SpringSimulation(spring, 0, 1, 0, tolerance: tolerance);\n    _fakeDragWidgetAnimation = Tween(\n      begin: details.offset - _parentOffset,\n      end: _targetOffset,\n    ).animate(_fakeDragWidgetController);\n    _animating.value = true;\n\n    _transformCompleter = Completer<bool>();\n    await _fakeDragWidgetController.animateWith(simulation);\n    _transformCompleter?.complete(true);\n    _animating.value = false;\n    _fakeDragWidgetAnimation = null;\n    _transformTweenMap.clear();\n    _transformAnimationMap.clear();\n    _childrenNotifier.value = children;\n    _initState();\n  }\n\n  void _handleDragUpdate(DragUpdateDetails details) {\n    _dragRect = _dragRect.translate(0, details.delta.dy);\n    _edgeDraggingAutoScroller?.startAutoScrollIfNecessary(_dragRect);\n  }\n\n  Future<void> _handleWill(int index) async {\n    final dragIndex = _dragIndexNotifier.value;\n    if (dragIndex < 0 || dragIndex > _offsets.length - 1) {\n      return;\n    }\n    final targetIndex = _tempIndexList.indexWhere((i) => i == index);\n    if (_targetIndex == targetIndex) {\n      return;\n    }\n    _tempIndexList = List.generate(length, (i) {\n      if (i == targetIndex) return _dragIndexNotifier.value;\n      if (_targetIndex > targetIndex && i > targetIndex && i <= _targetIndex) {\n        return _tempIndexList[i - 1];\n      } else if (_targetIndex < targetIndex &&\n          i >= _targetIndex &&\n          i < targetIndex) {\n        return _tempIndexList[i + 1];\n      }\n      return _tempIndexList[i];\n    }).toList();\n\n    _targetIndex = targetIndex;\n\n    await _transform();\n  }\n\n  Future<void> _handleDelete(int index) async {\n    _preTransformState();\n    final indexWhere = _tempIndexList.indexWhere((i) => i == index);\n    _tempIndexList.removeAt(indexWhere);\n    await _transform();\n    final children = List<GridItem>.from(_childrenNotifier.value);\n    children.removeAt(index);\n    _childrenNotifier.value = children;\n    _initState();\n  }\n\n  Widget _buildTransform(Widget rawChild, int index) {\n    return ValueListenableBuilder(\n      valueListenable: _animating,\n      builder: (_, animating, child) {\n        if (animating && _dragIndexNotifier.value == index) {\n          return _buildSizeBox(Container(), index);\n        }\n        return child!;\n      },\n      child: AnimatedBuilder(\n        builder: (_, child) {\n          return Transform.translate(\n            offset: _transformAnimationMap[index]?.value ?? Offset.zero,\n            child: child,\n          );\n        },\n        animation: _transformController.view,\n        child: rawChild,\n      ),\n    );\n  }\n\n  Offset _getNextOffset(List<Offset> offsets, Size size) {\n    final length = offsets.length;\n    Offset nextOffset = Offset(0, double.infinity);\n    for (int i = 0; i < length; i++) {\n      final offset = offsets[i];\n      if (offset.dy.moreOrEqual(nextOffset.dy)) {\n        continue;\n      }\n      double offsetX = 0;\n      double span = 0;\n      for (\n        int j = 0;\n        span < size.width &&\n            j < length &&\n            _containerSize.width.moreOrEqual(offsetX + size.width);\n        j++\n      ) {\n        final tempOffset = offsets[j];\n        if (offset.dy.moreOrEqual(tempOffset.dy)) {\n          span = tempOffset.dx - offsetX;\n          if (span.moreOrEqual(size.width)) {\n            nextOffset = Offset(offsetX, offset.dy);\n          }\n        } else {\n          offsetX = tempOffset.dx;\n          span = 0;\n        }\n      }\n    }\n    return nextOffset;\n  }\n\n  Widget _buildSizeBox(Widget child, int index) {\n    return ValueListenableBuilder(\n      valueListenable: _dragWidgetSizeNotifier,\n      builder: (_, size, child) {\n        return SizedBox.fromSize(size: size, child: child!);\n      },\n      child: child,\n    );\n  }\n\n  Widget _buildInactivate(Widget child) {\n    return ValueListenableBuilder(\n      valueListenable: _animating,\n      builder: (_, animating, child) {\n        if (animating) {\n          return ActivateBox(child: child!);\n        } else {\n          return child!;\n        }\n      },\n      child: child,\n    );\n  }\n\n  Widget _buildShake(Widget child) {\n    final random = 0.7 + Random().nextDouble() * 0.3;\n    _shakeController.stop();\n    _shakeController.repeat(reverse: true);\n    return AnimatedBuilder(\n      animation: _shakeAnimation,\n      builder: (_, child) {\n        return Transform.rotate(\n          angle: _shakeAnimation.value * random,\n          child: child!,\n        );\n      },\n      child: child,\n    );\n  }\n\n  Widget _buildDraggable({\n    required Widget childWhenDragging,\n    required Widget feedback,\n    required Widget item,\n    required int index,\n  }) {\n    final target = DragTarget<int>(\n      builder: (_, _, _) {\n        return AbsorbPointer(child: item);\n      },\n      onWillAcceptWithDetails: (_) {\n        debouncer.call(\n          FunctionTag.handleWill,\n          _handleWill,\n          args: [index],\n          duration: commonDuration,\n        );\n        return false;\n      },\n    );\n    final shakeTarget = ValueListenableBuilder(\n      valueListenable: _animating,\n      builder: (_, animating, child) {\n        if (animating) {\n          return target;\n        } else {\n          return child!;\n        }\n      },\n      child: ValueListenableBuilder(\n        valueListenable: _dragIndexNotifier,\n        builder: (_, dragIndex, child) {\n          if (dragIndex == index) {\n            return child!;\n          }\n          return _buildShake(\n            _DeletableContainer(\n              onDelete: () {\n                _handleDelete(index);\n              },\n              child: child!,\n            ),\n          );\n        },\n        child: target,\n      ),\n    );\n    final draggableChild = system.isDesktop\n        ? Draggable(\n            childWhenDragging: childWhenDragging,\n            data: index,\n            feedback: feedback,\n            onDragStarted: () {\n              _handleDragStarted(index);\n            },\n            onDragUpdate: (details) {\n              _handleDragUpdate(details);\n            },\n            onDragEnd: (details) {\n              _handleDragEnd(details);\n            },\n            child: shakeTarget,\n          )\n        : LongPressDraggable(\n            childWhenDragging: childWhenDragging,\n            data: index,\n            feedback: feedback,\n            onDragStarted: () {\n              _handleDragStarted(index);\n            },\n            onDragUpdate: (details) {\n              _handleDragUpdate(details);\n            },\n            onDragEnd: (details) {\n              _handleDragEnd(details);\n            },\n            child: shakeTarget,\n          );\n    return draggableChild;\n  }\n\n  Widget _builderItem(int index) {\n    final girdItem = _childrenNotifier.value[index];\n    final child = RepaintBoundary(child: girdItem.child);\n    return GridItem(\n      mainAxisCellCount: girdItem.mainAxisCellCount,\n      crossAxisCellCount: girdItem.crossAxisCellCount,\n      child: Builder(\n        builder: (context) {\n          _itemContexts[index] = context;\n          final childWhenDragging = ActivateBox(\n            child: Opacity(\n              opacity: 0.6,\n              child: _buildSizeBox(CommonCard(child: child), index),\n            ),\n          );\n          final feedback = ActivateBox(\n            child: _buildSizeBox(\n              CommonCard(child: Material(elevation: 6, child: child)),\n              index,\n            ),\n          );\n          return _buildTransform(\n            _buildDraggable(\n              childWhenDragging: childWhenDragging,\n              feedback: feedback,\n              item: child,\n              index: index,\n            ),\n            index,\n          );\n        },\n      ),\n    );\n  }\n\n  Widget _buildFakeTransformWidget() {\n    return ValueListenableBuilder<bool>(\n      valueListenable: _animating,\n      builder: (_, animating, _) {\n        final index = _dragIndexNotifier.value;\n        if (!animating || _fakeDragWidgetAnimation == null || index == -1) {\n          return Container();\n        }\n        return _buildSizeBox(\n          AnimatedBuilder(\n            animation: _fakeDragWidgetAnimation!,\n            builder: (_, child) {\n              return Transform.translate(\n                offset: _fakeDragWidgetAnimation!.value,\n                child: child!,\n              );\n            },\n            child: ActivateBox(child: _childrenNotifier.value[index].child),\n          ),\n          index,\n        );\n      },\n    );\n  }\n\n  @override\n  void dispose() {\n    _scrollable = null;\n    _fakeDragWidgetController.dispose();\n    _shakeController.dispose();\n    _transformController.dispose();\n    _dragIndexNotifier.dispose();\n    _animating.dispose();\n    _childrenNotifier.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return DeferredPointerHandler(\n      child: Stack(\n        children: [\n          _buildInactivate(\n            ValueListenableBuilder(\n              valueListenable: _childrenNotifier,\n              builder: (_, children, _) {\n                _onChildrenChange();\n                return Grid(\n                  axisDirection: AxisDirection.down,\n                  crossAxisCount: crossCount,\n                  crossAxisSpacing: widget.crossAxisSpacing,\n                  mainAxisSpacing: widget.mainAxisSpacing,\n                  children: [\n                    for (int i = 0; i < children.length; i++) _builderItem(i),\n                  ],\n                );\n              },\n            ),\n          ),\n          _buildFakeTransformWidget(),\n        ],\n      ),\n    );\n  }\n}\n\nclass _DeletableContainer extends StatefulWidget {\n  final Widget child;\n  final VoidCallback onDelete;\n\n  const _DeletableContainer({required this.child, required this.onDelete});\n\n  @override\n  State<_DeletableContainer> createState() => _DeletableContainerState();\n}\n\nclass _DeletableContainerState extends State<_DeletableContainer>\n    with SingleTickerProviderStateMixin {\n  late AnimationController _controller;\n  late Animation<double> _scaleAnimation;\n  late Animation<double> _fadeAnimation;\n  bool _deleteButtonVisible = true;\n\n  @override\n  void initState() {\n    super.initState();\n    _controller = AnimationController(vsync: this, duration: commonDuration);\n    _scaleAnimation = Tween(\n      begin: 1.0,\n      end: 0.4,\n    ).animate(CurvedAnimation(parent: _controller, curve: Curves.easeIn));\n    _fadeAnimation = Tween(\n      begin: 1.0,\n      end: 0.0,\n    ).animate(CurvedAnimation(parent: _controller, curve: Curves.easeIn));\n  }\n\n  @override\n  void didUpdateWidget(_DeletableContainer oldWidget) {\n    super.didUpdateWidget(oldWidget);\n    if (oldWidget.child != widget.child) {\n      setState(() {\n        _controller.value = 0;\n        _deleteButtonVisible = true;\n      });\n    }\n  }\n\n  Future<void> _handleDel() async {\n    setState(() {\n      _deleteButtonVisible = false;\n    });\n    await _controller.forward(from: 0);\n    widget.onDelete();\n  }\n\n  @override\n  void dispose() {\n    _controller.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Stack(\n      clipBehavior: Clip.none,\n      children: [\n        AnimatedBuilder(\n          animation: _controller.view,\n          builder: (_, child) {\n            return Transform.scale(\n              scale: _scaleAnimation.value,\n              child: Opacity(opacity: _fadeAnimation.value, child: child!),\n            );\n          },\n          child: widget.child,\n        ),\n        if (_deleteButtonVisible)\n          Positioned(\n            top: -8,\n            right: -8,\n            child: DeferPointer(\n              child: SizedBox(\n                width: 24,\n                height: 24,\n                child: IconButton.filled(\n                  iconSize: 20,\n                  padding: EdgeInsets.all(2),\n                  onPressed: _handleDel,\n                  icon: Icon(Icons.close),\n                ),\n              ),\n            ),\n          ),\n      ],\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/tab.dart",
    "content": "import 'dart:math' as math;\nimport 'dart:math';\n\nimport 'package:collection/collection.dart';\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/gestures.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter/physics.dart';\nimport 'package:flutter/rendering.dart';\n\nconst EdgeInsetsGeometry _kHorizontalItemPadding = EdgeInsets.symmetric(\n  vertical: 2,\n  horizontal: 3,\n);\n\nconst Radius _kCornerRadius = Radius.circular(9);\n\nconst Radius _kThumbRadius = Radius.circular(8);\n\nconst EdgeInsets _kThumbInsets = EdgeInsets.symmetric(horizontal: 1);\n\nconst double _kMinSegmentedControlHeight = 28.0;\n\nconst EdgeInsets _kSeparatorInset = EdgeInsets.symmetric(vertical: 5);\n\nconst double _kSeparatorWidth = 1;\n\nconst double _kMinThumbScale = 0.95;\n\nconst double _kSegmentMinPadding = 10;\n\nconst double _kTouchYDistanceThreshold = 50.0 * 50.0;\n\nconst double _kContentPressedMinOpacity = 0.2;\n\nconst double _kFontSize = 13.0;\n\nconst FontWeight _kFontWeight = FontWeight.w500;\n\nconst FontWeight _kHighlightedFontWeight = FontWeight.w600;\n\nconst Color _kDisabledContentColor = Color.fromARGB(115, 122, 122, 122);\n\nfinal SpringSimulation _kThumbSpringAnimationSimulation = SpringSimulation(\n  const SpringDescription(mass: 1, stiffness: 503.551, damping: 44.8799),\n  0,\n  1,\n  0,\n);\n\nconst Duration _kSpringAnimationDuration = Duration(milliseconds: 412);\n\nconst Duration _kOpacityAnimationDuration = Duration(milliseconds: 470);\n\nconst Duration _kHighlightAnimationDuration = Duration(milliseconds: 200);\n\nclass CommonTabBar<T extends Object> extends StatefulWidget {\n  CommonTabBar({\n    super.key,\n    required this.children,\n    required this.onValueChanged,\n    this.disabledChildren = const <Never>{},\n    this.groupValue,\n    required this.thumbColor,\n    this.padding = _kHorizontalItemPadding,\n    this.backgroundColor,\n    this.proportionalWidth = false,\n  }) : assert(children.length >= 2),\n       assert(\n         groupValue == null || children.keys.contains(groupValue),\n         'The groupValue must be either null or one of the keys in the children map.',\n       );\n  final Map<T, Widget> children;\n  final Set<T> disabledChildren;\n  final T? groupValue;\n  final ValueChanged<T?> onValueChanged;\n  final Color? backgroundColor;\n  final Color thumbColor;\n  final bool proportionalWidth;\n  final EdgeInsetsGeometry padding;\n\n  @override\n  State<CommonTabBar<T>> createState() => _CommonTabBarState<T>();\n}\n\nclass _CommonTabBarState<T extends Object> extends State<CommonTabBar<T>>\n    with TickerProviderStateMixin<CommonTabBar<T>> {\n  late final AnimationController thumbController = AnimationController(\n    duration: _kSpringAnimationDuration,\n    value: 0,\n    vsync: this,\n  );\n  Animatable<Rect?>? thumbAnimatable;\n\n  late final AnimationController thumbScaleController = AnimationController(\n    duration: _kSpringAnimationDuration,\n    value: 0,\n    vsync: this,\n  );\n  late Animation<double> thumbScaleAnimation = thumbScaleController.drive(\n    Tween<double>(begin: 1, end: _kMinThumbScale),\n  );\n\n  final TapGestureRecognizer tap = TapGestureRecognizer();\n  final HorizontalDragGestureRecognizer drag =\n      HorizontalDragGestureRecognizer();\n  final LongPressGestureRecognizer longPress = LongPressGestureRecognizer();\n  final GlobalKey segmentedControlRenderWidgetKey = GlobalKey();\n\n  @override\n  void initState() {\n    super.initState();\n    final GestureArenaTeam team = GestureArenaTeam();\n    longPress.team = team;\n    drag.team = team;\n    team.captain = drag;\n\n    drag\n      ..onDown = onDown\n      ..onUpdate = onUpdate\n      ..onEnd = onEnd\n      ..onCancel = onCancel;\n\n    tap.onTapUp = onTapUp;\n    longPress.onLongPress = () {};\n\n    highlighted = widget.groupValue;\n  }\n\n  @override\n  void didUpdateWidget(CommonTabBar<T> oldWidget) {\n    super.didUpdateWidget(oldWidget);\n    if (!isThumbDragging && highlighted != widget.groupValue) {\n      thumbController.animateWith(_kThumbSpringAnimationSimulation);\n      thumbAnimatable = null;\n      highlighted = widget.groupValue;\n    }\n  }\n\n  @override\n  void dispose() {\n    thumbScaleController.dispose();\n    thumbController.dispose();\n\n    drag.dispose();\n    tap.dispose();\n    longPress.dispose();\n\n    super.dispose();\n  }\n\n  bool? _startedOnSelectedSegment;\n  bool _startedOnDisabledSegment = false;\n\n  bool get isThumbDragging =>\n      (_startedOnSelectedSegment ?? false) && !_startedOnDisabledSegment;\n\n  T segmentForXPosition(double dx) {\n    final BuildContext currentContext =\n        segmentedControlRenderWidgetKey.currentContext!;\n    final _RenderSegmentedControl<T> renderBox =\n        currentContext.findRenderObject()! as _RenderSegmentedControl<T>;\n\n    final int numOfChildren = widget.children.length;\n    assert(renderBox.hasSize);\n    assert(numOfChildren >= 2);\n\n    int segmentIndex = renderBox.getClosestSegmentIndex(dx);\n\n    switch (Directionality.of(context)) {\n      case TextDirection.ltr:\n        break;\n      case TextDirection.rtl:\n        segmentIndex = numOfChildren - 1 - segmentIndex;\n    }\n    return widget.children.keys.elementAt(segmentIndex);\n  }\n\n  bool _hasDraggedTooFar(DragUpdateDetails details) {\n    final RenderBox renderBox = context.findRenderObject()! as RenderBox;\n    assert(renderBox.hasSize);\n    final Size size = renderBox.size;\n    final Offset offCenter =\n        details.localPosition - Offset(size.width / 2, size.height / 2);\n    final double l2 =\n        math.pow(math.max(0.0, offCenter.dx.abs() - size.width / 2), 2) +\n                math.pow(math.max(0.0, offCenter.dy.abs() - size.height / 2), 2)\n            as double;\n    return l2 > _kTouchYDistanceThreshold;\n  }\n\n  void _playThumbScaleAnimation({required bool isExpanding}) {\n    thumbScaleAnimation = thumbScaleController.drive(\n      Tween<double>(\n        begin: thumbScaleAnimation.value,\n        end: isExpanding ? 1 : _kMinThumbScale,\n      ),\n    );\n    thumbScaleController.animateWith(_kThumbSpringAnimationSimulation);\n  }\n\n  void onHighlightChangedByGesture(T newValue) {\n    if (highlighted == newValue) {\n      return;\n    }\n\n    setState(() {\n      highlighted = newValue;\n    });\n    thumbController.animateWith(_kThumbSpringAnimationSimulation);\n    thumbAnimatable = null;\n  }\n\n  void onPressedChangedByGesture(T? newValue) {\n    if (pressed != newValue) {\n      setState(() {\n        pressed = newValue;\n      });\n    }\n  }\n\n  void onTapUp(TapUpDetails details) {\n    if (isThumbDragging) {\n      return;\n    }\n    final T segment = segmentForXPosition(details.localPosition.dx);\n    onPressedChangedByGesture(null);\n    if (segment != widget.groupValue &&\n        !widget.disabledChildren.contains(segment)) {\n      widget.onValueChanged(segment);\n    }\n  }\n\n  void onDown(DragDownDetails details) {\n    final T touchDownSegment = segmentForXPosition(details.localPosition.dx);\n    _startedOnSelectedSegment = touchDownSegment == highlighted;\n    _startedOnDisabledSegment = widget.disabledChildren.contains(\n      touchDownSegment,\n    );\n    if (widget.disabledChildren.contains(touchDownSegment)) {\n      return;\n    }\n    onPressedChangedByGesture(touchDownSegment);\n\n    if (isThumbDragging) {\n      _playThumbScaleAnimation(isExpanding: false);\n    }\n  }\n\n  void onUpdate(DragUpdateDetails details) {\n    if (_startedOnDisabledSegment) {\n      return;\n    }\n    final T touchDownSegment = segmentForXPosition(details.localPosition.dx);\n    if (widget.disabledChildren.contains(touchDownSegment)) {\n      return;\n    }\n    if (isThumbDragging) {\n      onPressedChangedByGesture(touchDownSegment);\n      onHighlightChangedByGesture(touchDownSegment);\n    } else {\n      final T? segment = _hasDraggedTooFar(details)\n          ? null\n          : segmentForXPosition(details.localPosition.dx);\n      onPressedChangedByGesture(segment);\n    }\n  }\n\n  void onEnd(DragEndDetails details) {\n    final T? pressed = this.pressed;\n    if (isThumbDragging) {\n      _playThumbScaleAnimation(isExpanding: true);\n      if (highlighted != widget.groupValue) {\n        widget.onValueChanged(highlighted);\n      }\n    } else if (pressed != null) {\n      onHighlightChangedByGesture(pressed);\n      assert(pressed == highlighted);\n      if (highlighted != widget.groupValue) {\n        widget.onValueChanged(highlighted);\n      }\n    }\n\n    onPressedChangedByGesture(null);\n    _startedOnSelectedSegment = null;\n  }\n\n  void onCancel() {\n    if (isThumbDragging) {\n      _playThumbScaleAnimation(isExpanding: true);\n    }\n    onPressedChangedByGesture(null);\n    _startedOnSelectedSegment = null;\n  }\n\n  T? highlighted;\n\n  T? pressed;\n\n  @override\n  Widget build(BuildContext context) {\n    assert(widget.children.length >= 2);\n    List<Widget> children = <Widget>[];\n    bool isPreviousSegmentHighlighted = false;\n\n    int index = 0;\n    int? highlightedIndex;\n    for (final MapEntry<T, Widget> entry in widget.children.entries) {\n      final bool isHighlighted = highlighted == entry.key;\n      if (isHighlighted) {\n        highlightedIndex = index;\n      }\n\n      if (index != 0) {\n        children.add(\n          _SegmentSeparator(\n            key: ValueKey<int>(index),\n            highlighted: isPreviousSegmentHighlighted || isHighlighted,\n          ),\n        );\n      }\n\n      final TextDirection textDirection = Directionality.of(context);\n      final _SegmentLocation segmentLocation = switch (textDirection) {\n        TextDirection.ltr when index == 0 => _SegmentLocation.leftmost,\n        TextDirection.ltr when index == widget.children.length - 1 =>\n          _SegmentLocation.rightmost,\n        TextDirection.rtl when index == widget.children.length - 1 =>\n          _SegmentLocation.leftmost,\n        TextDirection.rtl when index == 0 => _SegmentLocation.rightmost,\n        TextDirection.ltr || TextDirection.rtl => _SegmentLocation.inbetween,\n      };\n      children.add(\n        Semantics(\n          button: true,\n          onTap: () {\n            if (widget.disabledChildren.contains(entry.key)) {\n              return;\n            }\n            widget.onValueChanged(entry.key);\n          },\n          inMutuallyExclusiveGroup: true,\n          selected: widget.groupValue == entry.key,\n          child: MouseRegion(\n            cursor: kIsWeb ? SystemMouseCursors.click : MouseCursor.defer,\n            child: _Segment<T>(\n              key: ValueKey<T>(entry.key),\n              highlighted: isHighlighted,\n              pressed: pressed == entry.key,\n              isDragging: isThumbDragging,\n              enabled: !widget.disabledChildren.contains(entry.key),\n              segmentLocation: segmentLocation,\n              child: entry.value,\n            ),\n          ),\n        ),\n      );\n\n      index += 1;\n      isPreviousSegmentHighlighted = isHighlighted;\n    }\n\n    assert((highlightedIndex == null) == (highlighted == null));\n\n    switch (Directionality.of(context)) {\n      case TextDirection.ltr:\n        break;\n      case TextDirection.rtl:\n        children = children.reversed.toList(growable: false);\n        if (highlightedIndex != null) {\n          highlightedIndex = index - 1 - highlightedIndex;\n        }\n    }\n\n    return UnconstrainedBox(\n      constrainedAxis: Axis.horizontal,\n      child: Container(\n        clipBehavior: Clip.antiAlias,\n        padding: widget.padding.resolve(Directionality.of(context)),\n        decoration: ShapeDecoration(\n          shape: RoundedSuperellipseBorder(\n            borderRadius: const BorderRadius.all(_kCornerRadius),\n          ),\n          color: widget.backgroundColor,\n        ),\n        child: AnimatedBuilder(\n          animation: thumbScaleAnimation,\n          builder: (BuildContext context, Widget? child) {\n            return _CommonTabBarRenderWidget<T>(\n              proportionalWidth: widget.proportionalWidth,\n              key: segmentedControlRenderWidgetKey,\n              highlightedIndex: highlightedIndex,\n              thumbColor: widget.thumbColor,\n              thumbScale: thumbScaleAnimation.value,\n              state: this,\n              children: children,\n            );\n          },\n        ),\n      ),\n    );\n  }\n}\n\nclass _Segment<T> extends StatefulWidget {\n  const _Segment({\n    required ValueKey<T> key,\n    required this.child,\n    required this.pressed,\n    required this.highlighted,\n    required this.isDragging,\n    required this.enabled,\n    required this.segmentLocation,\n  }) : super(key: key);\n\n  final Widget child;\n\n  final bool pressed;\n  final bool highlighted;\n  final bool enabled;\n  final _SegmentLocation segmentLocation;\n  final bool isDragging;\n\n  bool get shouldFadeoutContent => pressed && !highlighted && enabled;\n\n  bool get shouldScaleContent =>\n      pressed && highlighted && isDragging && enabled;\n\n  @override\n  _SegmentState<T> createState() => _SegmentState<T>();\n}\n\nclass _SegmentState<T> extends State<_Segment<T>>\n    with TickerProviderStateMixin<_Segment<T>> {\n  late final AnimationController highlightPressScaleController;\n  late Animation<double> highlightPressScaleAnimation;\n\n  @override\n  void initState() {\n    super.initState();\n    highlightPressScaleController = AnimationController(\n      duration: _kOpacityAnimationDuration,\n      value: widget.shouldScaleContent ? 1 : 0,\n      vsync: this,\n    );\n\n    highlightPressScaleAnimation = highlightPressScaleController.drive(\n      Tween<double>(begin: 1.0, end: _kMinThumbScale),\n    );\n  }\n\n  @override\n  void didUpdateWidget(_Segment<T> oldWidget) {\n    super.didUpdateWidget(oldWidget);\n    assert(oldWidget.key == widget.key);\n\n    if (oldWidget.shouldScaleContent != widget.shouldScaleContent) {\n      highlightPressScaleAnimation = highlightPressScaleController.drive(\n        Tween<double>(\n          begin: highlightPressScaleAnimation.value,\n          end: widget.shouldScaleContent ? _kMinThumbScale : 1.0,\n        ),\n      );\n      highlightPressScaleController.animateWith(\n        _kThumbSpringAnimationSimulation,\n      );\n    }\n  }\n\n  @override\n  void dispose() {\n    highlightPressScaleController.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    final Alignment scaleAlignment = switch (widget.segmentLocation) {\n      _SegmentLocation.leftmost => Alignment.centerLeft,\n      _SegmentLocation.rightmost => Alignment.centerRight,\n      _SegmentLocation.inbetween => Alignment.center,\n    };\n\n    return MetaData(\n      behavior: HitTestBehavior.opaque,\n      child: IndexedStack(\n        alignment: Alignment.center,\n        children: <Widget>[\n          AnimatedOpacity(\n            opacity: widget.shouldFadeoutContent\n                ? _kContentPressedMinOpacity\n                : 1,\n            duration: _kOpacityAnimationDuration,\n            curve: Curves.ease,\n            child: AnimatedDefaultTextStyle(\n              style: DefaultTextStyle.of(context).style.merge(\n                TextStyle(\n                  fontWeight: widget.highlighted\n                      ? _kHighlightedFontWeight\n                      : _kFontWeight,\n                  fontSize: _kFontSize,\n                  color: widget.enabled ? null : _kDisabledContentColor,\n                ),\n              ),\n              duration: _kHighlightAnimationDuration,\n              curve: Curves.ease,\n              child: ScaleTransition(\n                alignment: scaleAlignment,\n                scale: highlightPressScaleAnimation,\n                child: widget.child,\n              ),\n            ),\n          ),\n          DefaultTextStyle.merge(\n            style: const TextStyle(\n              fontWeight: _kHighlightedFontWeight,\n              fontSize: _kFontSize,\n            ),\n            child: widget.child,\n          ),\n        ],\n      ),\n    );\n  }\n}\n\nclass _SegmentSeparator extends StatefulWidget {\n  const _SegmentSeparator({\n    required ValueKey<int> key,\n    required this.highlighted,\n  }) : super(key: key);\n\n  final bool highlighted;\n\n  @override\n  _SegmentSeparatorState createState() => _SegmentSeparatorState();\n}\n\nclass _SegmentSeparatorState extends State<_SegmentSeparator>\n    with TickerProviderStateMixin<_SegmentSeparator> {\n  late final AnimationController separatorOpacityController;\n\n  @override\n  void initState() {\n    super.initState();\n\n    separatorOpacityController = AnimationController(\n      duration: _kSpringAnimationDuration,\n      value: widget.highlighted ? 0 : 1,\n      vsync: this,\n    );\n  }\n\n  @override\n  void didUpdateWidget(_SegmentSeparator oldWidget) {\n    super.didUpdateWidget(oldWidget);\n    assert(oldWidget.key == widget.key);\n\n    if (oldWidget.highlighted != widget.highlighted) {\n      separatorOpacityController.animateTo(\n        widget.highlighted ? 0 : 1,\n        duration: _kSpringAnimationDuration,\n        curve: Curves.ease,\n      );\n    }\n  }\n\n  @override\n  void dispose() {\n    separatorOpacityController.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return AnimatedBuilder(\n      animation: separatorOpacityController,\n      child: const SizedBox(width: _kSeparatorWidth),\n      builder: (BuildContext context, Widget? child) {\n        return Padding(\n          padding: _kSeparatorInset,\n          child: DecoratedBox(\n            decoration: BoxDecoration(color: Colors.transparent),\n            child: child,\n          ),\n        );\n      },\n    );\n  }\n}\n\nclass _CommonTabBarRenderWidget<T extends Object>\n    extends MultiChildRenderObjectWidget {\n  const _CommonTabBarRenderWidget({\n    super.key,\n    super.children,\n    required this.highlightedIndex,\n    required this.thumbColor,\n    required this.thumbScale,\n    required this.state,\n    required this.proportionalWidth,\n  });\n\n  final int? highlightedIndex;\n  final Color thumbColor;\n  final double thumbScale;\n  final bool proportionalWidth;\n  final _CommonTabBarState<T> state;\n\n  @override\n  RenderObject createRenderObject(BuildContext context) {\n    return _RenderSegmentedControl<T>(\n      highlightedIndex: highlightedIndex,\n      thumbColor: thumbColor,\n      thumbScale: thumbScale,\n      proportionalWidth: proportionalWidth,\n      state: state,\n    );\n  }\n\n  @override\n  void updateRenderObject(\n    BuildContext context,\n    _RenderSegmentedControl<T> renderObject,\n  ) {\n    assert(renderObject.state == state);\n    renderObject\n      ..thumbColor = thumbColor\n      ..thumbScale = thumbScale\n      ..highlightedIndex = highlightedIndex\n      ..proportionalWidth = proportionalWidth;\n  }\n}\n\nclass _SegmentedControlContainerBoxParentData\n    extends ContainerBoxParentData<RenderBox> {}\n\nenum _SegmentLocation { leftmost, rightmost, inbetween }\n\nclass _RenderSegmentedControl<T extends Object> extends RenderBox\n    with\n        ContainerRenderObjectMixin<\n          RenderBox,\n          ContainerBoxParentData<RenderBox>\n        >,\n        RenderBoxContainerDefaultsMixin<\n          RenderBox,\n          ContainerBoxParentData<RenderBox>\n        > {\n  _RenderSegmentedControl({\n    required int? highlightedIndex,\n    required Color thumbColor,\n    required double thumbScale,\n    required bool proportionalWidth,\n    required this.state,\n  }) : _highlightedIndex = highlightedIndex,\n       _thumbColor = thumbColor,\n       _thumbScale = thumbScale,\n       _proportionalWidth = proportionalWidth;\n\n  final _CommonTabBarState<T> state;\n\n  Rect? currentThumbRect;\n\n  @override\n  void attach(PipelineOwner owner) {\n    super.attach(owner);\n    state.thumbController.addListener(markNeedsPaint);\n  }\n\n  @override\n  void detach() {\n    state.thumbController.removeListener(markNeedsPaint);\n    super.detach();\n  }\n\n  double get thumbScale => _thumbScale;\n  double _thumbScale;\n\n  set thumbScale(double value) {\n    if (_thumbScale == value) {\n      return;\n    }\n\n    _thumbScale = value;\n    if (state.highlighted != null) {\n      markNeedsPaint();\n    }\n  }\n\n  int? get highlightedIndex => _highlightedIndex;\n  int? _highlightedIndex;\n\n  set highlightedIndex(int? value) {\n    if (_highlightedIndex == value) {\n      return;\n    }\n\n    _highlightedIndex = value;\n    markNeedsPaint();\n  }\n\n  Color get thumbColor => _thumbColor;\n  Color _thumbColor;\n\n  set thumbColor(Color value) {\n    if (_thumbColor == value) {\n      return;\n    }\n    _thumbColor = value;\n    markNeedsPaint();\n  }\n\n  bool get proportionalWidth => _proportionalWidth;\n  bool _proportionalWidth;\n\n  set proportionalWidth(bool value) {\n    if (_proportionalWidth == value) {\n      return;\n    }\n    _proportionalWidth = value;\n    markNeedsLayout();\n  }\n\n  @override\n  void handleEvent(PointerEvent event, BoxHitTestEntry entry) {\n    assert(debugHandleEvent(event, entry));\n    if (event is PointerDownEvent && !state.isThumbDragging) {\n      state.tap.addPointer(event);\n      state.longPress.addPointer(event);\n      state.drag.addPointer(event);\n    }\n  }\n\n  double get separatorWidth => _kSeparatorInset.horizontal + _kSeparatorWidth;\n\n  double get totalSeparatorWidth => separatorWidth * (childCount ~/ 2);\n\n  int getClosestSegmentIndex(double dx) {\n    int index = 0;\n    RenderBox? child = firstChild;\n    while (child != null) {\n      final _SegmentedControlContainerBoxParentData childParentData =\n          child.parentData! as _SegmentedControlContainerBoxParentData;\n      final double clampX = clampDouble(\n        dx,\n        childParentData.offset.dx,\n        child.size.width + childParentData.offset.dx,\n      );\n\n      if (dx <= clampX) {\n        break;\n      }\n\n      index++;\n      child = nonSeparatorChildAfter(child);\n    }\n\n    final int segmentCount = childCount ~/ 2 + 1;\n    return min(index, segmentCount - 1);\n  }\n\n  RenderBox? nonSeparatorChildAfter(RenderBox child) {\n    final RenderBox? nextChild = childAfter(child);\n    return nextChild == null ? null : childAfter(nextChild);\n  }\n\n  @override\n  double computeMinIntrinsicWidth(double height) {\n    final int childCount = this.childCount ~/ 2 + 1;\n    RenderBox? child = firstChild;\n    double maxMinChildWidth = 0;\n    while (child != null) {\n      final double childWidth = child.getMinIntrinsicWidth(height);\n      maxMinChildWidth = math.max(maxMinChildWidth, childWidth);\n      child = nonSeparatorChildAfter(child);\n    }\n    return (maxMinChildWidth + 2 * _kSegmentMinPadding) * childCount +\n        totalSeparatorWidth;\n  }\n\n  @override\n  double computeMaxIntrinsicWidth(double height) {\n    final int childCount = this.childCount ~/ 2 + 1;\n    RenderBox? child = firstChild;\n    double maxMaxChildWidth = 0;\n    while (child != null) {\n      final double childWidth = child.getMaxIntrinsicWidth(height);\n      maxMaxChildWidth = math.max(maxMaxChildWidth, childWidth);\n      child = nonSeparatorChildAfter(child);\n    }\n    return (maxMaxChildWidth + 2 * _kSegmentMinPadding) * childCount +\n        totalSeparatorWidth;\n  }\n\n  @override\n  double computeMinIntrinsicHeight(double width) {\n    RenderBox? child = firstChild;\n    double maxMinChildHeight = _kMinSegmentedControlHeight;\n    while (child != null) {\n      final double childHeight = child.getMinIntrinsicHeight(width);\n      maxMinChildHeight = math.max(maxMinChildHeight, childHeight);\n      child = nonSeparatorChildAfter(child);\n    }\n    return maxMinChildHeight;\n  }\n\n  @override\n  double computeMaxIntrinsicHeight(double width) {\n    RenderBox? child = firstChild;\n    double maxMaxChildHeight = _kMinSegmentedControlHeight;\n    while (child != null) {\n      final double childHeight = child.getMaxIntrinsicHeight(width);\n      maxMaxChildHeight = math.max(maxMaxChildHeight, childHeight);\n      child = nonSeparatorChildAfter(child);\n    }\n    return maxMaxChildHeight;\n  }\n\n  @override\n  double? computeDistanceToActualBaseline(TextBaseline baseline) {\n    return defaultComputeDistanceToHighestActualBaseline(baseline);\n  }\n\n  @override\n  void setupParentData(RenderBox child) {\n    if (child.parentData is! _SegmentedControlContainerBoxParentData) {\n      child.parentData = _SegmentedControlContainerBoxParentData();\n    }\n  }\n\n  double _getMaxChildHeight(BoxConstraints constraints, double childWidth) {\n    double maxHeight = _kMinSegmentedControlHeight;\n    RenderBox? child = firstChild;\n    while (child != null) {\n      final double boxHeight = child.getMaxIntrinsicHeight(childWidth);\n      maxHeight = math.max(maxHeight, boxHeight);\n      child = nonSeparatorChildAfter(child);\n    }\n    return maxHeight;\n  }\n\n  double _getMaxChildWidth(BoxConstraints constraints) {\n    final int childCount = this.childCount ~/ 2 + 1;\n    double childWidth =\n        (constraints.minWidth - totalSeparatorWidth) / childCount;\n    RenderBox? child = firstChild;\n    while (child != null) {\n      childWidth = math.max(\n        childWidth,\n        child.getMaxIntrinsicWidth(double.infinity) + 2 * _kSegmentMinPadding,\n      );\n      child = nonSeparatorChildAfter(child);\n    }\n    return math.min(\n      childWidth,\n      (constraints.maxWidth - totalSeparatorWidth) / childCount,\n    );\n  }\n\n  List<double> _getChildWidths(BoxConstraints constraints) {\n    if (!proportionalWidth) {\n      final double maxChildWidth = _getMaxChildWidth(constraints);\n      final int segmentCount = childCount ~/ 2 + 1;\n      return List<double>.filled(segmentCount, maxChildWidth);\n    }\n\n    final List<double> segmentWidths = <double>[];\n    RenderBox? child = firstChild;\n    while (child != null) {\n      final double childWidth =\n          child.getMaxIntrinsicWidth(double.infinity) + 2 * _kSegmentMinPadding;\n      child = nonSeparatorChildAfter(child);\n      segmentWidths.add(childWidth);\n    }\n\n    final double totalWidth = segmentWidths.sum;\n    final double allowedMaxWidth = constraints.maxWidth - totalSeparatorWidth;\n    final double allowedMinWidth = constraints.minWidth - totalSeparatorWidth;\n\n    final double scale =\n        clampDouble(totalWidth, allowedMinWidth, allowedMaxWidth) / totalWidth;\n    if (scale != 1) {\n      for (int i = 0; i < segmentWidths.length; i++) {\n        segmentWidths[i] = segmentWidths[i] * scale;\n      }\n    }\n    return segmentWidths;\n  }\n\n  Size _computeOverallSize(BoxConstraints constraints) {\n    final double maxChildHeight = _getMaxChildHeight(\n      constraints,\n      constraints.maxWidth,\n    );\n    return constraints.constrain(\n      Size(\n        _getChildWidths(constraints).sum + totalSeparatorWidth,\n        maxChildHeight,\n      ),\n    );\n  }\n\n  @override\n  double? computeDryBaseline(\n    covariant BoxConstraints constraints,\n    TextBaseline baseline,\n  ) {\n    final List<double> segmentWidths = _getChildWidths(constraints);\n    final double childHeight = _getMaxChildHeight(\n      constraints,\n      constraints.maxWidth,\n    );\n\n    int index = 0;\n    BaselineOffset baselineOffset = BaselineOffset.noBaseline;\n    RenderBox? child = firstChild;\n    while (child != null) {\n      final BoxConstraints childConstraints = BoxConstraints.tight(\n        Size(segmentWidths[index], childHeight),\n      );\n      baselineOffset = baselineOffset.minOf(\n        BaselineOffset(child.getDryBaseline(childConstraints, baseline)),\n      );\n\n      child = nonSeparatorChildAfter(child);\n      index++;\n    }\n\n    return baselineOffset.offset;\n  }\n\n  @override\n  Size computeDryLayout(BoxConstraints constraints) {\n    return _computeOverallSize(constraints);\n  }\n\n  @override\n  void performLayout() {\n    final BoxConstraints constraints = this.constraints;\n    final List<double> segmentWidths = _getChildWidths(constraints);\n\n    final double childHeight = _getMaxChildHeight(constraints, double.infinity);\n    final BoxConstraints separatorConstraints = BoxConstraints(\n      minHeight: childHeight,\n      maxHeight: childHeight,\n    );\n    RenderBox? child = firstChild;\n    int index = 0;\n    double start = 0;\n    while (child != null) {\n      final BoxConstraints childConstraints = BoxConstraints.tight(\n        Size(segmentWidths[index ~/ 2], childHeight),\n      );\n      child.layout(\n        index.isEven ? childConstraints : separatorConstraints,\n        parentUsesSize: true,\n      );\n      final _SegmentedControlContainerBoxParentData childParentData =\n          child.parentData! as _SegmentedControlContainerBoxParentData;\n      final Offset childOffset = Offset(start, 0);\n      childParentData.offset = childOffset;\n      start += child.size.width;\n      assert(\n        index.isEven ||\n            child.size.width == _kSeparatorWidth + _kSeparatorInset.horizontal,\n        '${child.size.width} != ${_kSeparatorWidth + _kSeparatorInset.horizontal}',\n      );\n      child = childAfter(child);\n      index += 1;\n    }\n    size = _computeOverallSize(constraints);\n  }\n\n  Rect? moveThumbRectInBound(Rect? thumbRect, List<RenderBox> children) {\n    assert(hasSize);\n    assert(children.length >= 2);\n    if (thumbRect == null) {\n      return null;\n    }\n\n    final Offset firstChildOffset =\n        (children.first.parentData! as _SegmentedControlContainerBoxParentData)\n            .offset;\n    final double leftMost = firstChildOffset.dx;\n    final double rightMost =\n        (children.last.parentData! as _SegmentedControlContainerBoxParentData)\n            .offset\n            .dx +\n        children.last.size.width;\n    assert(rightMost > leftMost);\n    return Rect.fromLTRB(\n      math.max(thumbRect.left, leftMost - _kThumbInsets.left),\n      firstChildOffset.dy - _kThumbInsets.top,\n      math.min(thumbRect.right, rightMost + _kThumbInsets.right),\n      firstChildOffset.dy + children.first.size.height + _kThumbInsets.bottom,\n    );\n  }\n\n  @override\n  void paint(PaintingContext context, Offset offset) {\n    final List<RenderBox> children = getChildrenAsList();\n    for (int index = 1; index < childCount; index += 2) {\n      _paintSeparator(context, offset, children[index]);\n    }\n\n    final int? highlightedChildIndex = highlightedIndex;\n    if (highlightedChildIndex != null) {\n      final RenderBox selectedChild = children[highlightedChildIndex * 2];\n\n      final _SegmentedControlContainerBoxParentData childParentData =\n          selectedChild.parentData! as _SegmentedControlContainerBoxParentData;\n      final Rect newThumbRect = _kThumbInsets.inflateRect(\n        childParentData.offset & selectedChild.size,\n      );\n      if (state.thumbController.isAnimating) {\n        final Animatable<Rect?>? thumbTween = state.thumbAnimatable;\n        if (thumbTween == null) {\n          final Rect startingRect =\n              moveThumbRectInBound(currentThumbRect, children) ?? newThumbRect;\n          state.thumbAnimatable = RectTween(\n            begin: startingRect,\n            end: newThumbRect,\n          );\n        } else if (newThumbRect != thumbTween.transform(1)) {\n          final Rect startingRect =\n              moveThumbRectInBound(currentThumbRect, children) ?? newThumbRect;\n          state.thumbAnimatable = RectTween(\n            begin: startingRect,\n            end: newThumbRect,\n          ).chain(CurveTween(curve: Interval(state.thumbController.value, 1)));\n        }\n      } else {\n        state.thumbAnimatable = null;\n      }\n\n      final Rect unscaledThumbRect =\n          state.thumbAnimatable?.evaluate(state.thumbController) ??\n          newThumbRect;\n      currentThumbRect = unscaledThumbRect;\n\n      final _SegmentLocation childLocation;\n      if (highlightedChildIndex == 0) {\n        childLocation = _SegmentLocation.leftmost;\n      } else if (highlightedChildIndex == children.length ~/ 2) {\n        childLocation = _SegmentLocation.rightmost;\n      } else {\n        childLocation = _SegmentLocation.inbetween;\n      }\n      final double delta = switch (childLocation) {\n        _SegmentLocation.leftmost =>\n          unscaledThumbRect.width - unscaledThumbRect.width * thumbScale,\n        _SegmentLocation.rightmost =>\n          unscaledThumbRect.width * thumbScale - unscaledThumbRect.width,\n        _SegmentLocation.inbetween => 0,\n      };\n      final Rect thumbRect = Rect.fromCenter(\n        center: unscaledThumbRect.center - Offset(delta / 2, 0),\n        width: unscaledThumbRect.width * thumbScale,\n        height: unscaledThumbRect.height * thumbScale,\n      );\n\n      _paintThumb(context, offset, thumbRect);\n    } else {\n      currentThumbRect = null;\n    }\n\n    for (int index = 0; index < children.length; index += 2) {\n      _paintChild(context, offset, children[index]);\n    }\n  }\n\n  final Paint separatorPaint = Paint();\n\n  void _paintSeparator(\n    PaintingContext context,\n    Offset offset,\n    RenderBox child,\n  ) {\n    final _SegmentedControlContainerBoxParentData childParentData =\n        child.parentData! as _SegmentedControlContainerBoxParentData;\n    context.paintChild(child, offset + childParentData.offset);\n  }\n\n  void _paintChild(PaintingContext context, Offset offset, RenderBox child) {\n    final _SegmentedControlContainerBoxParentData childParentData =\n        child.parentData! as _SegmentedControlContainerBoxParentData;\n    context.paintChild(child, childParentData.offset + offset);\n  }\n\n  void _paintThumb(PaintingContext context, Offset offset, Rect thumbRect) {\n    final RSuperellipse thumbRSuperellipse = RSuperellipse.fromRectAndRadius(\n      thumbRect.shift(offset),\n      _kThumbRadius,\n    );\n\n    context.canvas.drawRSuperellipse(\n      thumbRSuperellipse.inflate(0.5),\n      Paint()..color = const Color(0x0A000000),\n    );\n\n    context.canvas.drawRSuperellipse(\n      thumbRSuperellipse,\n      Paint()..color = thumbColor,\n    );\n  }\n\n  @override\n  bool hitTestChildren(BoxHitTestResult result, {required Offset position}) {\n    RenderBox? child = lastChild;\n    while (child != null) {\n      final _SegmentedControlContainerBoxParentData childParentData =\n          child.parentData! as _SegmentedControlContainerBoxParentData;\n      if ((childParentData.offset & child.size).contains(position)) {\n        return result.addWithPaintOffset(\n          offset: childParentData.offset,\n          position: position,\n          hitTest: (BoxHitTestResult result, Offset localOffset) {\n            assert(localOffset == position - childParentData.offset);\n            return child!.hitTest(result, position: localOffset);\n          },\n        );\n      }\n      child = childParentData.previousSibling;\n    }\n    return false;\n  }\n}\n"
  },
  {
    "path": "lib/widgets/text.dart",
    "content": "import 'package:emoji_regex/emoji_regex.dart';\nimport 'package:fl_clash/enum/enum.dart';\nimport 'package:flutter/material.dart';\n\nimport '../state.dart';\n\nclass TooltipText extends StatelessWidget {\n  final Text text;\n\n  const TooltipText({\n    super.key,\n    required this.text,\n  });\n\n  @override\n  Widget build(BuildContext context) {\n    return LayoutBuilder(\n      builder: (context, container) {\n        final maxWidth = container.maxWidth;\n        final size = globalState.measure.computeTextSize(\n          text,\n        );\n        if (maxWidth < size.width) {\n          return Tooltip(\n            triggerMode: TooltipTriggerMode.longPress,\n            preferBelow: false,\n            message: text.data,\n            child: text,\n          );\n        }\n        return text;\n      },\n    );\n  }\n}\n\nclass EmojiText extends StatelessWidget {\n  final String text;\n  final TextStyle? style;\n  final int? maxLines;\n  final TextOverflow? overflow;\n\n  const EmojiText(\n    this.text, {\n    super.key,\n    this.maxLines,\n    this.overflow,\n    this.style,\n  });\n\n  List<TextSpan> _buildTextSpans(String emojis) {\n    final List<TextSpan> spans = [];\n    final matches = emojiRegex().allMatches(text);\n\n    int lastMatchEnd = 0;\n    for (final match in matches) {\n      if (match.start > lastMatchEnd) {\n        spans.add(\n          TextSpan(\n              text: text.substring(lastMatchEnd, match.start), style: style),\n        );\n      }\n      spans.add(\n        TextSpan(\n          text: match.group(0),\n          style: style?.copyWith(\n            fontFamily: FontFamily.twEmoji.value,\n          ),\n        ),\n      );\n      lastMatchEnd = match.end;\n    }\n    if (lastMatchEnd < text.length) {\n      spans.add(\n        TextSpan(\n          text: text.substring(lastMatchEnd),\n          style: style,\n        ),\n      );\n    }\n\n    return spans;\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return RichText(\n      textScaler: MediaQuery.of(context).textScaler,\n      maxLines: maxLines,\n      overflow: overflow ?? TextOverflow.clip,\n      text: TextSpan(\n        children: _buildTextSpans(text),\n      ),\n    );\n  }\n}\n\n// class HighlightText extends StatelessWidget {\n//   const HighlightText({super.key});\n//\n//   @override\n//   Widget build(BuildContext context) {\n//     return RichText(\n//       textScaler: MediaQuery.of(context).textScaler,\n//       maxLines: maxLines,\n//       overflow: overflow ?? TextOverflow.clip,\n//       text: TextSpan(\n//         children: _buildTextSpans(text),\n//       ),\n//     );\n//   }\n// }\n"
  },
  {
    "path": "lib/widgets/theme.dart",
    "content": "import 'package:fl_clash/common/common.dart';\nimport 'package:flutter/material.dart';\n\nclass CommonMinFilledButtonTheme extends StatelessWidget {\n  final Widget child;\n\n  const CommonMinFilledButtonTheme({super.key, required this.child});\n\n  @override\n  Widget build(BuildContext context) {\n    return FilledButtonTheme(\n      data: FilledButtonThemeData(\n        style: FilledButton.styleFrom(\n          padding: EdgeInsets.symmetric(horizontal: 8),\n          tapTargetSize: MaterialTapTargetSize.shrinkWrap,\n          visualDensity: VisualDensity.compact,\n        ),\n      ),\n      child: child,\n    );\n  }\n}\n\nclass CommonMinIconButtonTheme extends StatelessWidget {\n  final Widget child;\n\n  const CommonMinIconButtonTheme({super.key, required this.child});\n\n  @override\n  Widget build(BuildContext context) {\n    return IconButtonTheme(\n      data: IconButtonThemeData(\n        style: IconButton.styleFrom(\n          padding: EdgeInsets.symmetric(horizontal: 4),\n          visualDensity: VisualDensity.compact,\n          tapTargetSize: MaterialTapTargetSize.shrinkWrap,\n          iconSize: 20.ap,\n        ),\n      ),\n      child: child,\n    );\n  }\n}\n"
  },
  {
    "path": "lib/widgets/view.dart",
    "content": "import 'package:flutter/cupertino.dart';\n\nclass CommonView extends StatefulWidget {\n  final List<Widget> actions;\n\n  const CommonView({\n    super.key,\n    required this.actions,\n  });\n\n  @override\n  State<CommonView> createState() => _CommonViewState();\n}\n\nclass _CommonViewState extends State<CommonView> {\n  @override\n  Widget build(BuildContext context) {\n    return const Placeholder();\n  }\n}\n"
  },
  {
    "path": "lib/widgets/wave.dart",
    "content": "import 'dart:math';\n\nimport 'package:flutter/material.dart';\n\nclass WaveView extends StatefulWidget {\n  final double waveAmplitude;\n  final double waveFrequency;\n  final Color waveColor;\n  final Duration duration;\n\n  const WaveView({\n    super.key,\n    this.waveAmplitude = 50.0,\n    this.waveFrequency = 1.5,\n    required this.waveColor,\n    this.duration = const Duration(seconds: 2),\n  });\n\n  @override\n  State<WaveView> createState() => _WaveViewState();\n}\n\nclass _WaveViewState extends State<WaveView>\n    with SingleTickerProviderStateMixin {\n  late AnimationController _controller;\n\n  @override\n  void initState() {\n    super.initState();\n    _controller = AnimationController(\n      vsync: this,\n      duration: widget.duration,\n    )..repeat();\n  }\n\n  @override\n  void dispose() {\n    _controller.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return LayoutBuilder(builder: (_, constraints) {\n      return RepaintBoundary(\n        child: AnimatedBuilder(\n          animation: _controller,\n          builder: (context, child) {\n            return CustomPaint(\n              painter: WavePainter(\n                animationValue: _controller.value,\n                waveAmplitude: widget.waveAmplitude,\n                waveFrequency: widget.waveFrequency,\n                waveColor: widget.waveColor,\n              ),\n              size: Size(\n                constraints.maxWidth,\n                constraints.maxHeight,\n              ),\n            );\n          },\n        ),\n      );\n    });\n  }\n}\n\nclass WavePainter extends CustomPainter {\n  final double animationValue;\n  final double waveAmplitude;\n  final double waveFrequency;\n  final Color waveColor;\n\n  late final Paint _paint;\n  late final Path _path;\n\n  static const int _samplePoints = 40;\n  static const double _twoPi = 2 * pi;\n\n  WavePainter({\n    required this.animationValue,\n    required this.waveAmplitude,\n    required this.waveFrequency,\n    required this.waveColor,\n  }) {\n    _paint = Paint()\n      ..color = waveColor\n      ..style = PaintingStyle.fill;\n    _path = Path();\n  }\n\n  @override\n  void paint(Canvas canvas, Size size) {\n    _paint.color = waveColor;\n    _path.reset();\n\n    final baseHeight = size.height / 3;\n    final phase = animationValue * _twoPi;\n    final widthFactor = _twoPi * waveFrequency / size.width;\n    final step = size.width / _samplePoints;\n\n    _path.moveTo(0, baseHeight);\n\n    for (var i = 0; i <= _samplePoints; i++) {\n      final x = i * step;\n      final y = waveAmplitude * sin(x * widthFactor + phase);\n      _path.lineTo(x, baseHeight + y);\n    }\n\n    _path.lineTo(size.width, size.height);\n    _path.lineTo(0, size.height);\n    _path.close();\n\n    canvas.drawPath(_path, _paint);\n  }\n\n  @override\n  bool shouldRepaint(covariant WavePainter oldDelegate) {\n    return oldDelegate.animationValue != animationValue ||\n        oldDelegate.waveAmplitude != waveAmplitude ||\n        oldDelegate.waveFrequency != waveFrequency ||\n        oldDelegate.waveColor != waveColor;\n  }\n}\n"
  },
  {
    "path": "lib/widgets/widgets.dart",
    "content": "export 'activate_box.dart';\nexport 'animate_grid.dart';\nexport 'builder.dart';\nexport 'button.dart';\nexport 'card.dart';\nexport 'chip.dart';\nexport 'color_scheme_box.dart';\nexport 'container.dart';\nexport 'dialog.dart';\nexport 'disabled_mask.dart';\nexport 'donut_chart.dart';\nexport 'effect.dart';\nexport 'fade_box.dart';\nexport 'float_layout.dart';\nexport 'grid.dart';\nexport 'icon.dart';\nexport 'inherited.dart';\nexport 'input.dart';\nexport 'keep_scope.dart';\nexport 'line_chart.dart';\nexport 'list.dart';\nexport 'loading.dart';\nexport 'notification.dart';\nexport 'null_status.dart';\nexport 'open_container.dart';\nexport 'palette.dart';\nexport 'pop_scope.dart';\nexport 'popup.dart';\nexport 'scaffold.dart';\nexport 'scroll.dart';\nexport 'setting.dart';\nexport 'sheet.dart';\nexport 'side_sheet.dart';\nexport 'subscription_info_view.dart';\nexport 'super_grid.dart';\nexport 'tab.dart';\nexport 'text.dart';\nexport 'theme.dart';\nexport 'wave.dart';\n"
  },
  {
    "path": "linux/.gitignore",
    "content": "flutter/ephemeral\n"
  },
  {
    "path": "linux/CMakeLists.txt",
    "content": "# Project-level configuration.\ncmake_minimum_required(VERSION 3.13)\nproject(runner LANGUAGES CXX)\n\n# The name of the executable created for the application. Change this to change\n# the on-disk name of your application.\nset(BINARY_NAME \"FlClash\")\n# The unique GTK application identifier for this application. See:\n# https://wiki.gnome.org/HowDoI/ChooseApplicationID\nset(APPLICATION_ID \"com.follow.clash\")\n\n# Explicitly opt in to modern CMake behaviors to avoid warnings with recent\n# versions of CMake.\ncmake_policy(SET CMP0063 NEW)\n\n# Load bundled libraries from the lib/ directory relative to the binary.\nset(CMAKE_INSTALL_RPATH \"$ORIGIN/lib\")\n\n# Root filesystem for cross-building.\nif(FLUTTER_TARGET_PLATFORM_SYSROOT)\n  set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})\n  set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})\n  set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\n  set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)\n  set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\n  set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\nendif()\n\n# Define build configuration options.\nif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)\n  set(CMAKE_BUILD_TYPE \"Debug\" CACHE\n    STRING \"Flutter build mode\" FORCE)\n  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS\n    \"Debug\" \"Profile\" \"Release\")\nendif()\n\n# Compilation settings that should be applied to most targets.\n#\n# Be cautious about adding new options here, as plugins use this function by\n# default. In most cases, you should add new options to specific targets instead\n# of modifying this function.\nfunction(APPLY_STANDARD_SETTINGS TARGET)\n  target_compile_features(${TARGET} PUBLIC cxx_std_14)\n  target_compile_options(${TARGET} PRIVATE -Wall -Werror)\n  target_compile_options(${TARGET} PRIVATE \"$<$<NOT:$<CONFIG:Debug>>:-O3>\")\n  target_compile_definitions(${TARGET} PRIVATE \"$<$<NOT:$<CONFIG:Debug>>:NDEBUG>\")\nendfunction()\n\n# Flutter library and tool build rules.\nset(FLUTTER_MANAGED_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/flutter\")\nadd_subdirectory(${FLUTTER_MANAGED_DIR})\n\n# System-level dependencies.\nfind_package(PkgConfig REQUIRED)\npkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)\n\n# Application build; see runner/CMakeLists.txt.\nadd_subdirectory(\"runner\")\n\n# Run the Flutter tool portions of the build. This must not be removed.\nadd_dependencies(${BINARY_NAME} flutter_assemble)\n\n# Only the install-generated bundle's copy of the executable will launch\n# correctly, since the resources must in the right relative locations. To avoid\n# people trying to run the unbundled copy, put it in a subdirectory instead of\n# the default top-level location.\nset_target_properties(${BINARY_NAME}\n  PROPERTIES\n  RUNTIME_OUTPUT_DIRECTORY \"${CMAKE_BINARY_DIR}/intermediates_do_not_run\"\n)\n\n\n# Generated plugin build rules, which manage building the plugins and adding\n# them to the application.\ninclude(flutter/generated_plugins.cmake)\n\n\n# === Installation ===\n# By default, \"installing\" just makes a relocatable bundle in the build\n# directory.\nset(BUILD_BUNDLE_DIR \"${PROJECT_BINARY_DIR}/bundle\")\nif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)\n  set(CMAKE_INSTALL_PREFIX \"${BUILD_BUNDLE_DIR}\" CACHE PATH \"...\" FORCE)\nendif()\n\n# Start with a clean build bundle directory every time.\ninstall(CODE \"\n  file(REMOVE_RECURSE \\\"${BUILD_BUNDLE_DIR}/\\\")\n  \" COMPONENT Runtime)\n\nset(INSTALL_BUNDLE_DATA_DIR \"${CMAKE_INSTALL_PREFIX}/data\")\nset(INSTALL_BUNDLE_LIB_DIR \"${CMAKE_INSTALL_PREFIX}/lib\")\n\ninstall(TARGETS ${BINARY_NAME} RUNTIME DESTINATION \"${CMAKE_INSTALL_PREFIX}\"\n  COMPONENT Runtime)\n\ninstall(FILES \"${FLUTTER_ICU_DATA_FILE}\" DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\"\n  COMPONENT Runtime)\n\ninstall(FILES \"${FLUTTER_LIBRARY}\" DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n  COMPONENT Runtime)\n\nforeach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})\n  install(FILES \"${bundled_library}\"\n    DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n    COMPONENT Runtime)\nendforeach(bundled_library)\n\n# Core\nset(CLASH_DIR \"../libclash/linux\")\ninstall(PROGRAMS \"${CLASH_DIR}/FlClashCore\" DESTINATION \"${BUILD_BUNDLE_DIR}\"\n  COMPONENT Runtime)\n\n\n# Copy the native assets provided by the build.dart from all packages.\nset(NATIVE_ASSETS_DIR \"${PROJECT_BUILD_DIR}native_assets/linux/\")\ninstall(DIRECTORY \"${NATIVE_ASSETS_DIR}\"\n   DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n   COMPONENT Runtime)\n\n# Fully re-copy the assets directory on each build to avoid having stale files\n# from a previous install.\nset(FLUTTER_ASSET_DIR_NAME \"flutter_assets\")\ninstall(CODE \"\n  file(REMOVE_RECURSE \\\"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\\\")\n  \" COMPONENT Runtime)\ninstall(DIRECTORY \"${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}\"\n  DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\" COMPONENT Runtime)\n\n# Install the AOT library on non-Debug builds only.\nif(NOT CMAKE_BUILD_TYPE MATCHES \"Debug\")\n  install(FILES \"${AOT_LIBRARY}\" DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n    COMPONENT Runtime)\nendif()\n"
  },
  {
    "path": "linux/flutter/CMakeLists.txt",
    "content": "# This file controls Flutter-level build steps. It should not be edited.\ncmake_minimum_required(VERSION 3.10)\n\nset(EPHEMERAL_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/ephemeral\")\n\n# Configuration provided via flutter tool.\ninclude(${EPHEMERAL_DIR}/generated_config.cmake)\n\n# TODO: Move the rest of this into files in ephemeral. See\n# https://github.com/flutter/flutter/issues/57146.\n\n# Serves the same purpose as list(TRANSFORM ... PREPEND ...),\n# which isn't available in 3.10.\nfunction(list_prepend LIST_NAME PREFIX)\n    set(NEW_LIST \"\")\n    foreach(element ${${LIST_NAME}})\n        list(APPEND NEW_LIST \"${PREFIX}${element}\")\n    endforeach(element)\n    set(${LIST_NAME} \"${NEW_LIST}\" PARENT_SCOPE)\nendfunction()\n\n# === Flutter Library ===\n# System-level dependencies.\nfind_package(PkgConfig REQUIRED)\npkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)\npkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)\npkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)\n\nset(FLUTTER_LIBRARY \"${EPHEMERAL_DIR}/libflutter_linux_gtk.so\")\n\n# Published to parent scope for install step.\nset(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)\nset(FLUTTER_ICU_DATA_FILE \"${EPHEMERAL_DIR}/icudtl.dat\" PARENT_SCOPE)\nset(PROJECT_BUILD_DIR \"${PROJECT_DIR}/build/\" PARENT_SCOPE)\nset(AOT_LIBRARY \"${PROJECT_DIR}/build/lib/libapp.so\" PARENT_SCOPE)\n\nlist(APPEND FLUTTER_LIBRARY_HEADERS\n  \"fl_basic_message_channel.h\"\n  \"fl_binary_codec.h\"\n  \"fl_binary_messenger.h\"\n  \"fl_dart_project.h\"\n  \"fl_engine.h\"\n  \"fl_json_message_codec.h\"\n  \"fl_json_method_codec.h\"\n  \"fl_message_codec.h\"\n  \"fl_method_call.h\"\n  \"fl_method_channel.h\"\n  \"fl_method_codec.h\"\n  \"fl_method_response.h\"\n  \"fl_plugin_registrar.h\"\n  \"fl_plugin_registry.h\"\n  \"fl_standard_message_codec.h\"\n  \"fl_standard_method_codec.h\"\n  \"fl_string_codec.h\"\n  \"fl_value.h\"\n  \"fl_view.h\"\n  \"flutter_linux.h\"\n)\nlist_prepend(FLUTTER_LIBRARY_HEADERS \"${EPHEMERAL_DIR}/flutter_linux/\")\nadd_library(flutter INTERFACE)\ntarget_include_directories(flutter INTERFACE\n  \"${EPHEMERAL_DIR}\"\n)\ntarget_link_libraries(flutter INTERFACE \"${FLUTTER_LIBRARY}\")\ntarget_link_libraries(flutter INTERFACE\n  PkgConfig::GTK\n  PkgConfig::GLIB\n  PkgConfig::GIO\n)\nadd_dependencies(flutter flutter_assemble)\n\n# === Flutter tool backend ===\n# _phony_ is a non-existent file to force this command to run every time,\n# since currently there's no way to get a full input/output list from the\n# flutter tool.\nadd_custom_command(\n  OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}\n    ${CMAKE_CURRENT_BINARY_DIR}/_phony_\n  COMMAND ${CMAKE_COMMAND} -E env\n    ${FLUTTER_TOOL_ENVIRONMENT}\n    \"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh\"\n      ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}\n  VERBATIM\n)\nadd_custom_target(flutter_assemble DEPENDS\n  \"${FLUTTER_LIBRARY}\"\n  ${FLUTTER_LIBRARY_HEADERS}\n)\n"
  },
  {
    "path": "linux/flutter/generated_plugin_registrant.cc",
    "content": "//\n//  Generated file. Do not edit.\n//\n\n// clang-format off\n\n#include \"generated_plugin_registrant.h\"\n\n#include <dynamic_color/dynamic_color_plugin.h>\n#include <file_selector_linux/file_selector_plugin.h>\n#include <flutter_js/flutter_js_plugin.h>\n#include <gtk/gtk_plugin.h>\n#include <hotkey_manager_linux/hotkey_manager_linux_plugin.h>\n#include <screen_retriever_linux/screen_retriever_linux_plugin.h>\n#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>\n#include <tray_manager/tray_manager_plugin.h>\n#include <url_launcher_linux/url_launcher_plugin.h>\n#include <window_manager/window_manager_plugin.h>\n\nvoid fl_register_plugins(FlPluginRegistry* registry) {\n  g_autoptr(FlPluginRegistrar) dynamic_color_registrar =\n      fl_plugin_registry_get_registrar_for_plugin(registry, \"DynamicColorPlugin\");\n  dynamic_color_plugin_register_with_registrar(dynamic_color_registrar);\n  g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =\n      fl_plugin_registry_get_registrar_for_plugin(registry, \"FileSelectorPlugin\");\n  file_selector_plugin_register_with_registrar(file_selector_linux_registrar);\n  g_autoptr(FlPluginRegistrar) flutter_js_registrar =\n      fl_plugin_registry_get_registrar_for_plugin(registry, \"FlutterJsPlugin\");\n  flutter_js_plugin_register_with_registrar(flutter_js_registrar);\n  g_autoptr(FlPluginRegistrar) gtk_registrar =\n      fl_plugin_registry_get_registrar_for_plugin(registry, \"GtkPlugin\");\n  gtk_plugin_register_with_registrar(gtk_registrar);\n  g_autoptr(FlPluginRegistrar) hotkey_manager_linux_registrar =\n      fl_plugin_registry_get_registrar_for_plugin(registry, \"HotkeyManagerLinuxPlugin\");\n  hotkey_manager_linux_plugin_register_with_registrar(hotkey_manager_linux_registrar);\n  g_autoptr(FlPluginRegistrar) screen_retriever_linux_registrar =\n      fl_plugin_registry_get_registrar_for_plugin(registry, \"ScreenRetrieverLinuxPlugin\");\n  screen_retriever_linux_plugin_register_with_registrar(screen_retriever_linux_registrar);\n  g_autoptr(FlPluginRegistrar) sqlite3_flutter_libs_registrar =\n      fl_plugin_registry_get_registrar_for_plugin(registry, \"Sqlite3FlutterLibsPlugin\");\n  sqlite3_flutter_libs_plugin_register_with_registrar(sqlite3_flutter_libs_registrar);\n  g_autoptr(FlPluginRegistrar) tray_manager_registrar =\n      fl_plugin_registry_get_registrar_for_plugin(registry, \"TrayManagerPlugin\");\n  tray_manager_plugin_register_with_registrar(tray_manager_registrar);\n  g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =\n      fl_plugin_registry_get_registrar_for_plugin(registry, \"UrlLauncherPlugin\");\n  url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);\n  g_autoptr(FlPluginRegistrar) window_manager_registrar =\n      fl_plugin_registry_get_registrar_for_plugin(registry, \"WindowManagerPlugin\");\n  window_manager_plugin_register_with_registrar(window_manager_registrar);\n}\n"
  },
  {
    "path": "linux/flutter/generated_plugin_registrant.h",
    "content": "//\n//  Generated file. Do not edit.\n//\n\n// clang-format off\n\n#ifndef GENERATED_PLUGIN_REGISTRANT_\n#define GENERATED_PLUGIN_REGISTRANT_\n\n#include <flutter_linux/flutter_linux.h>\n\n// Registers Flutter plugins.\nvoid fl_register_plugins(FlPluginRegistry* registry);\n\n#endif  // GENERATED_PLUGIN_REGISTRANT_\n"
  },
  {
    "path": "linux/flutter/generated_plugins.cmake",
    "content": "#\n# Generated file, do not edit.\n#\n\nlist(APPEND FLUTTER_PLUGIN_LIST\n  dynamic_color\n  file_selector_linux\n  flutter_js\n  gtk\n  hotkey_manager_linux\n  screen_retriever_linux\n  sqlite3_flutter_libs\n  tray_manager\n  url_launcher_linux\n  window_manager\n)\n\nlist(APPEND FLUTTER_FFI_PLUGIN_LIST\n)\n\nset(PLUGIN_BUNDLED_LIBRARIES)\n\nforeach(plugin ${FLUTTER_PLUGIN_LIST})\n  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})\n  target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})\nendforeach(plugin)\n\nforeach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})\n  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})\nendforeach(ffi_plugin)\n"
  },
  {
    "path": "linux/packaging/appimage/make_config.yaml",
    "content": "display_name: FlClash\n\nicon: ./assets/images/icon.png\n\nkeywords:\n  - FlClash\n  - Clash\n  - ClashMeta\n  - Proxy\n\ngeneric_name: FlClash\n\ncategories:\n  - Network\n\nstartup_notify: true\n\ninclude: []"
  },
  {
    "path": "linux/packaging/deb/make_config.yaml",
    "content": "display_name: FlClash\npackage_name: FlClash\nmaintainer:\n  name: chen08209\n  email: chen08209@gmail.com\n\npriority: optional\nsection: x11\ninstalled_size: 6604\nessential: false\nicon: ./assets/images/icon.png\n\ndependencies:\n  - libayatana-appindicator3-dev\n  - libkeybinder-3.0-dev\n\nkeywords:\n  - FlClash\n  - Clash\n  - ClashMeta\n  - Proxy\n\ngeneric_name: FlClash\n\ncategories:\n  - Network\n\nstartup_notify: true"
  },
  {
    "path": "linux/packaging/rpm/make_config.yaml",
    "content": "display_name: FlClash\n\npackager: chen08209\npackagerEmail: chen08209@gmail.com\nlicense: Other\n\npriority: optional\nsection: x11\ninstalled_size: 6604\nessential: false\nicon: ./assets/images/icon.png\n\nkeywords:\n  - FlClash\n  - Clash\n  - ClashMeta\n  - Proxy\n\ngeneric_name: FlClash\n\ngroup: Applications/Internet\n\nstartup_notify: true"
  },
  {
    "path": "linux/runner/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.13)\nproject(runner LANGUAGES CXX)\n\n# Define the application target. To change its name, change BINARY_NAME in the\n# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer\n# work.\n#\n# Any new source files that you add to the application should be added here.\nadd_executable(${BINARY_NAME}\n  \"main.cc\"\n  \"my_application.cc\"\n  \"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc\"\n)\n\n# Apply the standard set of build settings. This can be removed for applications\n# that need different build settings.\napply_standard_settings(${BINARY_NAME})\n\n# Add preprocessor definitions for the application ID.\nadd_definitions(-DAPPLICATION_ID=\"${APPLICATION_ID}\")\n\n# Add dependency libraries. Add any application-specific dependencies here.\ntarget_link_libraries(${BINARY_NAME} PRIVATE flutter)\ntarget_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)\n\ntarget_include_directories(${BINARY_NAME} PRIVATE \"${CMAKE_SOURCE_DIR}\")\n"
  },
  {
    "path": "linux/runner/main.cc",
    "content": "#include \"my_application.h\"\n\nint main(int argc, char** argv) {\n  g_autoptr(MyApplication) app = my_application_new();\n  return g_application_run(G_APPLICATION(app), argc, argv);\n}\n"
  },
  {
    "path": "linux/runner/my_application.cc",
    "content": "#include \"my_application.h\"\n\n#include <flutter_linux/flutter_linux.h>\n#ifdef GDK_WINDOWING_X11\n#include <gdk/gdkx.h>\n#endif\n\n#include \"flutter/generated_plugin_registrant.h\"\n\nstruct _MyApplication {\n  GtkApplication parent_instance;\n  char** dart_entrypoint_arguments;\n};\n\nG_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)\n\n// Called when first Flutter frame received.\nstatic void first_frame_cb(MyApplication* self, FlView *view)\n{\n  gtk_widget_show(gtk_widget_get_toplevel(GTK_WIDGET(view)));\n}\n\n// Implements GApplication::activate.\nstatic void my_application_activate(GApplication* application) {\n  MyApplication* self = MY_APPLICATION(application);\n  GtkWindow* window =\n      GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));\n\n  // Use a header bar when running in GNOME as this is the common style used\n  // by applications and is the setup most users will be using (e.g. Ubuntu\n  // desktop).\n  // If running on X and not using GNOME then just use a traditional title bar\n  // in case the window manager does more exotic layout, e.g. tiling.\n  // If running on Wayland assume the header bar will work (may need changing\n  // if future cases occur).\n  gboolean use_header_bar = TRUE;\n#ifdef GDK_WINDOWING_X11\n  GdkScreen* screen = gtk_window_get_screen(window);\n  if (GDK_IS_X11_SCREEN(screen)) {\n    const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);\n    if (g_strcmp0(wm_name, \"GNOME Shell\") != 0) {\n      use_header_bar = FALSE;\n    }\n  }\n#endif\n  if (use_header_bar) {\n    GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());\n    gtk_widget_show(GTK_WIDGET(header_bar));\n    gtk_header_bar_set_title(header_bar, \"FlClash\");\n    gtk_header_bar_set_show_close_button(header_bar, TRUE);\n    gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));\n  } else {\n    gtk_window_set_title(window, \"FlClash\");\n  }\n\n  gtk_window_set_default_size(window, 1280, 720);\n\n  g_autoptr(FlDartProject) project = fl_dart_project_new();\n  fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);\n\n  FlView* view = fl_view_new(project);\n  GdkRGBA background_color;\n  // Background defaults to black, override it here if necessary, e.g. #00000000 for transparent.\n  gdk_rgba_parse(&background_color, \"#000000\");\n  fl_view_set_background_color(view, &background_color);\n  gtk_widget_show(GTK_WIDGET(view));\n  gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));\n\n  // Show the window when Flutter renders.\n  // Requires the view to be realized so we can start rendering.\n  g_signal_connect_swapped(view, \"first-frame\", G_CALLBACK(first_frame_cb), self);\n  gtk_widget_realize(GTK_WIDGET(view));\n\n  fl_register_plugins(FL_PLUGIN_REGISTRY(view));\n\n  gtk_widget_grab_focus(GTK_WIDGET(view));\n}\n\n// Implements GApplication::local_command_line.\nstatic gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) {\n  MyApplication* self = MY_APPLICATION(application);\n  // Strip out the first argument as it is the binary name.\n  self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);\n\n  g_autoptr(GError) error = nullptr;\n  if (!g_application_register(application, nullptr, &error)) {\n     g_warning(\"Failed to register: %s\", error->message);\n     *exit_status = 1;\n     return TRUE;\n  }\n\n  g_application_activate(application);\n  *exit_status = 0;\n\n  return TRUE;\n}\n\n// Implements GApplication::startup.\nstatic void my_application_startup(GApplication* application) {\n  //MyApplication* self = MY_APPLICATION(object);\n\n  // Perform any actions required at application startup.\n\n  G_APPLICATION_CLASS(my_application_parent_class)->startup(application);\n}\n\n// Implements GApplication::shutdown.\nstatic void my_application_shutdown(GApplication* application) {\n  //MyApplication* self = MY_APPLICATION(object);\n\n  // Perform any actions required at application shutdown.\n\n  G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application);\n}\n\n// Implements GObject::dispose.\nstatic void my_application_dispose(GObject* object) {\n  MyApplication* self = MY_APPLICATION(object);\n  g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);\n  G_OBJECT_CLASS(my_application_parent_class)->dispose(object);\n}\n\nstatic void my_application_class_init(MyApplicationClass* klass) {\n  G_APPLICATION_CLASS(klass)->activate = my_application_activate;\n  G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line;\n  G_APPLICATION_CLASS(klass)->startup = my_application_startup;\n  G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown;\n  G_OBJECT_CLASS(klass)->dispose = my_application_dispose;\n}\n\nstatic void my_application_init(MyApplication* self) {}\n\nMyApplication* my_application_new() {\n  // Set the program name to the application ID, which helps various systems\n  // like GTK and desktop environments map this running application to its\n  // corresponding .desktop file. This ensures better integration by allowing\n  // the application to be recognized beyond its binary name.\n  g_set_prgname(APPLICATION_ID);\n\n  return MY_APPLICATION(g_object_new(my_application_get_type(),\n                                     \"application-id\", APPLICATION_ID,\n                                     \"flags\", G_APPLICATION_NON_UNIQUE,\n                                     nullptr));\n}\n"
  },
  {
    "path": "linux/runner/my_application.h",
    "content": "#ifndef FLUTTER_MY_APPLICATION_H_\n#define FLUTTER_MY_APPLICATION_H_\n\n#include <gtk/gtk.h>\n\nG_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,\n                     GtkApplication)\n\n/**\n * my_application_new:\n *\n * Creates a new Flutter-based application.\n *\n * Returns: a new #MyApplication.\n */\nMyApplication* my_application_new();\n\n#endif  // FLUTTER_MY_APPLICATION_H_\n"
  },
  {
    "path": "macos/.gitignore",
    "content": "# Flutter-related\n**/Flutter/ephemeral/\n**/Pods/\n\n# Xcode-related\n**/dgph\n**/xcuserdata/\n"
  },
  {
    "path": "macos/Flutter/Flutter-Debug.xcconfig",
    "content": "#include? \"Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig\"\n#include \"ephemeral/Flutter-Generated.xcconfig\"\n"
  },
  {
    "path": "macos/Flutter/Flutter-Release.xcconfig",
    "content": "#include? \"Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig\"\n#include \"ephemeral/Flutter-Generated.xcconfig\"\n"
  },
  {
    "path": "macos/Flutter/GeneratedPluginRegistrant.swift",
    "content": "//\n//  Generated file. Do not edit.\n//\n\nimport FlutterMacOS\nimport Foundation\n\nimport app_links\nimport connectivity_plus\nimport device_info_plus\nimport dynamic_color\nimport file_picker\nimport file_selector_macos\nimport flutter_js\nimport hotkey_manager_macos\nimport mobile_scanner\nimport package_info_plus\nimport path_provider_foundation\nimport screen_retriever_macos\nimport shared_preferences_foundation\nimport sqflite_darwin\nimport sqlite3_flutter_libs\nimport tray_manager\nimport url_launcher_macos\nimport window_ext\nimport window_manager\n\nfunc RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {\n  AppLinksMacosPlugin.register(with: registry.registrar(forPlugin: \"AppLinksMacosPlugin\"))\n  ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: \"ConnectivityPlusPlugin\"))\n  DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: \"DeviceInfoPlusMacosPlugin\"))\n  DynamicColorPlugin.register(with: registry.registrar(forPlugin: \"DynamicColorPlugin\"))\n  FilePickerPlugin.register(with: registry.registrar(forPlugin: \"FilePickerPlugin\"))\n  FileSelectorPlugin.register(with: registry.registrar(forPlugin: \"FileSelectorPlugin\"))\n  FlutterJsPlugin.register(with: registry.registrar(forPlugin: \"FlutterJsPlugin\"))\n  HotkeyManagerMacosPlugin.register(with: registry.registrar(forPlugin: \"HotkeyManagerMacosPlugin\"))\n  MobileScannerPlugin.register(with: registry.registrar(forPlugin: \"MobileScannerPlugin\"))\n  FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: \"FPPPackageInfoPlusPlugin\"))\n  PathProviderPlugin.register(with: registry.registrar(forPlugin: \"PathProviderPlugin\"))\n  ScreenRetrieverMacosPlugin.register(with: registry.registrar(forPlugin: \"ScreenRetrieverMacosPlugin\"))\n  SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: \"SharedPreferencesPlugin\"))\n  SqflitePlugin.register(with: registry.registrar(forPlugin: \"SqflitePlugin\"))\n  Sqlite3FlutterLibsPlugin.register(with: registry.registrar(forPlugin: \"Sqlite3FlutterLibsPlugin\"))\n  TrayManagerPlugin.register(with: registry.registrar(forPlugin: \"TrayManagerPlugin\"))\n  UrlLauncherPlugin.register(with: registry.registrar(forPlugin: \"UrlLauncherPlugin\"))\n  WindowExtPlugin.register(with: registry.registrar(forPlugin: \"WindowExtPlugin\"))\n  WindowManagerPlugin.register(with: registry.registrar(forPlugin: \"WindowManagerPlugin\"))\n}\n"
  },
  {
    "path": "macos/Podfile",
    "content": "\nplatform :osx, '10.15'\n\n# CocoaPods analytics sends network stats synchronously affecting flutter build latency.\nENV['COCOAPODS_DISABLE_STATS'] = 'true'\n\nproject 'Runner', {\n  'Debug' => :debug,\n  'Profile' => :release,\n  'Release' => :release,\n}\n\ndef flutter_root\n  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)\n  unless File.exist?(generated_xcode_build_settings_path)\n    raise \"#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \\\"flutter pub get\\\" is executed first\"\n  end\n\n  File.foreach(generated_xcode_build_settings_path) do |line|\n    matches = line.match(/FLUTTER_ROOT\\=(.*)/)\n    return matches[1].strip if matches\n  end\n  raise \"FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \\\"flutter pub get\\\"\"\nend\n\nrequire File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)\n\nflutter_macos_podfile_setup\n\ntarget 'Runner' do\n  use_frameworks!\n  use_modular_headers!\n\n  flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))\n  target 'RunnerTests' do\n    inherit! :search_paths\n  end\nend\n\npost_install do |installer|\n  installer.pods_project.targets.each do |target|\n    flutter_additional_macos_build_settings(target)\n    target.build_configurations.each do |config|\n            config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.15'\n    end\n  end\nend\n"
  },
  {
    "path": "macos/Runner/AppDelegate.swift",
    "content": "import Cocoa\nimport FlutterMacOS\nimport window_ext\n\n@main\nclass AppDelegate: FlutterAppDelegate {\n    \n    override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {\n        return false\n    }\n    \n    override func applicationShouldTerminate(_ sender: NSApplication) -> NSApplication.TerminateReply {\n        WindowExtPlugin.instance?.handleShouldTerminate()\n        return .terminateCancel\n    }\n\n    override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {\n      return true\n    }\n    \n    override func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {\n        if !flag {\n            for window in NSApp.windows {\n                if !window.isVisible {\n                    window.setIsVisible(true)\n                }\n                window.makeKeyAndOrderFront(self)\n                NSApp.activate(ignoringOtherApps: true)\n            }\n        }\n        return true\n    }\n}\n"
  },
  {
    "path": "macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"size\" : \"16x16\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_16.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"16x16\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_32.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"32x32\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_32.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"32x32\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_64.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"128x128\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_128.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"128x128\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_256.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"256x256\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_256.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"256x256\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_512.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"512x512\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_512.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"512x512\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"app_icon_1024.png\",\n      \"scale\" : \"2x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}\n"
  },
  {
    "path": "macos/Runner/Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"author\" : \"xcode\",\n    \"version\" : 1\n  }\n}\n"
  },
  {
    "path": "macos/Runner/Base.lproj/MainMenu.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"14490.70\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\" customObjectInstantitationMethod=\"direct\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"14490.70\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"NSApplication\">\n            <connections>\n                <outlet property=\"delegate\" destination=\"Voe-Tx-rLC\" id=\"GzC-gU-4Uq\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <customObject id=\"Voe-Tx-rLC\" customClass=\"AppDelegate\" customModule=\"Runner\" customModuleProvider=\"target\">\n            <connections>\n                <outlet property=\"applicationMenu\" destination=\"uQy-DD-JDr\" id=\"XBo-yE-nKs\"/>\n                <outlet property=\"mainFlutterWindow\" destination=\"QvC-M9-y7g\" id=\"gIp-Ho-8D9\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"YLy-65-1bz\" customClass=\"NSFontManager\"/>\n        <menu title=\"Main Menu\" systemMenu=\"main\" id=\"AYu-sK-qS6\">\n            <items>\n                <menuItem title=\"APP_NAME\" id=\"1Xt-HY-uBw\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"APP_NAME\" systemMenu=\"apple\" id=\"uQy-DD-JDr\">\n                        <items>\n                            <menuItem title=\"About APP_NAME\" id=\"5kV-Vb-QxS\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"orderFrontStandardAboutPanel:\" target=\"-1\" id=\"Exp-CZ-Vem\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"VOq-y0-SEH\"/>\n                            <menuItem title=\"Preferences…\" keyEquivalent=\",\" id=\"BOF-NM-1cW\"/>\n                            <menuItem isSeparatorItem=\"YES\" id=\"wFC-TO-SCJ\"/>\n                            <menuItem title=\"Services\" id=\"NMo-om-nkz\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Services\" systemMenu=\"services\" id=\"hz9-B4-Xy5\"/>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"4je-JR-u6R\"/>\n                            <menuItem title=\"Hide APP_NAME\" keyEquivalent=\"h\" id=\"Olw-nP-bQN\">\n                                <connections>\n                                    <action selector=\"hide:\" target=\"-1\" id=\"PnN-Uc-m68\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Hide Others\" keyEquivalent=\"h\" id=\"Vdr-fp-XzO\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"hideOtherApplications:\" target=\"-1\" id=\"VT4-aY-XCT\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Show All\" id=\"Kd2-mp-pUS\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"unhideAllApplications:\" target=\"-1\" id=\"Dhg-Le-xox\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"kCx-OE-vgT\"/>\n                            <menuItem title=\"Quit APP_NAME\" keyEquivalent=\"q\" id=\"4sb-4s-VLi\">\n                                <connections>\n                                    <action selector=\"terminate:\" target=\"-1\" id=\"Te7-pn-YzF\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"Edit\" id=\"5QF-Oa-p0T\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"Edit\" id=\"W48-6f-4Dl\">\n                        <items>\n                            <menuItem title=\"Undo\" keyEquivalent=\"z\" id=\"dRJ-4n-Yzg\">\n                                <connections>\n                                    <action selector=\"undo:\" target=\"-1\" id=\"M6e-cu-g7V\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Redo\" keyEquivalent=\"Z\" id=\"6dh-zS-Vam\">\n                                <connections>\n                                    <action selector=\"redo:\" target=\"-1\" id=\"oIA-Rs-6OD\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"WRV-NI-Exz\"/>\n                            <menuItem title=\"Cut\" keyEquivalent=\"x\" id=\"uRl-iY-unG\">\n                                <connections>\n                                    <action selector=\"cut:\" target=\"-1\" id=\"YJe-68-I9s\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Copy\" keyEquivalent=\"c\" id=\"x3v-GG-iWU\">\n                                <connections>\n                                    <action selector=\"copy:\" target=\"-1\" id=\"G1f-GL-Joy\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Paste\" keyEquivalent=\"v\" id=\"gVA-U4-sdL\">\n                                <connections>\n                                    <action selector=\"paste:\" target=\"-1\" id=\"UvS-8e-Qdg\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Paste and Match Style\" keyEquivalent=\"V\" id=\"WeT-3V-zwk\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"pasteAsPlainText:\" target=\"-1\" id=\"cEh-KX-wJQ\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Delete\" id=\"pa3-QI-u2k\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"delete:\" target=\"-1\" id=\"0Mk-Ml-PaM\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Select All\" keyEquivalent=\"a\" id=\"Ruw-6m-B2m\">\n                                <connections>\n                                    <action selector=\"selectAll:\" target=\"-1\" id=\"VNm-Mi-diN\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"uyl-h8-XO2\"/>\n                            <menuItem title=\"Find\" id=\"4EN-yA-p0u\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Find\" id=\"1b7-l0-nxx\">\n                                    <items>\n                                        <menuItem title=\"Find…\" tag=\"1\" keyEquivalent=\"f\" id=\"Xz5-n4-O0W\">\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"cD7-Qs-BN4\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Find and Replace…\" tag=\"12\" keyEquivalent=\"f\" id=\"YEy-JH-Tfz\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"WD3-Gg-5AJ\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Find Next\" tag=\"2\" keyEquivalent=\"g\" id=\"q09-fT-Sye\">\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"NDo-RZ-v9R\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Find Previous\" tag=\"3\" keyEquivalent=\"G\" id=\"OwM-mh-QMV\">\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"HOh-sY-3ay\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Use Selection for Find\" tag=\"7\" keyEquivalent=\"e\" id=\"buJ-ug-pKt\">\n                                            <connections>\n                                                <action selector=\"performFindPanelAction:\" target=\"-1\" id=\"U76-nv-p5D\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Jump to Selection\" keyEquivalent=\"j\" id=\"S0p-oC-mLd\">\n                                            <connections>\n                                                <action selector=\"centerSelectionInVisibleArea:\" target=\"-1\" id=\"IOG-6D-g5B\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Spelling and Grammar\" id=\"Dv1-io-Yv7\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Spelling\" id=\"3IN-sU-3Bg\">\n                                    <items>\n                                        <menuItem title=\"Show Spelling and Grammar\" keyEquivalent=\":\" id=\"HFo-cy-zxI\">\n                                            <connections>\n                                                <action selector=\"showGuessPanel:\" target=\"-1\" id=\"vFj-Ks-hy3\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Check Document Now\" keyEquivalent=\";\" id=\"hz2-CU-CR7\">\n                                            <connections>\n                                                <action selector=\"checkSpelling:\" target=\"-1\" id=\"fz7-VC-reM\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem isSeparatorItem=\"YES\" id=\"bNw-od-mp5\"/>\n                                        <menuItem title=\"Check Spelling While Typing\" id=\"rbD-Rh-wIN\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleContinuousSpellChecking:\" target=\"-1\" id=\"7w6-Qz-0kB\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Check Grammar With Spelling\" id=\"mK6-2p-4JG\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleGrammarChecking:\" target=\"-1\" id=\"muD-Qn-j4w\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Correct Spelling Automatically\" id=\"78Y-hA-62v\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticSpellingCorrection:\" target=\"-1\" id=\"2lM-Qi-WAP\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Substitutions\" id=\"9ic-FL-obx\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Substitutions\" id=\"FeM-D8-WVr\">\n                                    <items>\n                                        <menuItem title=\"Show Substitutions\" id=\"z6F-FW-3nz\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"orderFrontSubstitutionsPanel:\" target=\"-1\" id=\"oku-mr-iSq\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem isSeparatorItem=\"YES\" id=\"gPx-C9-uUO\"/>\n                                        <menuItem title=\"Smart Copy/Paste\" id=\"9yt-4B-nSM\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleSmartInsertDelete:\" target=\"-1\" id=\"3IJ-Se-DZD\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Smart Quotes\" id=\"hQb-2v-fYv\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticQuoteSubstitution:\" target=\"-1\" id=\"ptq-xd-QOA\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Smart Dashes\" id=\"rgM-f4-ycn\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticDashSubstitution:\" target=\"-1\" id=\"oCt-pO-9gS\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Smart Links\" id=\"cwL-P1-jid\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticLinkDetection:\" target=\"-1\" id=\"Gip-E3-Fov\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Data Detectors\" id=\"tRr-pd-1PS\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticDataDetection:\" target=\"-1\" id=\"R1I-Nq-Kbl\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Text Replacement\" id=\"HFQ-gK-NFA\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"toggleAutomaticTextReplacement:\" target=\"-1\" id=\"DvP-Fe-Py6\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Transformations\" id=\"2oI-Rn-ZJC\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Transformations\" id=\"c8a-y6-VQd\">\n                                    <items>\n                                        <menuItem title=\"Make Upper Case\" id=\"vmV-6d-7jI\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"uppercaseWord:\" target=\"-1\" id=\"sPh-Tk-edu\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Make Lower Case\" id=\"d9M-CD-aMd\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"lowercaseWord:\" target=\"-1\" id=\"iUZ-b5-hil\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Capitalize\" id=\"UEZ-Bs-lqG\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"capitalizeWord:\" target=\"-1\" id=\"26H-TL-nsh\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Speech\" id=\"xrE-MZ-jX0\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Speech\" id=\"3rS-ZA-NoH\">\n                                    <items>\n                                        <menuItem title=\"Start Speaking\" id=\"Ynk-f8-cLZ\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"startSpeaking:\" target=\"-1\" id=\"654-Ng-kyl\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Stop Speaking\" id=\"Oyz-dy-DGm\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"stopSpeaking:\" target=\"-1\" id=\"dX8-6p-jy9\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"View\" id=\"H8h-7b-M4v\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"View\" id=\"HyV-fh-RgO\">\n                        <items>\n                            <menuItem title=\"Enter Full Screen\" keyEquivalent=\"f\" id=\"4J7-dP-txa\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" control=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"toggleFullScreen:\" target=\"-1\" id=\"dU3-MA-1Rq\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"Window\" id=\"aUF-d1-5bR\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"Window\" systemMenu=\"window\" id=\"Td7-aD-5lo\">\n                        <items>\n                            <menuItem title=\"Minimize\" keyEquivalent=\"m\" id=\"OY7-WF-poV\">\n                                <connections>\n                                    <action selector=\"performMiniaturize:\" target=\"-1\" id=\"VwT-WD-YPe\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Zoom\" id=\"R4o-n2-Eq4\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"performZoom:\" target=\"-1\" id=\"DIl-cC-cCs\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"eu3-7i-yIM\"/>\n                            <menuItem title=\"Bring All to Front\" id=\"LE2-aR-0XJ\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"arrangeInFront:\" target=\"-1\" id=\"DRN-fu-gQh\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"Help\" id=\"EPT-qC-fAb\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"Help\" systemMenu=\"help\" id=\"rJ0-wn-3NY\"/>\n                </menuItem>\n            </items>\n            <point key=\"canvasLocation\" x=\"142\" y=\"-258\"/>\n        </menu>\n        <window title=\"APP_NAME\" allowsToolTipsWhenApplicationIsInactive=\"NO\" autorecalculatesKeyViewLoop=\"NO\" releasedWhenClosed=\"NO\" animationBehavior=\"default\" id=\"QvC-M9-y7g\" customClass=\"MainFlutterWindow\" customModule=\"Runner\" customModuleProvider=\"target\">\n            <windowStyleMask key=\"styleMask\" titled=\"YES\" closable=\"YES\" miniaturizable=\"YES\" resizable=\"YES\"/>\n            <rect key=\"contentRect\" x=\"335\" y=\"390\" width=\"800\" height=\"600\"/>\n            <rect key=\"screenRect\" x=\"0.0\" y=\"0.0\" width=\"2560\" height=\"1577\"/>\n            <view key=\"contentView\" wantsLayer=\"YES\" id=\"EiT-Mj-1SZ\">\n                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"800\" height=\"600\"/>\n                <autoresizingMask key=\"autoresizingMask\"/>\n            </view>\n        </window>\n    </objects>\n</document>\n"
  },
  {
    "path": "macos/Runner/Configs/AppInfo.xcconfig",
    "content": "// Application-level settings for the Runner target.\n//\n// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the\n// future. If not, the values below would default to using the project name when this becomes a\n// 'flutter create' template.\n\n// The application's name. By default this is also the title of the Flutter window.\nPRODUCT_NAME = FlClash\n\n// The application's bundle identifier\nPRODUCT_BUNDLE_IDENTIFIER = com.follow.clash\n\n// The copyright displayed in application information\nPRODUCT_COPYRIGHT = Copyright © 2023 com.follow. All rights reserved.\n"
  },
  {
    "path": "macos/Runner/Configs/Debug.xcconfig",
    "content": "#include \"../../Flutter/Flutter-Debug.xcconfig\"\n#include \"Warnings.xcconfig\"\n"
  },
  {
    "path": "macos/Runner/Configs/Release.xcconfig",
    "content": "#include \"../../Flutter/Flutter-Release.xcconfig\"\n#include \"Warnings.xcconfig\"\n"
  },
  {
    "path": "macos/Runner/Configs/Warnings.xcconfig",
    "content": "WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings\nGCC_WARN_UNDECLARED_SELECTOR = YES\nCLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES\nCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE\nCLANG_WARN__DUPLICATE_METHOD_MATCH = YES\nCLANG_WARN_PRAGMA_PACK = YES\nCLANG_WARN_STRICT_PROTOTYPES = YES\nCLANG_WARN_COMMA = YES\nGCC_WARN_STRICT_SELECTOR_MATCH = YES\nCLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES\nCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES\nGCC_WARN_SHADOW = YES\nCLANG_WARN_UNREACHABLE_CODE = YES\n"
  },
  {
    "path": "macos/Runner/DebugProfile.entitlements",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>com.apple.security.cs.allow-jit</key>\n\t<true/>\n\t<key>com.apple.security.files.user-selected.read-write</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "macos/Runner/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIconFile</key>\n\t<string></string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>$(FLUTTER_BUILD_NAME)</string>\n\t<key>CFBundleURLTypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t\t<key>CFBundleURLName</key>\n\t\t\t<string></string>\n\t\t\t<key>CFBundleURLSchemes</key>\n\t\t\t<array>\n\t\t\t\t<string>clash</string>\n\t\t\t\t<string>clashmeta</string>\n\t\t\t\t<string>flclash</string>\n\t\t\t</array>\n\t\t</dict>\n\t</array>\n\t<key>CFBundleVersion</key>\n\t<string>$(FLUTTER_BUILD_NUMBER)</string>\n\t<key>LSMinimumSystemVersion</key>\n\t<string>$(MACOSX_DEPLOYMENT_TARGET)</string>\n\t<key>NSHumanReadableCopyright</key>\n\t<string>$(PRODUCT_COPYRIGHT)</string>\n\t<key>NSMainNibFile</key>\n\t<string>MainMenu</string>\n\t<key>NSPrincipalClass</key>\n\t<string>NSApplication</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "macos/Runner/MainFlutterWindow.swift",
    "content": "import Cocoa\nimport FlutterMacOS\nimport window_manager\nimport LaunchAtLogin\n\nclass MainFlutterWindow: NSWindow {\n    override func awakeFromNib() {\n        let flutterViewController = FlutterViewController()\n        let windowFrame = self.frame\n        self.contentViewController = flutterViewController\n        self.setFrame(windowFrame, display: true)\n        \n        FlutterMethodChannel(\n            name: \"launch_at_startup\", binaryMessenger: flutterViewController.engine.binaryMessenger\n        )\n        .setMethodCallHandler { (_ call: FlutterMethodCall, result: @escaping FlutterResult) in\n            switch call.method {\n            case \"launchAtStartupIsEnabled\":\n                result(LaunchAtLogin.isEnabled)\n            case \"launchAtStartupSetEnabled\":\n                if let arguments = call.arguments as? [String: Any] {\n                    LaunchAtLogin.isEnabled = arguments[\"setEnabledValue\"] as! Bool\n                }\n                result(nil)\n            default:\n                result(FlutterMethodNotImplemented)\n            }\n        }\n        \n        RegisterGeneratedPlugins(registry: flutterViewController)\n        super.awakeFromNib()\n    }\n    override public func order(_ place: NSWindow.OrderingMode, relativeTo otherWin: Int) {\n        super.order(place, relativeTo: otherWin)\n        hiddenWindowAtLaunch()\n    }\n}\n"
  },
  {
    "path": "macos/Runner/Release.entitlements",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>com.apple.security.files.user-selected.read-write</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "macos/Runner.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 54;\n\tobjects = {\n\n/* Begin PBXAggregateTarget section */\n\t\t33CC111A2044C6BA0003C045 /* Flutter Assemble */ = {\n\t\t\tisa = PBXAggregateTarget;\n\t\t\tbuildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget \"Flutter Assemble\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t33CC111E2044C6BF0003C045 /* ShellScript */,\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = \"Flutter Assemble\";\n\t\t\tproductName = FLX;\n\t\t};\n/* End PBXAggregateTarget section */\n\n/* Begin PBXBuildFile section */\n\t\t331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; };\n\t\t335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };\n\t\t33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };\n\t\t33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };\n\t\t33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };\n\t\t33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };\n\t\t36318A03D19527AAA8B8DCFC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34DDDF4BE376B6283E8CF3FB /* Pods_Runner.framework */; };\n\t\tEDFB0F7BFE44CA6EE10BC97E /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 318645D7A7E65945F20006A1 /* Pods_RunnerTests.framework */; };\n\t\tF5131FDD2EF0F1A500A1748D /* LaunchAtLogin in Frameworks */ = {isa = PBXBuildFile; productRef = F5131FDC2EF0F1A500A1748D /* LaunchAtLogin */; };\n\t\tF51BB7CB2EF0267400E05D67 /* FlClashCore in Copy Core */ = {isa = PBXBuildFile; fileRef = F51BB7CA2EF0267400E05D67 /* FlClashCore */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };\n/* End PBXBuildFile section */\n\n/* Begin PBXContainerItemProxy section */\n\t\t331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 33CC10E52044A3C60003C045 /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 33CC10EC2044A3C60003C045;\n\t\t\tremoteInfo = Runner;\n\t\t};\n\t\t33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 33CC10E52044A3C60003C045 /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 33CC111A2044C6BA0003C045;\n\t\t\tremoteInfo = FLX;\n\t\t};\n/* End PBXContainerItemProxy section */\n\n/* Begin PBXCopyFilesBuildPhase section */\n\t\t33CC110E2044A8840003C045 /* Bundle Framework */ = {\n\t\t\tisa = PBXCopyFilesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tdstPath = \"\";\n\t\t\tdstSubfolderSpec = 10;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tname = \"Bundle Framework\";\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tF51BB7C92EF0265000E05D67 /* Copy Core */ = {\n\t\t\tisa = PBXCopyFilesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tdstPath = \"\";\n\t\t\tdstSubfolderSpec = 6;\n\t\t\tfiles = (\n\t\t\t\tF51BB7CB2EF0267400E05D67 /* FlClashCore in Copy Core */,\n\t\t\t);\n\t\t\tname = \"Copy Core\";\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXCopyFilesBuildPhase section */\n\n/* Begin PBXFileReference section */\n\t\t1C8D2B0222EEC9EFBD4CB7D3 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-Runner.profile.xcconfig\"; path = \"Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t318645D7A7E65945F20006A1 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = \"<group>\"; };\n\t\t333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = \"<group>\"; };\n\t\t335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = \"<group>\"; };\n\t\t33CC10ED2044A3C60003C045 /* FlClash.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FlClash.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\t33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = \"<group>\"; };\n\t\t33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = \"<group>\"; };\n\t\t33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = \"<group>\"; };\n\t\t33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = \"<group>\"; };\n\t\t33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = \"Flutter-Debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = \"Flutter-Release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = \"Flutter-Generated.xcconfig\"; path = \"ephemeral/Flutter-Generated.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = \"<group>\"; };\n\t\t33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = \"<group>\"; };\n\t\t33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = \"<group>\"; };\n\t\t341B4B12F589DC2F9A4F85AF /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-RunnerTests.profile.xcconfig\"; path = \"Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t34DDDF4BE376B6283E8CF3FB /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t3559EC2EA8528361668A5C2B /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-RunnerTests.debug.xcconfig\"; path = \"Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t57401BE05DC1812684175E8F /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-Runner.debug.xcconfig\"; path = \"Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = \"<group>\"; };\n\t\t9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = \"<group>\"; };\n\t\t9C9D4EF99A207AF51C53E0A3 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-RunnerTests.release.xcconfig\"; path = \"Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\tCE90D6AE6AF7FF51A5D7A5BB /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-Runner.release.xcconfig\"; path = \"Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\tF51BB7CA2EF0267400E05D67 /* FlClashCore */ = {isa = PBXFileReference; lastKnownFileType = \"compiled.mach-o.executable\"; name = FlClashCore; path = ../libclash/macos/FlClashCore; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t331C80D2294CF70F00263BE5 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tEDFB0F7BFE44CA6EE10BC97E /* Pods_RunnerTests.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t33CC10EA2044A3C60003C045 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tF5131FDD2EF0F1A500A1748D /* LaunchAtLogin in Frameworks */,\n\t\t\t\t36318A03D19527AAA8B8DCFC /* Pods_Runner.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t331C80D6294CF71000263BE5 /* RunnerTests */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t331C80D7294CF71000263BE5 /* RunnerTests.swift */,\n\t\t\t);\n\t\t\tpath = RunnerTests;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33BA886A226E78AF003329D5 /* Configs */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t33E5194F232828860026EE4D /* AppInfo.xcconfig */,\n\t\t\t\t9740EEB21CF90195004384FC /* Debug.xcconfig */,\n\t\t\t\t7AFA3C8E1D35360C0083082E /* Release.xcconfig */,\n\t\t\t\t333000ED22D3DE5D00554162 /* Warnings.xcconfig */,\n\t\t\t);\n\t\t\tpath = Configs;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33CC10E42044A3C60003C045 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tF51BB7CA2EF0267400E05D67 /* FlClashCore */,\n\t\t\t\t33FAB671232836740065AC1E /* Runner */,\n\t\t\t\t33CEB47122A05771004F2AC0 /* Flutter */,\n\t\t\t\t331C80D6294CF71000263BE5 /* RunnerTests */,\n\t\t\t\t33CC10EE2044A3C60003C045 /* Products */,\n\t\t\t\tD73912EC22F37F3D000D13A0 /* Frameworks */,\n\t\t\t\tA0D80B3A13090D09F645DBDB /* Pods */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33CC10EE2044A3C60003C045 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t33CC10ED2044A3C60003C045 /* FlClash.app */,\n\t\t\t\t331C80D5294CF71000263BE5 /* RunnerTests.xctest */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33CC11242044D66E0003C045 /* Resources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t33CC10F22044A3C60003C045 /* Assets.xcassets */,\n\t\t\t\t33CC10F42044A3C60003C045 /* MainMenu.xib */,\n\t\t\t\t33CC10F72044A3C60003C045 /* Info.plist */,\n\t\t\t);\n\t\t\tname = Resources;\n\t\t\tpath = ..;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33CEB47122A05771004F2AC0 /* Flutter */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,\n\t\t\t\t33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,\n\t\t\t\t33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,\n\t\t\t\t33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */,\n\t\t\t);\n\t\t\tpath = Flutter;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t33FAB671232836740065AC1E /* Runner */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t33CC10F02044A3C60003C045 /* AppDelegate.swift */,\n\t\t\t\t33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,\n\t\t\t\t33E51913231747F40026EE4D /* DebugProfile.entitlements */,\n\t\t\t\t33E51914231749380026EE4D /* Release.entitlements */,\n\t\t\t\t33CC11242044D66E0003C045 /* Resources */,\n\t\t\t\t33BA886A226E78AF003329D5 /* Configs */,\n\t\t\t);\n\t\t\tpath = Runner;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA0D80B3A13090D09F645DBDB /* Pods */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t57401BE05DC1812684175E8F /* Pods-Runner.debug.xcconfig */,\n\t\t\t\tCE90D6AE6AF7FF51A5D7A5BB /* Pods-Runner.release.xcconfig */,\n\t\t\t\t1C8D2B0222EEC9EFBD4CB7D3 /* Pods-Runner.profile.xcconfig */,\n\t\t\t\t3559EC2EA8528361668A5C2B /* Pods-RunnerTests.debug.xcconfig */,\n\t\t\t\t9C9D4EF99A207AF51C53E0A3 /* Pods-RunnerTests.release.xcconfig */,\n\t\t\t\t341B4B12F589DC2F9A4F85AF /* Pods-RunnerTests.profile.xcconfig */,\n\t\t\t);\n\t\t\tpath = Pods;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tD73912EC22F37F3D000D13A0 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t34DDDF4BE376B6283E8CF3FB /* Pods_Runner.framework */,\n\t\t\t\t318645D7A7E65945F20006A1 /* Pods_RunnerTests.framework */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t331C80D4294CF70F00263BE5 /* RunnerTests */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget \"RunnerTests\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t8B8DBAC78DBB17589F89FBF4 /* [CP] Check Pods Manifest.lock */,\n\t\t\t\t331C80D1294CF70F00263BE5 /* Sources */,\n\t\t\t\t331C80D2294CF70F00263BE5 /* Frameworks */,\n\t\t\t\t331C80D3294CF70F00263BE5 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t331C80DA294CF71000263BE5 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = RunnerTests;\n\t\t\tproductName = RunnerTests;\n\t\t\tproductReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */;\n\t\t\tproductType = \"com.apple.product-type.bundle.unit-test\";\n\t\t};\n\t\t33CC10EC2044A3C60003C045 /* Runner */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget \"Runner\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tB48271F4874F0AE8C0B5B789 /* [CP] Check Pods Manifest.lock */,\n\t\t\t\t33CC10E92044A3C60003C045 /* Sources */,\n\t\t\t\t33CC10EA2044A3C60003C045 /* Frameworks */,\n\t\t\t\t33CC10EB2044A3C60003C045 /* Resources */,\n\t\t\t\t33CC110E2044A8840003C045 /* Bundle Framework */,\n\t\t\t\t3399D490228B24CF009A79C7 /* ShellScript */,\n\t\t\t\tDD2258A65B871C474676AD18 /* [CP] Embed Pods Frameworks */,\n\t\t\t\tF51BB7C92EF0265000E05D67 /* Copy Core */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t33CC11202044C79F0003C045 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = Runner;\n\t\t\tproductName = Runner;\n\t\t\tproductReference = 33CC10ED2044A3C60003C045 /* FlClash.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t33CC10E52044A3C60003C045 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tBuildIndependentTargetsInParallel = YES;\n\t\t\t\tLastSwiftUpdateCheck = 0920;\n\t\t\t\tLastUpgradeCheck = 1510;\n\t\t\t\tORGANIZATIONNAME = \"\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t331C80D4294CF70F00263BE5 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 14.0;\n\t\t\t\t\t\tTestTargetID = 33CC10EC2044A3C60003C045;\n\t\t\t\t\t};\n\t\t\t\t\t33CC10EC2044A3C60003C045 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 9.2;\n\t\t\t\t\t\tLastSwiftMigration = 1100;\n\t\t\t\t\t\tProvisioningStyle = Automatic;\n\t\t\t\t\t\tSystemCapabilities = {\n\t\t\t\t\t\t\tcom.apple.Sandbox = {\n\t\t\t\t\t\t\t\tenabled = 1;\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\t33CC111A2044C6BA0003C045 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 9.2;\n\t\t\t\t\t\tProvisioningStyle = Manual;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject \"Runner\" */;\n\t\t\tcompatibilityVersion = \"Xcode 9.3\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 33CC10E42044A3C60003C045;\n\t\t\tpackageReferences = (\n\t\t\t\tF5131FDB2EF0F1A500A1748D /* XCRemoteSwiftPackageReference \"LaunchAtLogin\" */,\n\t\t\t);\n\t\t\tproductRefGroup = 33CC10EE2044A3C60003C045 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t33CC10EC2044A3C60003C045 /* Runner */,\n\t\t\t\t331C80D4294CF70F00263BE5 /* RunnerTests */,\n\t\t\t\t33CC111A2044C6BA0003C045 /* Flutter Assemble */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t331C80D3294CF70F00263BE5 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t33CC10EB2044A3C60003C045 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,\n\t\t\t\t33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXShellScriptBuildPhase section */\n\t\t3399D490228B24CF009A79C7 /* ShellScript */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\talwaysOutOfDate = 1;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputFileListPaths = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\toutputFileListPaths = (\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"echo \\\"$PRODUCT_NAME.app\\\" > \\\"$PROJECT_DIR\\\"/Flutter/ephemeral/.app_filename && \\\"$FLUTTER_ROOT\\\"/packages/flutter_tools/bin/macos_assemble.sh embed\\n\";\n\t\t};\n\t\t33CC111E2044C6BF0003C045 /* ShellScript */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputFileListPaths = (\n\t\t\t\tFlutter/ephemeral/FlutterInputs.xcfilelist,\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\tFlutter/ephemeral/tripwire,\n\t\t\t);\n\t\t\toutputFileListPaths = (\n\t\t\t\tFlutter/ephemeral/FlutterOutputs.xcfilelist,\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"$FLUTTER_ROOT\\\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire\";\n\t\t};\n\t\t8B8DBAC78DBB17589F89FBF4 /* [CP] Check Pods Manifest.lock */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputFileListPaths = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\",\n\t\t\t\t\"${PODS_ROOT}/Manifest.lock\",\n\t\t\t);\n\t\t\tname = \"[CP] Check Pods Manifest.lock\";\n\t\t\toutputFileListPaths = (\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t\t\"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"diff \\\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\\\" \\\"${PODS_ROOT}/Manifest.lock\\\" > /dev/null\\nif [ $? != 0 ] ; then\\n    # print error to STDERR\\n    echo \\\"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\\\" >&2\\n    exit 1\\nfi\\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\\necho \\\"SUCCESS\\\" > \\\"${SCRIPT_OUTPUT_FILE_0}\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\tB48271F4874F0AE8C0B5B789 /* [CP] Check Pods Manifest.lock */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputFileListPaths = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\",\n\t\t\t\t\"${PODS_ROOT}/Manifest.lock\",\n\t\t\t);\n\t\t\tname = \"[CP] Check Pods Manifest.lock\";\n\t\t\toutputFileListPaths = (\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t\t\"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"diff \\\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\\\" \\\"${PODS_ROOT}/Manifest.lock\\\" > /dev/null\\nif [ $? != 0 ] ; then\\n    # print error to STDERR\\n    echo \\\"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\\\" >&2\\n    exit 1\\nfi\\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\\necho \\\"SUCCESS\\\" > \\\"${SCRIPT_OUTPUT_FILE_0}\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\tDD2258A65B871C474676AD18 /* [CP] Embed Pods Frameworks */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputFileListPaths = (\n\t\t\t\t\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist\",\n\t\t\t);\n\t\t\tname = \"[CP] Embed Pods Frameworks\";\n\t\t\toutputFileListPaths = (\n\t\t\t\t\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t331C80D1294CF70F00263BE5 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t33CC10E92044A3C60003C045 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,\n\t\t\t\t33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,\n\t\t\t\t335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXTargetDependency section */\n\t\t331C80DA294CF71000263BE5 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = 33CC10EC2044A3C60003C045 /* Runner */;\n\t\t\ttargetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */;\n\t\t};\n\t\t33CC11202044C79F0003C045 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;\n\t\t\ttargetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */;\n\t\t};\n/* End PBXTargetDependency section */\n\n/* Begin PBXVariantGroup section */\n\t\t33CC10F42044A3C60003C045 /* MainMenu.xib */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t33CC10F52044A3C60003C045 /* Base */,\n\t\t\t);\n\t\t\tname = MainMenu.xib;\n\t\t\tpath = Runner;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t331C80DB294CF71000263BE5 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 3559EC2EA8528361668A5C2B /* Pods-RunnerTests.debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tBUNDLE_LOADER = \"$(TEST_HOST)\";\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.follow.flClash.RunnerTests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTEST_HOST = \"$(BUILT_PRODUCTS_DIR)/fl_clash.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/fl_clash\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t331C80DC294CF71000263BE5 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 9C9D4EF99A207AF51C53E0A3 /* Pods-RunnerTests.release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tBUNDLE_LOADER = \"$(TEST_HOST)\";\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.follow.flClash.RunnerTests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTEST_HOST = \"$(BUILT_PRODUCTS_DIR)/fl_clash.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/fl_clash\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t331C80DD294CF71000263BE5 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 341B4B12F589DC2F9A4F85AF /* Pods-RunnerTests.profile.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tBUNDLE_LOADER = \"$(TEST_HOST)\";\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tGENERATE_INFOPLIST_FILE = YES;\n\t\t\t\tMARKETING_VERSION = 1.0;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.follow.flClash.RunnerTests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTEST_HOST = \"$(BUILT_PRODUCTS_DIR)/fl_clash.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/fl_clash\";\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t338D0CE9231458BD00FA5F75 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEAD_CODE_STRIPPING = YES;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_USER_SCRIPT_SANDBOXING = NO;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.15;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t338D0CEA231458BD00FA5F75 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=macosx*]\" = \"-\";\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\n\t\t\t\tINFOPLIST_KEY_CFBundleDisplayName = FlClash;\n\t\t\t\tINFOPLIST_KEY_LSApplicationCategoryType = \"public.app-category.utilities\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/../Frameworks\",\n\t\t\t\t);\n\t\t\t\tPROVISIONING_PROFILE_SPECIFIER = \"\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t338D0CEB231458BD00FA5F75 /* Profile */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_STYLE = Manual;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Profile;\n\t\t};\n\t\t33CC10F92044A3C60003C045 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEAD_CODE_STRIPPING = YES;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tENABLE_USER_SCRIPT_SANDBOXING = NO;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.15;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t33CC10FA2044A3C60003C045 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEAD_CODE_STRIPPING = YES;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_USER_SCRIPT_SANDBOXING = NO;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.15;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t33CC10FC2044A3C60003C045 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\n\t\t\t\tINFOPLIST_KEY_CFBundleDisplayName = FlClash;\n\t\t\t\tINFOPLIST_KEY_LSApplicationCategoryType = \"public.app-category.utilities\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/../Frameworks\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.follow.clash.debug;\n\t\t\t\tPROVISIONING_PROFILE_SPECIFIER = \"\";\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t33CC10FD2044A3C60003C045 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tINFOPLIST_FILE = Runner/Info.plist;\n\t\t\t\tINFOPLIST_KEY_CFBundleDisplayName = FlClash;\n\t\t\t\tINFOPLIST_KEY_LSApplicationCategoryType = \"public.app-category.utilities\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/../Frameworks\",\n\t\t\t\t);\n\t\t\t\tPROVISIONING_PROFILE_SPECIFIER = \"\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t33CC111C2044C6BA0003C045 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_STYLE = Manual;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t33CC111D2044C6BA0003C045 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget \"RunnerTests\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t331C80DB294CF71000263BE5 /* Debug */,\n\t\t\t\t331C80DC294CF71000263BE5 /* Release */,\n\t\t\t\t331C80DD294CF71000263BE5 /* Profile */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t33CC10E82044A3C60003C045 /* Build configuration list for PBXProject \"Runner\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t33CC10F92044A3C60003C045 /* Debug */,\n\t\t\t\t33CC10FA2044A3C60003C045 /* Release */,\n\t\t\t\t338D0CE9231458BD00FA5F75 /* Profile */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget \"Runner\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t33CC10FC2044A3C60003C045 /* Debug */,\n\t\t\t\t33CC10FD2044A3C60003C045 /* Release */,\n\t\t\t\t338D0CEA231458BD00FA5F75 /* Profile */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget \"Flutter Assemble\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t33CC111C2044C6BA0003C045 /* Debug */,\n\t\t\t\t33CC111D2044C6BA0003C045 /* Release */,\n\t\t\t\t338D0CEB231458BD00FA5F75 /* Profile */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\n/* Begin XCRemoteSwiftPackageReference section */\n\t\tF5131FDB2EF0F1A500A1748D /* XCRemoteSwiftPackageReference \"LaunchAtLogin\" */ = {\n\t\t\tisa = XCRemoteSwiftPackageReference;\n\t\t\trepositoryURL = \"https://github.com/sindresorhus/LaunchAtLogin\";\n\t\t\trequirement = {\n\t\t\t\tbranch = main;\n\t\t\t\tkind = branch;\n\t\t\t};\n\t\t};\n/* End XCRemoteSwiftPackageReference section */\n\n/* Begin XCSwiftPackageProductDependency section */\n\t\tF5131FDC2EF0F1A500A1748D /* LaunchAtLogin */ = {\n\t\t\tisa = XCSwiftPackageProductDependency;\n\t\t\tpackage = F5131FDB2EF0F1A500A1748D /* XCRemoteSwiftPackageReference \"LaunchAtLogin\" */;\n\t\t\tproductName = LaunchAtLogin;\n\t\t};\n/* End XCSwiftPackageProductDependency section */\n\t};\n\trootObject = 33CC10E52044A3C60003C045 /* Project object */;\n}\n"
  },
  {
    "path": "macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"1510\"\n   version = \"1.3\">\n   <BuildAction\n      parallelizeBuildables = \"YES\"\n      buildImplicitDependencies = \"YES\">\n      <BuildActionEntries>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"YES\"\n            buildForArchiving = \"YES\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"33CC10EC2044A3C60003C045\"\n               BuildableName = \"FlClash.app\"\n               BlueprintName = \"Runner\"\n               ReferencedContainer = \"container:Runner.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n      </BuildActionEntries>\n   </BuildAction>\n   <TestAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\">\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"33CC10EC2044A3C60003C045\"\n            BuildableName = \"FlClash.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n      <Testables>\n         <TestableReference\n            skipped = \"NO\"\n            parallelizable = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"331C80D4294CF70F00263BE5\"\n               BuildableName = \"RunnerTests.xctest\"\n               BlueprintName = \"RunnerTests\"\n               ReferencedContainer = \"container:Runner.xcodeproj\">\n            </BuildableReference>\n         </TestableReference>\n      </Testables>\n   </TestAction>\n   <LaunchAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      launchStyle = \"0\"\n      useCustomWorkingDirectory = \"NO\"\n      ignoresPersistentStateOnLaunch = \"NO\"\n      debugDocumentVersioning = \"YES\"\n      debugServiceExtension = \"internal\"\n      enableGPUValidationMode = \"1\"\n      allowLocationSimulation = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"33CC10EC2044A3C60003C045\"\n            BuildableName = \"FlClash.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </LaunchAction>\n   <ProfileAction\n      buildConfiguration = \"Profile\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      savedToolIdentifier = \"\"\n      useCustomWorkingDirectory = \"NO\"\n      debugDocumentVersioning = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"33CC10EC2044A3C60003C045\"\n            BuildableName = \"FlClash.app\"\n            BlueprintName = \"Runner\"\n            ReferencedContainer = \"container:Runner.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </ProfileAction>\n   <AnalyzeAction\n      buildConfiguration = \"Debug\">\n   </AnalyzeAction>\n   <ArchiveAction\n      buildConfiguration = \"Release\"\n      revealArchiveInOrganizer = \"YES\">\n   </ArchiveAction>\n</Scheme>\n"
  },
  {
    "path": "macos/Runner.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"group:Runner.xcodeproj\">\n   </FileRef>\n   <FileRef\n      location = \"group:Pods/Pods.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "macos/RunnerTests/RunnerTests.swift",
    "content": "import Cocoa\nimport FlutterMacOS\nimport XCTest\n\nclass RunnerTests: XCTestCase {\n\n  func testExample() {\n    // If you add code to the Runner application, consider adding tests here.\n    // See https://developer.apple.com/documentation/xctest for more information about using XCTest.\n  }\n\n}\n"
  },
  {
    "path": "macos/packaging/dmg/make_config.yaml",
    "content": "title: FlClash\ncontents:\n  - x: 448\n    y: 344\n    type: link\n    path: \"/Applications\"\n  - x: 192\n    y: 344\n    type: file\n    path: FlClash.app\n"
  },
  {
    "path": "plugins/proxy/.gitignore",
    "content": "# Miscellaneous\n*.class\n*.log\n*.pyc\n*.swp\n.DS_Store\n.atom/\n.buildlog/\n.history\n.svn/\nmigrate_working_dir/\n\n# IntelliJ related\n*.iml\n*.ipr\n*.iws\n.idea/\n\n# The .vscode folder contains launch configuration and tasks you configure in\n# VS Code which you may wish to be included in version control, so this line\n# is commented out by default.\n#.vscode/\n\n# Flutter/Dart/Pub related\n# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.\n/pubspec.lock\n**/doc/api/\n.dart_tool/\n.packages\nbuild/\n"
  },
  {
    "path": "plugins/proxy/.metadata",
    "content": "# This file tracks properties of this Flutter project.\n# Used by Flutter tool to assess capabilities and perform upgrades etc.\n#\n# This file should be version controlled and should not be manually edited.\n\nversion:\n  revision: \"e1e47221e86272429674bec4f1bd36acc4fc7b77\"\n  channel: \"stable\"\n\nproject_type: plugin\n\n# Tracks metadata for the flutter migrate command\nmigration:\n  platforms:\n    - platform: root\n      create_revision: e1e47221e86272429674bec4f1bd36acc4fc7b77\n      base_revision: e1e47221e86272429674bec4f1bd36acc4fc7b77\n    - platform: android\n      create_revision: e1e47221e86272429674bec4f1bd36acc4fc7b77\n      base_revision: e1e47221e86272429674bec4f1bd36acc4fc7b77\n    - platform: windows\n      create_revision: e1e47221e86272429674bec4f1bd36acc4fc7b77\n      base_revision: e1e47221e86272429674bec4f1bd36acc4fc7b77\n\n  # User provided section\n\n  # List of Local paths (relative to this file) that should be\n  # ignored by the migrate tool.\n  #\n  # Files that are not part of the templates will be ignored by default.\n  unmanaged_files:\n    - 'lib/main.dart'\n    - 'ios/Runner.xcodeproj/project.pbxproj'\n"
  },
  {
    "path": "plugins/proxy/CHANGELOG.md",
    "content": "## 0.0.1\n\n* TODO: Describe initial release.\n"
  },
  {
    "path": "plugins/proxy/LICENSE",
    "content": "TODO: Add your license here.\n"
  },
  {
    "path": "plugins/proxy/README.md",
    "content": "# proxy\n\nA new Flutter plugin project.\n\n## Getting Started\n\nThis project is a starting point for a Flutter\n[plug-in package](https://flutter.dev/developing-packages/),\na specialized package that includes platform-specific implementation code for\nAndroid and/or iOS.\n\nFor help getting started with Flutter development, view the\n[online documentation](https://flutter.dev/docs), which offers tutorials,\nsamples, guidance on mobile development, and a full API reference.\n\n"
  },
  {
    "path": "plugins/proxy/analysis_options.yaml",
    "content": "include: package:flutter_lints/flutter.yaml\n\n# Additional information about this file can be found at\n# https://dart.dev/guides/language/analysis-options\n"
  },
  {
    "path": "plugins/proxy/lib/proxy.dart",
    "content": "import 'dart:io';\n\nimport \"package:path/path.dart\";\n\nimport 'proxy_platform_interface.dart';\n\nenum ProxyTypes { http, https, socks }\n\nclass Proxy extends ProxyPlatform {\n  static String url = \"127.0.0.1\";\n\n  @override\n  Future<bool?> startProxy(\n    int port, [\n    List<String> bypassDomain = const [],\n  ]) async {\n    return switch (Platform.operatingSystem) {\n      \"macos\" => await _startProxyWithMacos(port, bypassDomain),\n      \"linux\" => await _startProxyWithLinux(port, bypassDomain),\n      \"windows\" => await ProxyPlatform.instance.startProxy(port, bypassDomain),\n      String() => false,\n    };\n  }\n\n  @override\n  Future<bool?> stopProxy() async {\n    return switch (Platform.operatingSystem) {\n      \"macos\" => await _stopProxyWithMacos(),\n      \"linux\" => await _stopProxyWithLinux(),\n      \"windows\" => await ProxyPlatform.instance.stopProxy(),\n      String() => false,\n    };\n  }\n\n  Future<bool> _startProxyWithLinux(int port, List<String> bypassDomain) async {\n    try {\n      final homeDir = Platform.environment['HOME']!;\n      final configDir = join(homeDir, \".config\");\n      final cmdList = List<List<String>>.empty(growable: true);\n      final desktop = Platform.environment['XDG_CURRENT_DESKTOP'];\n      final isKDE = desktop == \"KDE\";\n      if (isKDE) {\n        cmdList.add(\n          [\n            \"kwriteconfig5\",\n            \"--file\",\n            \"$configDir/kioslaverc\",\n            \"--group\",\n            \"Proxy Settings\",\n            \"--key\",\n            \"ProxyType\",\n            \"1\"\n          ],\n        );\n        cmdList.add(\n          [\n            \"kwriteconfig5\",\n            \"--file\",\n            \"$configDir/kioslaverc\",\n            \"--group\",\n            \"Proxy Settings\",\n            \"--key\",\n            \"NoProxyFor\",\n            bypassDomain.join(\",\")\n          ],\n        );\n      } else {\n        cmdList.add(\n          [\"gsettings\", \"set\", \"org.gnome.system.proxy\", \"mode\", \"manual\"],\n        );\n        final ignoreHosts = \"\\\"['${bypassDomain.join(\"', '\")}']\\\"\";\n        cmdList.add(\n          [\n            \"gsettings\",\n            \"set\",\n            \"org.gnome.system.proxy\",\n            \"ignore-hosts\",\n            ignoreHosts\n          ],\n        );\n      }\n      for (final type in ProxyTypes.values) {\n        if (!isKDE) {\n          cmdList.add(\n            [\n              \"gsettings\",\n              \"set\",\n              \"org.gnome.system.proxy.${type.name}\",\n              \"host\",\n              url\n            ],\n          );\n          cmdList.add(\n            [\n              \"gsettings\",\n              \"set\",\n              \"org.gnome.system.proxy.${type.name}\",\n              \"port\",\n              \"$port\"\n            ],\n          );\n          cmdList.add(\n            [\n              \"gsettings\",\n              \"set\",\n              \"org.gnome.system.proxy.${type.name}\",\n              \"port\",\n              \"$port\"\n            ],\n          );\n          cmdList.add(\n            [\n              \"gsettings\",\n              \"set\",\n              \"org.gnome.system.proxy.${type.name}\",\n              \"port\",\n              \"$port\"\n            ],\n          );\n        }\n        if (isKDE) {\n          cmdList.add(\n            [\n              \"kwriteconfig5\",\n              \"--file\",\n              \"$configDir/kioslaverc\",\n              \"--group\",\n              \"Proxy Settings\",\n              \"--key\",\n              \"${type.name}Proxy\",\n              \"${type.name}://$url:$port\"\n            ],\n          );\n        }\n      }\n      for (final cmd in cmdList) {\n        await Process.run(cmd[0], cmd.sublist(1), runInShell: true);\n      }\n      return true;\n    } catch (_) {\n      return false;\n    }\n  }\n\n  Future<bool> _stopProxyWithLinux() async {\n    try {\n      final homeDir = Platform.environment['HOME']!;\n      final configDir = join(homeDir, \".config/\");\n      final cmdList = List<List<String>>.empty(growable: true);\n      final desktop = Platform.environment['XDG_CURRENT_DESKTOP'];\n      final isKDE = desktop == \"KDE\";\n      if (isKDE) {\n        cmdList.add(\n          [\n            \"kwriteconfig5\",\n            \"--file\",\n            \"$configDir/kioslaverc\",\n            \"--group\",\n            \"Proxy Settings\",\n            \"--key\",\n            \"ProxyType\",\n            \"0\"\n          ],\n        );\n      } else {\n        cmdList.add(\n          [\"gsettings\", \"set\", \"org.gnome.system.proxy\", \"mode\", \"none\"],\n        );\n      }\n      for (final cmd in cmdList) {\n        await Process.run(cmd[0], cmd.sublist(1));\n      }\n      return true;\n    } catch (_) {\n      return false;\n    }\n  }\n\n  Future<bool> _startProxyWithMacos(int port, List<String> bypassDomain) async {\n    try {\n      final devices = await _getNetworkDeviceListWithMacos();\n      for (final dev in devices) {\n        await Future.wait([\n          Process.run(\n            \"/usr/sbin/networksetup\",\n            [\"-setwebproxystate\", dev, \"on\"],\n          ),\n          Process.run(\n            \"/usr/sbin/networksetup\",\n            [\"-setwebproxy\", dev, url, \"$port\"],\n          ),\n          Process.run(\n            \"/usr/sbin/networksetup\",\n            [\"-setsecurewebproxystate\", dev, \"on\"],\n          ),\n          Process.run(\n            \"/usr/sbin/networksetup\",\n            [\"-setsecurewebproxy\", dev, url, \"$port\"],\n          ),\n          Process.run(\n            \"/usr/sbin/networksetup\",\n            [\"-setsocksfirewallproxystate\", dev, \"on\"],\n          ),\n          Process.run(\n            \"/usr/sbin/networksetup\",\n            [\"-setsocksfirewallproxy\", dev, url, \"$port\"],\n          ),\n          Process.run(\n            \"/usr/sbin/networksetup\",\n            [\n              \"-setproxybypassdomains\",\n              dev,\n              bypassDomain.join(\",\"),\n            ],\n          ),\n        ]);\n      }\n      return true;\n    } catch (e) {\n      return false;\n    }\n  }\n\n  Future<bool> _stopProxyWithMacos() async {\n    try {\n      final devices = await _getNetworkDeviceListWithMacos();\n      for (final dev in devices) {\n        await Future.wait([\n          Process.run(\n            \"/usr/sbin/networksetup\",\n            [\"-setautoproxystate\", dev, \"off\"],\n          ),\n          Process.run(\n            \"/usr/sbin/networksetup\",\n            [\"-setwebproxystate\", dev, \"off\"],\n          ),\n          Process.run(\n            \"/usr/sbin/networksetup\",\n            [\"-setsecurewebproxystate\", dev, \"off\"],\n          ),\n          Process.run(\n            \"/usr/sbin/networksetup\",\n            [\"-setsocksfirewallproxystate\", dev, \"off\"],\n          ),\n          Process.run(\n            \"/usr/sbin/networksetup\",\n            [\"-setproxybypassdomains\", dev, \"\"],\n          ),\n        ]);\n      }\n      return true;\n    } catch (e) {\n      return false;\n    }\n  }\n\n  Future<List<String>> _getNetworkDeviceListWithMacos() async {\n    final res = await Process.run(\n        \"/usr/sbin/networksetup\", [\"-listallnetworkservices\"]);\n    final lines = res.stdout.toString().split(\"\\n\");\n    lines.removeWhere((element) => element.contains(\"*\"));\n    return lines;\n  }\n}\n"
  },
  {
    "path": "plugins/proxy/lib/proxy_method_channel.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/services.dart';\n\nimport 'proxy_platform_interface.dart';\n\n/// An implementation of [ProxyPlatform] that uses method channels.\nclass MethodChannelProxy extends ProxyPlatform {\n  /// The method channel used to interact with the native platform.\n  @visibleForTesting\n  final methodChannel = const MethodChannel('proxy');\n\n  MethodChannelProxy();\n\n  @override\n  Future<bool?> startProxy(int port, List<String> bypassDomain) async {\n    return await methodChannel.invokeMethod<bool>(\"StartProxy\", {\n      'port': port,\n      'bypassDomain': bypassDomain,\n    });\n  }\n\n  @override\n  Future<bool?> stopProxy() async {\n    return await methodChannel.invokeMethod<bool>(\"StopProxy\");\n  }\n}\n"
  },
  {
    "path": "plugins/proxy/lib/proxy_platform_interface.dart",
    "content": "import 'package:plugin_platform_interface/plugin_platform_interface.dart';\n\nimport 'proxy_method_channel.dart';\n\nabstract class ProxyPlatform extends PlatformInterface {\n  /// Constructs a ProxyPlatform.\n  ProxyPlatform() : super(token: _token);\n\n  static final Object _token = Object();\n\n  static ProxyPlatform _instance = MethodChannelProxy();\n\n  /// The default instance of [ProxyPlatform] to use.\n  ///\n  /// Defaults to [MethodChannelProxy].\n  static ProxyPlatform get instance => _instance;\n\n  static set instance(ProxyPlatform instance) {\n    PlatformInterface.verifyToken(instance, _token);\n    _instance = instance;\n  }\n\n  Future<bool?> startProxy(int port, List<String> bypassDomain) {\n    throw UnimplementedError('startProxy() has not been implemented.');\n  }\n\n  Future<bool?> stopProxy() {\n    throw UnimplementedError('stopProxy() has not been implemented.');\n  }\n}\n"
  },
  {
    "path": "plugins/proxy/pubspec.yaml",
    "content": "name: proxy\ndescription: A new Flutter plugin project.\nversion: 0.0.1\nhomepage:\n\nenvironment:\n  sdk: '>=3.1.0 <4.0.0'\n  flutter: '>=3.3.0'\n\ndependencies:\n  flutter:\n    sdk: flutter\n  plugin_platform_interface: ^2.0.2\n  path: ^1.8.3\n\ndev_dependencies:\n  flutter_test:\n    sdk: flutter\n  flutter_lints: ^2.0.0\n\n# For information on the generic Dart part of this file, see the\n# following page: https://dart.dev/tools/pub/pubspec\n\n# The following section is specific to Flutter packages.\nflutter:\n  # This section identifies this Flutter project as a plugin project.\n  # The 'pluginClass' specifies the class (in Java, Kotlin, Swift, Objective-C, etc.)\n  # which should be registered in the plugin registry. This is required for\n  # using method channels.\n  # The Android 'package' specifies package in which the registered class is.\n  # This is required for using method channels on Android.\n  # The 'ffiPlugin' specifies that native code should be built and bundled.\n  # This is required for using `dart:ffi`.\n  # All these are used by the tooling to maintain consistency when\n  # adding or updating assets for this project.\n  plugin:\n    platforms:\n      windows:\n        pluginClass: ProxyPluginCApi\n\n  # To add assets to your plugin package, add an assets section, like this:\n  # assets:\n  #   - images/a_dot_burr.jpeg\n  #   - images/a_dot_ham.jpeg\n  #\n  # For details regarding assets in packages, see\n  # https://flutter.dev/assets-and-images/#from-packages\n  #\n  # An image asset can refer to one or more resolution-specific \"variants\", see\n  # https://flutter.dev/assets-and-images/#resolution-aware\n\n  # To add custom fonts to your plugin package, add a fonts section here,\n  # in this \"flutter\" section. Each entry in this list should have a\n  # \"family\" key with the font family name, and a \"fonts\" key with a\n  # list giving the asset and other descriptors for the font. For\n  # example:\n  # fonts:\n  #   - family: Schyler\n  #     fonts:\n  #       - asset: fonts/Schyler-Regular.ttf\n  #       - asset: fonts/Schyler-Italic.ttf\n  #         style: italic\n  #   - family: Trajan Pro\n  #     fonts:\n  #       - asset: fonts/TrajanPro.ttf\n  #       - asset: fonts/TrajanPro_Bold.ttf\n  #         weight: 700\n  #\n  # For details regarding fonts in packages, see\n  # https://flutter.dev/custom-fonts/#from-packages\n"
  },
  {
    "path": "plugins/proxy/windows/.gitignore",
    "content": "flutter/\n\n# Visual Studio user-specific files.\n*.suo\n*.user\n*.userosscache\n*.sln.docstates\n\n# Visual Studio build-related files.\nx64/\nx86/\n\n# Visual Studio cache files\n# files ending in .cache can be ignored\n*.[Cc]ache\n# but keep track of directories ending in .cache\n!*.[Cc]ache/\n"
  },
  {
    "path": "plugins/proxy/windows/CMakeLists.txt",
    "content": "# The Flutter tooling requires that developers have a version of Visual Studio\n# installed that includes CMake 3.14 or later. You should not increase this\n# version, as doing so will cause the plugin to fail to compile for some\n# customers of the plugin.\ncmake_minimum_required(VERSION 3.14)\n\n# Project-level configuration.\nset(PROJECT_NAME \"proxy\")\nproject(${PROJECT_NAME} LANGUAGES CXX)\n\n# Explicitly opt in to modern CMake behaviors to avoid warnings with recent\n# versions of CMake.\ncmake_policy(VERSION 3.14...3.25)\n\n# This value is used when generating builds using this plugin, so it must\n# not be changed\nset(PLUGIN_NAME \"proxy_plugin\")\n\n# Any new source files that you add to the plugin should be added here.\nlist(APPEND PLUGIN_SOURCES\n  \"proxy_plugin.cpp\"\n  \"proxy_plugin.h\"\n)\n\n# Define the plugin library target. Its name must not be changed (see comment\n# on PLUGIN_NAME above).\nadd_library(${PLUGIN_NAME} SHARED\n  \"include/proxy/proxy_plugin_c_api.h\"\n  \"proxy_plugin_c_api.cpp\"\n  ${PLUGIN_SOURCES}\n)\n\n# Apply a standard set of build settings that are configured in the\n# application-level CMakeLists.txt. This can be removed for plugins that want\n# full control over build settings.\napply_standard_settings(${PLUGIN_NAME})\n\n# Symbols are hidden by default to reduce the chance of accidental conflicts\n# between plugins. This should not be removed; any symbols that should be\n# exported should be explicitly exported with the FLUTTER_PLUGIN_EXPORT macro.\nset_target_properties(${PLUGIN_NAME} PROPERTIES\n  CXX_VISIBILITY_PRESET hidden)\ntarget_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL)\n\n# Source include directories and library dependencies. Add any plugin-specific\n# dependencies here.\ntarget_include_directories(${PLUGIN_NAME} INTERFACE\n  \"${CMAKE_CURRENT_SOURCE_DIR}/include\")\ntarget_link_libraries(${PLUGIN_NAME} PRIVATE flutter flutter_wrapper_plugin)\n\n# List of absolute paths to libraries that should be bundled with the plugin.\n# This list could contain prebuilt libraries, or libraries created by an\n# external build triggered from this build file.\nset(proxy_bundled_libraries\n  \"\"\n  PARENT_SCOPE\n)\n\n# === Tests ===\n# These unit tests can be run from a terminal after building the example, or\n# from Visual Studio after opening the generated solution file.\n\n# Only enable test builds when building the example (which sets this variable)\n# so that plugin clients aren't building the tests.\nif (${include_${PROJECT_NAME}_tests})\nset(TEST_RUNNER \"${PROJECT_NAME}_test\")\nenable_testing()\n\n# Add the Google Test dependency.\ninclude(FetchContent)\nFetchContent_Declare(\n  googletest\n  URL https://github.com/google/googletest/archive/release-1.11.0.zip\n)\n# Prevent overriding the parent project's compiler/linker settings\nset(gtest_force_shared_crt ON CACHE BOOL \"\" FORCE)\n# Disable install commands for gtest so it doesn't end up in the bundle.\nset(INSTALL_GTEST OFF CACHE BOOL \"Disable installation of googletest\" FORCE)\nFetchContent_MakeAvailable(googletest)\n\n# The plugin's C API is not very useful for unit testing, so build the sources\n# directly into the test binary rather than using the DLL.\nadd_executable(${TEST_RUNNER}\n  test/proxy_plugin_test.cpp\n  ${PLUGIN_SOURCES}\n)\napply_standard_settings(${TEST_RUNNER})\ntarget_include_directories(${TEST_RUNNER} PRIVATE \"${CMAKE_CURRENT_SOURCE_DIR}\")\ntarget_link_libraries(${TEST_RUNNER} PRIVATE flutter_wrapper_plugin)\ntarget_link_libraries(${TEST_RUNNER} PRIVATE gtest_main gmock)\n# flutter_wrapper_plugin has link dependencies on the Flutter DLL.\nadd_custom_command(TARGET ${TEST_RUNNER} POST_BUILD\n  COMMAND ${CMAKE_COMMAND} -E copy_if_different\n  \"${FLUTTER_LIBRARY}\" $<TARGET_FILE_DIR:${TEST_RUNNER}>\n)\n\n# Enable automatic test discovery.\ninclude(GoogleTest)\ngtest_discover_tests(${TEST_RUNNER})\nendif()\n"
  },
  {
    "path": "plugins/proxy/windows/include/proxy/proxy_plugin_c_api.h",
    "content": "#ifndef FLUTTER_PLUGIN_PROXY_PLUGIN_C_API_H_\n#define FLUTTER_PLUGIN_PROXY_PLUGIN_C_API_H_\n\n#include <flutter_plugin_registrar.h>\n\n#ifdef FLUTTER_PLUGIN_IMPL\n#define FLUTTER_PLUGIN_EXPORT __declspec(dllexport)\n#else\n#define FLUTTER_PLUGIN_EXPORT __declspec(dllimport)\n#endif\n\n#if defined(__cplusplus)\nextern \"C\" {\n#endif\n\nFLUTTER_PLUGIN_EXPORT void ProxyPluginCApiRegisterWithRegistrar(\n    FlutterDesktopPluginRegistrarRef registrar);\n\n#if defined(__cplusplus)\n}  // extern \"C\"\n#endif\n\n#endif  // FLUTTER_PLUGIN_PROXY_PLUGIN_C_API_H_\n"
  },
  {
    "path": "plugins/proxy/windows/proxy_plugin.cpp",
    "content": "#include \"proxy_plugin.h\"\n\n// This must be included before many other Windows headers.\n#include <windows.h>\n\n#include <WinInet.h>\n#include <Ras.h>\n#include <RasError.h>\n#include <vector>\n#include <iostream>\n\n#pragma comment(lib, \"wininet\")\n#pragma comment(lib, \"Rasapi32\")\n\n// For getPlatformVersion; remove unless needed for your plugin implementation.\n#include <VersionHelpers.h>\n\n#include <flutter/method_channel.h>\n#include <flutter/plugin_registrar_windows.h>\n#include <flutter/standard_method_codec.h>\n\n#include <memory>\n#include <sstream>\n\nvoid startProxy(const int port, const flutter::EncodableList& bypassDomain)\n{\n  INTERNET_PER_CONN_OPTION_LIST list;\n  DWORD dwBufSize = sizeof(list);\n  list.dwSize = sizeof(list);\n  list.pszConnection = nullptr;\n\n  auto url = \"127.0.0.1:\" + std::to_string(port);\n  auto wUrl = std::wstring(url.begin(), url.end());\n  auto fullAddr = new WCHAR[url.length() + 1];\n  wcscpy_s(fullAddr, url.length() + 1, wUrl.c_str());\n\n  std::wstring wBypassList;\n\n  for (const auto& domain : bypassDomain) {\n    if (!wBypassList.empty()) {\n       wBypassList += L\";\";\n    }\n    wBypassList += std::wstring(std::get<std::string>(domain).begin(), std::get<std::string>(domain).end());\n  }\n\n  auto bypassAddr = new WCHAR[wBypassList.length() + 1];\n  wcscpy_s(bypassAddr, wBypassList.length() + 1, wBypassList.c_str());\n\n  list.dwOptionCount = 3;\n  list.pOptions = new INTERNET_PER_CONN_OPTION[3];\n\n  if (!list.pOptions)\n  {\n    return;\n  }\n\n  list.pOptions[0].dwOption = INTERNET_PER_CONN_FLAGS;\n  list.pOptions[0].Value.dwValue = PROXY_TYPE_DIRECT | PROXY_TYPE_PROXY;\n\n  list.pOptions[1].dwOption = INTERNET_PER_CONN_PROXY_SERVER;\n  list.pOptions[1].Value.pszValue = fullAddr;\n\n  list.pOptions[2].dwOption = INTERNET_PER_CONN_PROXY_BYPASS;\n  list.pOptions[2].Value.pszValue = bypassAddr;\n\n  InternetSetOption(nullptr, INTERNET_OPTION_PER_CONNECTION_OPTION, &list, dwBufSize);\n\n  RASENTRYNAME entry;\n  entry.dwSize = sizeof(entry);\n  std::vector<RASENTRYNAME> entries;\n  DWORD size = sizeof(entry), count;\n  LPRASENTRYNAME entryAddr = &entry;\n  auto ret = RasEnumEntries(nullptr, nullptr, entryAddr, &size, &count);\n  if (ret == ERROR_BUFFER_TOO_SMALL)\n  {\n    entries.resize(count);\n    entries[0].dwSize = sizeof(RASENTRYNAME);\n    entryAddr = entries.data();\n    ret = RasEnumEntries(nullptr, nullptr, entryAddr, &size, &count);\n  }\n  if (ret != ERROR_SUCCESS)\n  {\n    return;\n  }\n  for (DWORD i = 0; i < count; i++)\n  {\n    list.pszConnection = entryAddr[i].szEntryName;\n    InternetSetOption(nullptr, INTERNET_OPTION_PER_CONNECTION_OPTION, &list, dwBufSize);\n  }\n\n  delete[] fullAddr;\n  delete[] bypassAddr;\n  delete[] list.pOptions;\n\n  InternetSetOption(nullptr, INTERNET_OPTION_SETTINGS_CHANGED, nullptr, 0);\n  InternetSetOption(nullptr, INTERNET_OPTION_REFRESH, nullptr, 0);\n}\n\nvoid stopProxy()\n{\n  INTERNET_PER_CONN_OPTION_LIST list;\n  DWORD dwBufSize = sizeof(list);\n\n  list.dwSize = sizeof(list);\n  list.pszConnection = nullptr;\n  list.dwOptionCount = 1;\n  list.pOptions = new INTERNET_PER_CONN_OPTION[1];\n  if (nullptr == list.pOptions)\n  {\n    return;\n  }\n  list.pOptions[0].dwOption = INTERNET_PER_CONN_FLAGS;\n  list.pOptions[0].Value.dwValue = PROXY_TYPE_DIRECT;\n\n  InternetSetOption(nullptr, INTERNET_OPTION_PER_CONNECTION_OPTION, &list, dwBufSize);\n\n  RASENTRYNAME entry;\n  entry.dwSize = sizeof(entry);\n  std::vector<RASENTRYNAME> entries;\n  DWORD size = sizeof(entry), count;\n  LPRASENTRYNAME entryAddr = &entry;\n  auto ret = RasEnumEntries(nullptr, nullptr, entryAddr, &size, &count);\n  if (ret == ERROR_BUFFER_TOO_SMALL)\n  {\n    entries.resize(count);\n    entries[0].dwSize = sizeof(RASENTRYNAME);\n    entryAddr = entries.data();\n    ret = RasEnumEntries(nullptr, nullptr, entryAddr, &size, &count);\n  }\n  if (ret != ERROR_SUCCESS)\n  {\n    return;\n  }\n  for (DWORD i = 0; i < count; i++)\n  {\n    list.pszConnection = entryAddr[i].szEntryName;\n    InternetSetOption(nullptr, INTERNET_OPTION_PER_CONNECTION_OPTION, &list, dwBufSize);\n  }\n  delete[] list.pOptions;\n  InternetSetOption(nullptr, INTERNET_OPTION_SETTINGS_CHANGED, nullptr, 0);\n  InternetSetOption(nullptr, INTERNET_OPTION_REFRESH, nullptr, 0);\n}\n\nnamespace proxy\n{\n\n  // static\n  void ProxyPlugin::RegisterWithRegistrar(\n      flutter::PluginRegistrarWindows *registrar)\n  {\n    auto channel =\n        std::make_unique<flutter::MethodChannel<flutter::EncodableValue>>(\n            registrar->messenger(), \"proxy\",\n            &flutter::StandardMethodCodec::GetInstance());\n\n    auto plugin = std::make_unique<ProxyPlugin>();\n\n    channel->SetMethodCallHandler(\n        [plugin_pointer = plugin.get()](const auto &call, auto result)\n        {\n          plugin_pointer->HandleMethodCall(call, std::move(result));\n        });\n\n    registrar->AddPlugin(std::move(plugin));\n  }\n\n  ProxyPlugin::ProxyPlugin() {}\n\n  ProxyPlugin::~ProxyPlugin() {}\n\n  void ProxyPlugin::HandleMethodCall(\n      const flutter::MethodCall<flutter::EncodableValue> &method_call,\n      std::unique_ptr<flutter::MethodResult<flutter::EncodableValue>> result)\n  {\n    if (method_call.method_name().compare(\"StopProxy\") == 0)\n    {\n      stopProxy();\n      result->Success(true);\n    }\n    else if (method_call.method_name().compare(\"StartProxy\") == 0)\n    {\n      auto *arguments = std::get_if<flutter::EncodableMap>(method_call.arguments());\n      auto port = std::get<int>(arguments->at(flutter::EncodableValue(\"port\")));\n      auto bypassDomain = std::get<flutter::EncodableList>(arguments->at(flutter::EncodableValue(\"bypassDomain\")));\n      startProxy(port, bypassDomain);\n      result->Success(true);\n    }\n    else\n    {\n      result->NotImplemented();\n    }\n  }\n} // namespace proxy\n"
  },
  {
    "path": "plugins/proxy/windows/proxy_plugin.h",
    "content": "#ifndef FLUTTER_PLUGIN_PROXY_PLUGIN_H_\n#define FLUTTER_PLUGIN_PROXY_PLUGIN_H_\n\n#include <flutter/method_channel.h>\n#include <flutter/plugin_registrar_windows.h>\n\n#include <memory>\n\nnamespace proxy {\n\nclass ProxyPlugin : public flutter::Plugin {\n public:\n  static void RegisterWithRegistrar(flutter::PluginRegistrarWindows *registrar);\n\n  ProxyPlugin();\n\n  virtual ~ProxyPlugin();\n\n  // Disallow copy and assign.\n  ProxyPlugin(const ProxyPlugin&) = delete;\n  ProxyPlugin& operator=(const ProxyPlugin&) = delete;\n\n  // Called when a method is called on this plugin's channel from Dart.\n  void HandleMethodCall(\n      const flutter::MethodCall<flutter::EncodableValue> &method_call,\n      std::unique_ptr<flutter::MethodResult<flutter::EncodableValue>> result);\n};\n\n}  // namespace proxy\n\n#endif  // FLUTTER_PLUGIN_PROXY_PLUGIN_H_\n"
  },
  {
    "path": "plugins/proxy/windows/proxy_plugin_c_api.cpp",
    "content": "#include \"include/proxy/proxy_plugin_c_api.h\"\n\n#include <flutter/plugin_registrar_windows.h>\n\n#include \"proxy_plugin.h\"\n\nvoid ProxyPluginCApiRegisterWithRegistrar(\n    FlutterDesktopPluginRegistrarRef registrar) {\n  proxy::ProxyPlugin::RegisterWithRegistrar(\n      flutter::PluginRegistrarManager::GetInstance()\n          ->GetRegistrar<flutter::PluginRegistrarWindows>(registrar));\n}\n"
  },
  {
    "path": "plugins/proxy/windows/test/proxy_plugin_test.cpp",
    "content": "#include <flutter/method_call.h>\n#include <flutter/method_result_functions.h>\n#include <flutter/standard_method_codec.h>\n#include <gtest/gtest.h>\n#include <windows.h>\n\n#include <memory>\n#include <string>\n#include <variant>\n\n#include \"proxy_plugin.h\"\n\nnamespace proxy {\nnamespace test {\n\nnamespace {\n\nusing flutter::EncodableMap;\nusing flutter::EncodableValue;\nusing flutter::MethodCall;\nusing flutter::MethodResultFunctions;\n\n}  // namespace\n\nTEST(ProxyPlugin, GetPlatformVersion) {\n  ProxyPlugin plugin;\n  // Save the reply value from the success callback.\n  std::string result_string;\n  plugin.HandleMethodCall(\n      MethodCall(\"getPlatformVersion\", std::make_unique<EncodableValue>()),\n      std::make_unique<MethodResultFunctions<>>(\n          [&result_string](const EncodableValue* result) {\n            result_string = std::get<std::string>(*result);\n          },\n          nullptr, nullptr));\n\n  // Since the exact string varies by host, just ensure that it's a string\n  // with the expected format.\n  EXPECT_TRUE(result_string.rfind(\"Windows \", 0) == 0);\n}\n\n}  // namespace test\n}  // namespace proxy\n"
  },
  {
    "path": "plugins/window_ext/.gitignore",
    "content": "# Miscellaneous\n*.class\n*.log\n*.pyc\n*.swp\n.DS_Store\n.atom/\n.buildlog/\n.history\n.svn/\nmigrate_working_dir/\n\n# IntelliJ related\n*.iml\n*.ipr\n*.iws\n.idea/\n\n# The .vscode folder contains launch configuration and tasks you configure in\n# VS Code which you may wish to be included in version control, so this line\n# is commented out by default.\n#.vscode/\n\n# Flutter/Dart/Pub related\n# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.\n/pubspec.lock\n**/doc/api/\n.dart_tool/\nbuild/\n"
  },
  {
    "path": "plugins/window_ext/.metadata",
    "content": "# This file tracks properties of this Flutter project.\n# Used by Flutter tool to assess capabilities and perform upgrades etc.\n#\n# This file should be version controlled and should not be manually edited.\n\nversion:\n  revision: \"603104015dd692ea3403755b55d07813d5cf8965\"\n  channel: \"stable\"\n\nproject_type: plugin\n\n# Tracks metadata for the flutter migrate command\nmigration:\n  platforms:\n    - platform: root\n      create_revision: 603104015dd692ea3403755b55d07813d5cf8965\n      base_revision: 603104015dd692ea3403755b55d07813d5cf8965\n    - platform: macos\n      create_revision: 603104015dd692ea3403755b55d07813d5cf8965\n      base_revision: 603104015dd692ea3403755b55d07813d5cf8965\n    - platform: windows\n      create_revision: 603104015dd692ea3403755b55d07813d5cf8965\n      base_revision: 603104015dd692ea3403755b55d07813d5cf8965\n\n  # User provided section\n\n  # List of Local paths (relative to this file) that should be\n  # ignored by the migrate tool.\n  #\n  # Files that are not part of the templates will be ignored by default.\n  unmanaged_files:\n    - 'lib/main.dart'\n    - 'ios/Runner.xcodeproj/project.pbxproj'\n"
  },
  {
    "path": "plugins/window_ext/CHANGELOG.md",
    "content": "## 0.0.1\n\n* TODO: Describe initial release.\n"
  },
  {
    "path": "plugins/window_ext/LICENSE",
    "content": "TODO: Add your license here.\n"
  },
  {
    "path": "plugins/window_ext/README.md",
    "content": "# window_ext\n\nA new Flutter plugin project.\n\n## Getting Started\n\nThis project is a starting point for a Flutter\n[plug-in package](https://flutter.dev/developing-packages/),\na specialized package that includes platform-specific implementation code for\nAndroid and/or iOS.\n\nFor help getting started with Flutter development, view the\n[online documentation](https://flutter.dev/docs), which offers tutorials,\nsamples, guidance on mobile development, and a full API reference.\n\n"
  },
  {
    "path": "plugins/window_ext/analysis_options.yaml",
    "content": "include: package:flutter_lints/flutter.yaml\n\n# Additional information about this file can be found at\n# https://dart.dev/guides/language/analysis-options\n"
  },
  {
    "path": "plugins/window_ext/lib/window_ext.dart",
    "content": "export 'window_ext_listener.dart';\nexport 'window_ext_manager.dart';"
  },
  {
    "path": "plugins/window_ext/lib/window_ext_listener.dart",
    "content": "abstract mixin class WindowExtListener {\n  void onTaskbarCreated() {}\n\n  void onShouldTerminate() {}\n}\n"
  },
  {
    "path": "plugins/window_ext/lib/window_ext_manager.dart",
    "content": "import 'package:flutter/foundation.dart';\nimport 'package:flutter/services.dart';\n\nimport 'window_ext_listener.dart';\n\nclass WindowExtManager {\n  WindowExtManager._() {\n    _channel.setMethodCallHandler(_methodCallHandler);\n  }\n\n  static final WindowExtManager instance = WindowExtManager._();\n\n  final MethodChannel _channel = const MethodChannel('window_ext');\n\n  final ObserverList<WindowExtListener> _listeners =\n      ObserverList<WindowExtListener>();\n\n  Future<void> _methodCallHandler(MethodCall call) async {\n    for (final WindowExtListener listener in _listeners) {\n      switch (call.method) {\n        case \"taskbarCreated\":\n          listener.onTaskbarCreated();\n          break;\n        case \"shouldTerminate\":\n          listener.onShouldTerminate();\n          break;\n      }\n    }\n  }\n\n  bool get hasListeners {\n    return _listeners.isNotEmpty;\n  }\n\n  void addListener(WindowExtListener listener) {\n    _listeners.add(listener);\n  }\n\n  void removeListener(WindowExtListener listener) {\n    _listeners.remove(listener);\n  }\n}\n\nfinal windowExtManager = WindowExtManager.instance;\n"
  },
  {
    "path": "plugins/window_ext/macos/Classes/WindowExtPlugin.swift",
    "content": "import Cocoa\nimport FlutterMacOS\n\npublic class WindowExtPlugin: NSObject, FlutterPlugin {\n    public static var instance:WindowExtPlugin?\n    \n    public static func register(with registrar: FlutterPluginRegistrar) {\n        let channel = FlutterMethodChannel(name: \"window_ext\", binaryMessenger: registrar.messenger)\n        instance = WindowExtPlugin(registrar, channel)\n        registrar.addMethodCallDelegate(instance!, channel: channel)\n    }\n    \n    private var registrar: FlutterPluginRegistrar!\n    private var channel: FlutterMethodChannel!\n    \n    public init(_ registrar: FlutterPluginRegistrar, _ channel: FlutterMethodChannel) {\n        super.init()\n        self.registrar = registrar\n        self.channel = channel\n    }\n    \n    public func handleShouldTerminate(){\n        channel.invokeMethod(\"shouldTerminate\", arguments: nil)\n    }\n}\n"
  },
  {
    "path": "plugins/window_ext/macos/window_ext.podspec",
    "content": "#\n# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.\n# Run `pod lib lint window_ext.podspec` to validate before publishing.\n#\nPod::Spec.new do |s|\n  s.name             = 'window_ext'\n  s.version          = '0.0.1'\n  s.summary          = 'A new Flutter plugin project.'\n  s.description      = <<-DESC\nA new Flutter plugin project.\n                       DESC\n  s.homepage         = 'http://example.com'\n  s.license          = { :file => '../LICENSE' }\n  s.author           = { 'Your Company' => 'email@example.com' }\n\n  s.source           = { :path => '.' }\n  s.source_files = 'Classes/**/*'\n  s.dependency 'FlutterMacOS'\n\n  s.platform = :osx, '10.11'\n  s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }\n  s.swift_version = '5.0'\nend\n"
  },
  {
    "path": "plugins/window_ext/pubspec.yaml",
    "content": "name: window_ext\ndescription: \"A new Flutter plugin project.\"\nversion: 0.0.1\nhomepage:\n\nenvironment:\n  sdk: '>=3.4.4 <4.0.0'\n  flutter: '>=3.3.0'\n\ndependencies:\n  flutter:\n    sdk: flutter\n  plugin_platform_interface: ^2.0.2\n\ndev_dependencies:\n  flutter_test:\n    sdk: flutter\n  flutter_lints: ^3.0.0\n\n# For information on the generic Dart part of this file, see the\n# following page: https://dart.dev/tools/pub/pubspec\n\n# The following section is specific to Flutter packages.\nflutter:\n  # This section identifies this Flutter project as a plugin project.\n  # The 'pluginClass' specifies the class (in Java, Kotlin, Swift, Objective-C, etc.)\n  # which should be registered in the plugin registry. This is required for\n  # using method channels.\n  # The Android 'package' specifies package in which the registered class is.\n  # This is required for using method channels on Android.\n  # The 'ffiPlugin' specifies that native code should be built and bundled.\n  # This is required for using `dart:ffi`.\n  # All these are used by the tooling to maintain consistency when\n  # adding or updating assets for this project.\n  plugin:\n    platforms:\n      windows:\n        pluginClass: WindowExtPluginCApi\n      macos:\n        pluginClass: WindowExtPlugin\n\n  # To add assets to your plugin package, add an assets section, like this:\n  # assets:\n  #   - images/a_dot_burr.jpeg\n  #   - images/a_dot_ham.jpeg\n  #\n  # For details regarding assets in packages, see\n  # https://flutter.dev/assets-and-images/#from-packages\n  #\n  # An image asset can refer to one or more resolution-specific \"variants\", see\n  # https://flutter.dev/assets-and-images/#resolution-aware\n\n  # To add custom fonts to your plugin package, add a fonts section here,\n  # in this \"flutter\" section. Each entry in this list should have a\n  # \"family\" key with the font family name, and a \"fonts\" key with a\n  # list giving the asset and other descriptors for the font. For\n  # example:\n  # fonts:\n  #   - family: Schyler\n  #     fonts:\n  #       - asset: fonts/Schyler-Regular.ttf\n  #       - asset: fonts/Schyler-Italic.ttf\n  #         style: italic\n  #   - family: Trajan Pro\n  #     fonts:\n  #       - asset: fonts/TrajanPro.ttf\n  #       - asset: fonts/TrajanPro_Bold.ttf\n  #         weight: 700\n  #\n  # For details regarding fonts in packages, see\n  # https://flutter.dev/custom-fonts/#from-packages\n"
  },
  {
    "path": "plugins/window_ext/windows/.gitignore",
    "content": "flutter/\n\n# Visual Studio user-specific files.\n*.suo\n*.user\n*.userosscache\n*.sln.docstates\n\n# Visual Studio build-related files.\nx64/\nx86/\n\n# Visual Studio cache files\n# files ending in .cache can be ignored\n*.[Cc]ache\n# but keep track of directories ending in .cache\n!*.[Cc]ache/\n"
  },
  {
    "path": "plugins/window_ext/windows/CMakeLists.txt",
    "content": "# The Flutter tooling requires that developers have a version of Visual Studio\n# installed that includes CMake 3.14 or later. You should not increase this\n# version, as doing so will cause the plugin to fail to compile for some\n# customers of the plugin.\ncmake_minimum_required(VERSION 3.14)\n\n# Project-level configuration.\nset(PROJECT_NAME \"window_ext\")\nproject(${PROJECT_NAME} LANGUAGES CXX)\n\n# Explicitly opt in to modern CMake behaviors to avoid warnings with recent\n# versions of CMake.\ncmake_policy(VERSION 3.14...3.25)\n\n# This value is used when generating builds using this plugin, so it must\n# not be changed\nset(PLUGIN_NAME \"window_ext_plugin\")\n\n# Any new source files that you add to the plugin should be added here.\nlist(APPEND PLUGIN_SOURCES\n  \"window_ext_plugin.cpp\"\n  \"window_ext_plugin.h\"\n)\n\n# Define the plugin library target. Its name must not be changed (see comment\n# on PLUGIN_NAME above).\nadd_library(${PLUGIN_NAME} SHARED\n  \"include/window_ext/window_ext_plugin_c_api.h\"\n  \"window_ext_plugin_c_api.cpp\"\n  ${PLUGIN_SOURCES}\n)\n\n# Apply a standard set of build settings that are configured in the\n# application-level CMakeLists.txt. This can be removed for plugins that want\n# full control over build settings.\napply_standard_settings(${PLUGIN_NAME})\n\n# Symbols are hidden by default to reduce the chance of accidental conflicts\n# between plugins. This should not be removed; any symbols that should be\n# exported should be explicitly exported with the FLUTTER_PLUGIN_EXPORT macro.\nset_target_properties(${PLUGIN_NAME} PROPERTIES\n  CXX_VISIBILITY_PRESET hidden)\ntarget_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL)\n\n# Source include directories and library dependencies. Add any plugin-specific\n# dependencies here.\ntarget_include_directories(${PLUGIN_NAME} INTERFACE\n  \"${CMAKE_CURRENT_SOURCE_DIR}/include\")\ntarget_link_libraries(${PLUGIN_NAME} PRIVATE flutter flutter_wrapper_plugin)\n\n# List of absolute paths to libraries that should be bundled with the plugin.\n# This list could contain prebuilt libraries, or libraries created by an\n# external build triggered from this build file.\nset(window_ext_bundled_libraries\n  \"\"\n  PARENT_SCOPE\n)\n\n# === Tests ===\n# These unit tests can be run from a terminal after building the example, or\n# from Visual Studio after opening the generated solution file.\n\n# Only enable test builds when building the example (which sets this variable)\n# so that plugin clients aren't building the tests.\nif (${include_${PROJECT_NAME}_tests})\nset(TEST_RUNNER \"${PROJECT_NAME}_test\")\nenable_testing()\n\n# Add the Google Test dependency.\ninclude(FetchContent)\nFetchContent_Declare(\n  googletest\n  URL https://github.com/google/googletest/archive/release-1.11.0.zip\n)\n# Prevent overriding the parent project's compiler/linker settings\nset(gtest_force_shared_crt ON CACHE BOOL \"\" FORCE)\n# Disable install commands for gtest so it doesn't end up in the bundle.\nset(INSTALL_GTEST OFF CACHE BOOL \"Disable installation of googletest\" FORCE)\nFetchContent_MakeAvailable(googletest)\n\n# The plugin's C API is not very useful for unit testing, so build the sources\n# directly into the test binary rather than using the DLL.\nadd_executable(${TEST_RUNNER}\n  test/window_ext_plugin_test.cpp\n  ${PLUGIN_SOURCES}\n)\napply_standard_settings(${TEST_RUNNER})\ntarget_include_directories(${TEST_RUNNER} PRIVATE \"${CMAKE_CURRENT_SOURCE_DIR}\")\ntarget_link_libraries(${TEST_RUNNER} PRIVATE flutter_wrapper_plugin)\ntarget_link_libraries(${TEST_RUNNER} PRIVATE gtest_main gmock)\n# flutter_wrapper_plugin has link dependencies on the Flutter DLL.\nadd_custom_command(TARGET ${TEST_RUNNER} POST_BUILD\n  COMMAND ${CMAKE_COMMAND} -E copy_if_different\n  \"${FLUTTER_LIBRARY}\" $<TARGET_FILE_DIR:${TEST_RUNNER}>\n)\n\n# Enable automatic test discovery.\ninclude(GoogleTest)\ngtest_discover_tests(${TEST_RUNNER})\nendif()\n"
  },
  {
    "path": "plugins/window_ext/windows/include/window_ext/window_ext_plugin_c_api.h",
    "content": "#ifndef FLUTTER_PLUGIN_WINDOW_EXT_PLUGIN_C_API_H_\n#define FLUTTER_PLUGIN_WINDOW_EXT_PLUGIN_C_API_H_\n\n#include <flutter_plugin_registrar.h>\n\n#ifdef FLUTTER_PLUGIN_IMPL\n#define FLUTTER_PLUGIN_EXPORT __declspec(dllexport)\n#else\n#define FLUTTER_PLUGIN_EXPORT __declspec(dllimport)\n#endif\n\n#if defined(__cplusplus)\nextern \"C\" {\n#endif\n\nFLUTTER_PLUGIN_EXPORT void WindowExtPluginCApiRegisterWithRegistrar(\n    FlutterDesktopPluginRegistrarRef registrar);\n\n#if defined(__cplusplus)\n}  // extern \"C\"\n#endif\n\n#endif  // FLUTTER_PLUGIN_WINDOW_EXT_PLUGIN_C_API_H_\n"
  },
  {
    "path": "plugins/window_ext/windows/test/window_ext_plugin_test.cpp",
    "content": "#include <flutter/method_call.h>\n#include <flutter/method_result_functions.h>\n#include <flutter/standard_method_codec.h>\n#include <gtest/gtest.h>\n#include <windows.h>\n\n#include <memory>\n#include <string>\n#include <variant>\n\n#include \"window_ext_plugin.h\"\n\nnamespace window_ext {\nnamespace test {\n\nnamespace {\n\nusing flutter::EncodableMap;\nusing flutter::EncodableValue;\nusing flutter::MethodCall;\nusing flutter::MethodResultFunctions;\n\n}  // namespace\n\nTEST(WindowExtPlugin, GetPlatformVersion) {\n  WindowExtPlugin plugin;\n  // Save the reply value from the success callback.\n  std::string result_string;\n  plugin.HandleMethodCall(\n      MethodCall(\"getPlatformVersion\", std::make_unique<EncodableValue>()),\n      std::make_unique<MethodResultFunctions<>>(\n          [&result_string](const EncodableValue* result) {\n            result_string = std::get<std::string>(*result);\n          },\n          nullptr, nullptr));\n\n  // Since the exact string varies by host, just ensure that it's a string\n  // with the expected format.\n  EXPECT_TRUE(result_string.rfind(\"Windows \", 0) == 0);\n}\n\n}  // namespace test\n}  // namespace window_ext\n"
  },
  {
    "path": "plugins/window_ext/windows/window_ext_plugin.cpp",
    "content": "#include \"window_ext_plugin.h\"\n\n// This must be included before many other Windows headers.\n#include <windows.h>\n\n// For getPlatformVersion; remove unless needed for your plugin implementation.\n#include <VersionHelpers.h>\n\n#include <flutter/method_channel.h>\n#include <flutter/plugin_registrar_windows.h>\n#include <flutter/standard_method_codec.h>\n\n#include <memory>\n#include <sstream>\n\nnamespace window_ext {\n\n\nstd::unique_ptr<\n    flutter::MethodChannel<flutter::EncodableValue>,\n    std::default_delete<flutter::MethodChannel<flutter::EncodableValue>>>\n    channel = nullptr;\n\n\n// static\nvoid WindowExtPlugin::RegisterWithRegistrar(\n    flutter::PluginRegistrarWindows *registrar) {\n  channel =\n      std::make_unique<flutter::MethodChannel<flutter::EncodableValue>>(\n          registrar->messenger(), \"window_ext\",\n          &flutter::StandardMethodCodec::GetInstance());\n\n  auto plugin = std::make_unique<WindowExtPlugin>(registrar);\n\n  channel->SetMethodCallHandler(\n      [plugin_pointer = plugin.get()](const auto &call, auto result) {\n        plugin_pointer->HandleMethodCall(call, std::move(result));\n      });\n\n  registrar->AddPlugin(std::move(plugin));\n}\n\nWindowExtPlugin::WindowExtPlugin(flutter::PluginRegistrarWindows* registrar)\n    : registrar(registrar) {\n  WM_TASKBARCREATED = RegisterWindowMessage(TEXT(\"TaskbarCreated\"));\n  window_proc_id = registrar->RegisterTopLevelWindowProcDelegate(\n      [this](HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) {\n        return HandleWindowProc(hwnd, message, wparam, lparam);\n      });\n}\n\nWindowExtPlugin::~WindowExtPlugin() {\n  registrar->UnregisterTopLevelWindowProcDelegate(window_proc_id);\n}\n\nstd::optional<LRESULT> WindowExtPlugin::HandleWindowProc(HWND hWnd,\n                                                           UINT message,\n                                                           WPARAM wParam,\n                                                           LPARAM lParam) {\n  std::optional<LRESULT> result;\n  if(message == WM_TASKBARCREATED){\n    channel -> InvokeMethod(\"taskbarCreated\", std::make_unique<flutter::EncodableValue>());\n  }\n  return result;\n}\n\n\n\nvoid WindowExtPlugin::HandleMethodCall(\n    const flutter::MethodCall<flutter::EncodableValue> &method_call,\n    std::unique_ptr<flutter::MethodResult<flutter::EncodableValue>> result) {\n  if (method_call.method_name().compare(\"getPlatformVersion\") == 0) {\n    std::ostringstream version_stream;\n    version_stream << \"Windows \";\n    if (IsWindows10OrGreater()) {\n      version_stream << \"10+\";\n    } else if (IsWindows8OrGreater()) {\n      version_stream << \"8\";\n    } else if (IsWindows7OrGreater()) {\n      version_stream << \"7\";\n    }\n    result->Success(flutter::EncodableValue(version_stream.str()));\n  } else {\n    result->NotImplemented();\n  }\n}\n\n}  // namespace window_ext\n"
  },
  {
    "path": "plugins/window_ext/windows/window_ext_plugin.h",
    "content": "#ifndef FLUTTER_PLUGIN_WINDOW_EXT_PLUGIN_H_\n#define FLUTTER_PLUGIN_WINDOW_EXT_PLUGIN_H_\n\n#include <flutter/method_channel.h>\n#include <flutter/plugin_registrar_windows.h>\n\n#include <memory>\n\nnamespace window_ext {\n\nclass WindowExtPlugin : public flutter::Plugin {\n public:\n  static void RegisterWithRegistrar(flutter::PluginRegistrarWindows *registrar);\n\n\n  WindowExtPlugin(flutter::PluginRegistrarWindows *registrar);\n  virtual ~WindowExtPlugin();\n\n  // Disallow copy and assign.\n  WindowExtPlugin(const WindowExtPlugin&) = delete;\n  WindowExtPlugin& operator=(const WindowExtPlugin&) = delete;\n\n  // Called when a method is called on this plugin's channel from Dart.\n  void HandleMethodCall(\n      const flutter::MethodCall<flutter::EncodableValue> &method_call,\n      std::unique_ptr<flutter::MethodResult<flutter::EncodableValue>> result);\n\n  std::optional<LRESULT> HandleWindowProc(\n              HWND hwnd,\n              UINT message,\n              WPARAM wparam,\n              LPARAM lparam);\n\n  int window_proc_id = -1;\n  UINT WM_TASKBARCREATED = 0;\n  flutter::PluginRegistrarWindows *registrar;\n};\n\n}  // namespace window_ext\n\n#endif  // FLUTTER_PLUGIN_WINDOW_EXT_PLUGIN_H_\n"
  },
  {
    "path": "plugins/window_ext/windows/window_ext_plugin_c_api.cpp",
    "content": "#include \"include/window_ext/window_ext_plugin_c_api.h\"\n\n#include <flutter/plugin_registrar_windows.h>\n\n#include \"window_ext_plugin.h\"\n\nvoid WindowExtPluginCApiRegisterWithRegistrar(\n    FlutterDesktopPluginRegistrarRef registrar) {\n  window_ext::WindowExtPlugin::RegisterWithRegistrar(\n      flutter::PluginRegistrarManager::GetInstance()\n          ->GetRegistrar<flutter::PluginRegistrarWindows>(registrar));\n}\n"
  },
  {
    "path": "pubspec.yaml",
    "content": "name: fl_clash\ndescription: A multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free.\npublish_to: 'none'\nversion: 0.8.92+2026020201\nenvironment:\n  sdk: '>=3.8.0 <4.0.0'\n\ndependencies:\n  flutter:\n    sdk: flutter\n  flutter_localizations:\n    sdk: flutter\n  intl: any\n  path_provider: ^2.1.5\n  path: ^1.9.0\n  shared_preferences: ^2.5.3\n  window_manager: ^0.5.1\n  dynamic_color: ^1.8.1\n  proxy:\n    path: plugins/proxy\n  window_ext:\n    path: plugins/window_ext\n  launch_at_startup: ^0.5.1\n  json_annotation: ^4.9.0\n  file_picker: ^10.3.3\n  mobile_scanner: ^7.0.1\n  app_links: ^6.4.0\n  win32_registry: ^2.0.0\n  tray_manager:\n    path: plugins/tray_manager/packages/tray_manager\n  collection: ^1.19.1\n  animations: ^2.1.1\n  package_info_plus: ^9.0.0\n  url_launcher: ^6.3.2\n  freezed_annotation: ^3.1.0\n  image_picker: ^1.2.0\n  ffi: ^2.1.4\n  webdav_client: ^1.2.2\n  dio: ^5.8.0+1\n  win32: ^5.5.1\n  re_editor: ^0.8.0\n  re_highlight: ^0.0.3\n  archive: ^4.0.7\n  emoji_regex: ^0.0.5\n  hotkey_manager: ^0.2.3\n  uni_platform: ^0.1.3\n  device_info_plus: ^12.2.0\n  connectivity_plus: ^7.0.0\n  screen_retriever: ^0.2.0\n  defer_pointer: ^0.0.2\n  flutter_riverpod: ^3.0.0\n  riverpod_annotation: ^3.0.0\n  riverpod: ^3.0.0\n  material_color_utilities: ^0.11.1\n  flutter_js:\n    git:\n      url: https://github.com/chen08209/flutter_js\n      ref: master\n  flutter_svg: ^2.1.0\n  flutter_cache_manager: ^3.4.1\n  crypto: ^3.0.3\n  yaml: ^3.1.3\n  yaml_writer:\n    git:\n      url: https://github.com/chen08209/yaml_writer\n      ref: master\n  super_sliver_list: ^0.4.1\n\n  drift: ^2.29.0\n  drift_flutter: ^0.2.7\n  fractional_indexing: ^1.0.0\ndev_dependencies:\n  flutter_test:\n    sdk: flutter\n  flutter_lints: ^6.0.0\n  json_serializable: ^6.7.1\n  build_runner: ^2.7.1\n  args: ^2.4.2\n  freezed: ^3.2.0\n  riverpod_generator: ^3.0.0\n  riverpod_lint: ^3.0.0\n\n  drift_dev: ^2.29.0\n\nflutter:\n  uses-material-design: true\n  assets:\n    - assets/data/\n    - assets/fonts/\n    - assets/images/\n    - assets/images/avatar/\n    - assets/images/empty/\n    - assets/images/icon/\n  fonts:\n    - family: JetBrainsMono\n      fonts:\n        - asset: assets/fonts/JetBrainsMono-Regular.ttf\n    - family: Twemoji\n      fonts:\n        - asset: assets/fonts/Twemoji.Mozilla.ttf\n    - family: Icons\n      fonts:\n        - asset: assets/fonts/Icons.ttf\nflutter_intl:\n  enabled: true\n  class_name: AppLocalizations\n  arb_dir: arb\n  output_dir: lib/l10n"
  },
  {
    "path": "release_telegram.py",
    "content": "import os\nimport json\nimport requests\n\nTELEGRAM_BOT_TOKEN = os.getenv(\"TELEGRAM_BOT_TOKEN\")\nTAG = os.getenv(\"TAG\")\nRUN_ID = os.getenv(\"RUN_ID\")\n\nIS_STABLE = \"-\" not in TAG\n\nCHAT_ID = \"@FlClash\"\nAPI_URL = f\"http://localhost:8081/bot{TELEGRAM_BOT_TOKEN}/sendMediaGroup\"\n\nDIST_DIR = os.path.join(os.getcwd(), \"dist\")\nrelease = os.path.join(os.getcwd(), \"release.md\")\n\ntext = \"\"\n\nmedia = []\nfiles = {}\n\ni = 1\n\nreleaseKeywords = [\n    \"windows-amd64-setup\",\n    \"android-arm64\",\n    \"macos-arm64\",\n    \"macos-amd64\"\n]\n\nfor file in os.listdir(DIST_DIR):\n    file_path = os.path.join(DIST_DIR, file)\n    if os.path.isfile(file_path):\n        file_lower = file.lower()\n        if any(kw in file_lower for kw in releaseKeywords):\n            file_key = f\"file{i}\"\n            media.append({\n                \"type\": \"document\",\n                \"media\": f\"attach://{file_key}\"\n            })\n            files[file_key] = open(file_path, 'rb')\n            i += 1\n\nif TAG:\n    text += f\"\\n**{TAG}**\\n\"\n\nif IS_STABLE:\n    text += f\"\\nhttps://github.com/chen08209/FlClash/releases/tag/{TAG}\\n\"\nelse:\n    text += f\"\\nhttps://github.com/chen08209/FlClash/actions/runs/{RUN_ID}\\n\"\n\nif os.path.exists(release):\n    text += \"\\n\"\n    with open(release, 'r') as f:\n        text += f.read()\n    text += \"\\n\"\n\nif media:\n    media[-1][\"caption\"] = text\n    media[-1][\"parse_mode\"] = \"Markdown\"\n\nresponse = requests.post(\n    API_URL,\n    data={\n        \"chat_id\": CHAT_ID,\n        \"media\": json.dumps(media)\n    },\n    files=files\n)\n\nprint(\"Response JSON:\", response.json())\n"
  },
  {
    "path": "services/helper/Cargo.toml",
    "content": "[package]\nname = \"helper\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[[bin]]\nname = \"helper\"\npath = \"src/main.rs\"\n\n[dependencies]\nwindows-service = { version = \"0.7.0\", optional = true }\ntokio = { version = \"1\", features = [\"full\"] }\nanyhow = \"1.0.93\"\nwarp = \"0.3.7\"\nserde = { version = \"1.0.215\", features = [\"derive\"] }\nonce_cell = \"1.20.2\"\nsha2 = \"0.10.8\"\n\n\n[profile.release]\npanic = \"abort\"\ncodegen-units = 1\nlto = true\nopt-level = \"s\"\n"
  },
  {
    "path": "services/helper/build.rs",
    "content": "fn main() {\n    let version = std::env::var(\"TOKEN\").unwrap_or_default();\n    println!(\"cargo:rustc-env=TOKEN={}\", version);\n    println!(\"cargo:rerun-if-env-changed=TOKEN\");\n}\n"
  },
  {
    "path": "services/helper/src/main.rs",
    "content": "#[cfg(not(all(feature = \"windows-service\", target_os = \"windows\")))]\nuse tokio::runtime::Runtime;\n#[cfg(not(all(feature = \"windows-service\", target_os = \"windows\")))]\nuse crate::service::hub::run_service;\n\nmod service;\n\n#[cfg(all(feature = \"windows-service\", target_os = \"windows\"))]\npub fn main() -> windows_service::Result<()> {\n    service::windows::main()\n}\n\n#[cfg(not(all(feature = \"windows-service\", target_os = \"windows\")))]\nfn main() {\n    if let Ok(rt) = Runtime::new() {\n        rt.block_on(async {\n            let _ = run_service().await;\n        });\n    }\n}\n"
  },
  {
    "path": "services/helper/src/service/hub.rs",
    "content": "use once_cell::sync::Lazy;\nuse serde::{Deserialize, Serialize};\nuse sha2::{Digest, Sha256};\nuse std::collections::VecDeque;\nuse std::fs::File;\nuse std::io::{BufRead, Error, Read};\nuse std::process::{Command, Stdio};\nuse std::sync::{Arc, Mutex};\nuse std::{io, thread};\nuse warp::{Filter, Reply};\n\nconst LISTEN_PORT: u16 = 47890;\n\n#[derive(Debug, Deserialize, Serialize, Clone)]\npub struct StartParams {\n    pub path: String,\n    pub arg: String,\n}\n\nfn sha256_file(path: &str) -> Result<String, Error> {\n    let mut file = File::open(path)?;\n    let mut hasher = Sha256::new();\n    let mut buffer = [0; 4096];\n\n    loop {\n        let bytes_read = file.read(&mut buffer)?;\n        if bytes_read == 0 {\n            break;\n        }\n        hasher.update(&buffer[..bytes_read]);\n    }\n\n    Ok(format!(\"{:x}\", hasher.finalize()))\n}\n\nstatic LOGS: Lazy<Arc<Mutex<VecDeque<String>>>> =\n    Lazy::new(|| Arc::new(Mutex::new(VecDeque::with_capacity(100))));\nstatic PROCESS: Lazy<Arc<Mutex<Option<std::process::Child>>>> =\n    Lazy::new(|| Arc::new(Mutex::new(None)));\n\nfn start(start_params: StartParams) -> impl Reply {\n    let sha256 = sha256_file(start_params.path.as_str()).unwrap_or(\"\".to_string());\n    if sha256 != env!(\"TOKEN\") {\n        return format!(\"The SHA256 hash of the program requesting execution is: {}. The helper program only allows execution of applications with the SHA256 hash: {}.\", sha256,  env!(\"TOKEN\"),);\n    }\n    stop();\n    let mut process = PROCESS.lock().unwrap();\n    match Command::new(&start_params.path)\n        .stderr(Stdio::piped())\n        .arg(&start_params.arg)\n        .spawn()\n    {\n        Ok(child) => {\n            *process = Some(child);\n            if let Some(ref mut child) = *process {\n                let stderr = child.stderr.take().unwrap();\n                let reader = io::BufReader::new(stderr);\n                thread::spawn(move || {\n                    for line in reader.lines() {\n                        match line {\n                            Ok(output) => {\n                                log_message(output);\n                            }\n                            Err(_) => {\n                                break;\n                            }\n                        }\n                    }\n                });\n            }\n            \"\".to_string()\n        }\n        Err(e) => {\n            log_message(e.to_string());\n            e.to_string()\n        }\n    }\n}\n\nfn stop() -> impl Reply {\n    let mut process = PROCESS.lock().unwrap();\n    if let Some(mut child) = process.take() {\n        let _ = child.kill();\n        let _ = child.wait();\n    }\n    *process = None;\n    \"\".to_string()\n}\n\nfn log_message(message: String) {\n    let mut log_buffer = LOGS.lock().unwrap();\n    if log_buffer.len() == 100 {\n        log_buffer.pop_front();\n    }\n    log_buffer.push_back(format!(\"{}\\n\", message));\n}\n\nfn get_logs() -> impl Reply {\n    let log_buffer = LOGS.lock().unwrap();\n    let value = log_buffer\n        .iter()\n        .cloned()\n        .collect::<Vec<String>>()\n        .join(\"\\n\");\n    warp::reply::with_header(value, \"Content-Type\", \"text/plain\")\n}\n\npub async fn run_service() -> anyhow::Result<()> {\n    let api_ping = warp::get().and(warp::path(\"ping\")).map(|| env!(\"TOKEN\"));\n\n    let api_start = warp::post()\n        .and(warp::path(\"start\"))\n        .and(warp::body::json())\n        .map(|start_params: StartParams| start(start_params));\n\n    let api_stop = warp::post().and(warp::path(\"stop\")).map(|| stop());\n\n    let api_logs = warp::get().and(warp::path(\"logs\")).map(|| get_logs());\n\n    warp::serve(api_ping.or(api_start).or(api_stop).or(api_logs))\n        .run(([127, 0, 0, 1], LISTEN_PORT))\n        .await;\n\n    Ok(())\n}\n"
  },
  {
    "path": "services/helper/src/service/mod.rs",
    "content": "pub mod hub;\n#[cfg(all(feature = \"windows-service\", target_os = \"windows\"))]\npub mod windows;\n\n\n\n\n\n"
  },
  {
    "path": "services/helper/src/service/windows.rs",
    "content": "use crate::service::hub::run_service;\n\nuse std::ffi::OsString;\n\nuse std::time::Duration;\n\nuse tokio::runtime::Runtime;\n\nuse windows_service::{\n    define_windows_service,\n    service::{\n        ServiceControl, ServiceControlAccept, ServiceExitCode, ServiceState, ServiceStatus,\n        ServiceType,\n    },\n    service_control_handler::{self, ServiceControlHandlerResult},\n    service_dispatcher, Result,\n};\n\nconst SERVICE_NAME: &str = \"FlClashHelperService\";\n\nconst SERVICE_TYPE: ServiceType = ServiceType::OWN_PROCESS;\n\npub fn main() -> Result<()> {\n    start_service()\n}\n\npub fn start_service() -> Result<()> {\n    service_dispatcher::start(SERVICE_NAME, serveice)\n}\n\ndefine_windows_service!(serveice, service_main);\n\npub fn service_main(_arguments: Vec<OsString>) {\n    if let Ok(rt) = Runtime::new() {\n        rt.block_on(async {\n            let _ = run_windows_service().await;\n        });\n    }\n}\nasync fn run_windows_service() -> anyhow::Result<()> {\n    let status_handle = service_control_handler::register(\n        SERVICE_NAME,\n        move |event| -> ServiceControlHandlerResult {\n            match event {\n                ServiceControl::Interrogate => ServiceControlHandlerResult::NoError,\n                ServiceControl::Stop => std::process::exit(0),\n                _ => ServiceControlHandlerResult::NotImplemented,\n            }\n        },\n    )?;\n\n    status_handle.set_service_status(ServiceStatus {\n        service_type: SERVICE_TYPE,\n        current_state: ServiceState::Running,\n        controls_accepted: ServiceControlAccept::STOP,\n        exit_code: ServiceExitCode::Win32(0),\n        checkpoint: 0,\n        wait_hint: Duration::default(),\n        process_id: None,\n    })?;\n\n    run_service().await\n}\n\n\n\n\n"
  },
  {
    "path": "setup.dart",
    "content": "// ignore_for_file: avoid_print\n\nimport 'dart:convert';\nimport 'dart:io';\n\nimport 'package:args/command_runner.dart';\nimport 'package:crypto/crypto.dart';\nimport 'package:path/path.dart';\n\nenum Target { windows, linux, android, macos }\n\nextension TargetExt on Target {\n  String get os {\n    if (this == Target.macos) {\n      return 'darwin';\n    }\n    return name;\n  }\n\n  bool get same {\n    if (this == Target.android) {\n      return true;\n    }\n    if (Platform.isWindows && this == Target.windows) {\n      return true;\n    }\n    if (Platform.isLinux && this == Target.linux) {\n      return true;\n    }\n    if (Platform.isMacOS && this == Target.macos) {\n      return true;\n    }\n    return false;\n  }\n\n  String get dynamicLibExtensionName {\n    final String extensionName;\n    switch (this) {\n      case Target.android || Target.linux:\n        extensionName = '.so';\n        break;\n      case Target.windows:\n        extensionName = '.dll';\n        break;\n      case Target.macos:\n        extensionName = '.dylib';\n        break;\n    }\n    return extensionName;\n  }\n\n  String get executableExtensionName {\n    final String extensionName;\n    switch (this) {\n      case Target.windows:\n        extensionName = '.exe';\n        break;\n      default:\n        extensionName = '';\n        break;\n    }\n    return extensionName;\n  }\n}\n\nenum Mode { core, lib }\n\nenum Arch { amd64, arm64, arm }\n\nclass BuildItem {\n  Target target;\n  Arch? arch;\n  String? archName;\n\n  BuildItem({required this.target, this.arch, this.archName});\n\n  @override\n  String toString() {\n    return 'BuildLibItem{target: $target, arch: $arch, archName: $archName}';\n  }\n}\n\nclass Build {\n  static List<BuildItem> get buildItems => [\n    BuildItem(target: Target.macos, arch: Arch.arm64),\n    BuildItem(target: Target.macos, arch: Arch.amd64),\n    BuildItem(target: Target.linux, arch: Arch.arm64),\n    BuildItem(target: Target.linux, arch: Arch.amd64),\n    BuildItem(target: Target.windows, arch: Arch.amd64),\n    BuildItem(target: Target.windows, arch: Arch.arm64),\n    BuildItem(target: Target.android, arch: Arch.arm, archName: 'armeabi-v7a'),\n    BuildItem(target: Target.android, arch: Arch.arm64, archName: 'arm64-v8a'),\n    BuildItem(target: Target.android, arch: Arch.amd64, archName: 'x86_64'),\n  ];\n\n  static String get appName => 'FlClash';\n\n  static String get coreName => 'FlClashCore';\n\n  static String get libName => 'libclash';\n\n  static String get outDir => join(current, libName);\n\n  static String get _coreDir => join(current, 'core');\n\n  static String get _servicesDir => join(current, 'services', 'helper');\n\n  static String get distPath => join(current, 'dist');\n\n  static String _getCc(BuildItem buildItem) {\n    final environment = Platform.environment;\n    if (buildItem.target == Target.android) {\n      final ndk = environment['ANDROID_NDK'];\n      assert(ndk != null);\n      final prebuiltDir = Directory(\n        join(ndk!, 'toolchains', 'llvm', 'prebuilt'),\n      );\n      final prebuiltDirList = prebuiltDir\n          .listSync()\n          .where((file) => !basename(file.path).startsWith('.'))\n          .toList();\n      final map = {\n        'armeabi-v7a': 'armv7a-linux-androideabi21-clang',\n        'arm64-v8a': 'aarch64-linux-android21-clang',\n        'x86': 'i686-linux-android21-clang',\n        'x86_64': 'x86_64-linux-android21-clang',\n      };\n      return join(prebuiltDirList.first.path, 'bin', map[buildItem.archName]);\n    }\n    return 'gcc';\n  }\n\n  static String get tags => 'with_gvisor';\n\n  static Future<void> exec(\n    List<String> executable, {\n    String? name,\n    Map<String, String>? environment,\n    String? workingDirectory,\n    bool runInShell = true,\n  }) async {\n    if (name != null) print('run $name');\n    print('exec: ${executable.join(' ')}');\n    print('env: ${environment.toString()}');\n    final process = await Process.start(\n      executable[0],\n      executable.sublist(1),\n      environment: environment,\n      workingDirectory: workingDirectory,\n      runInShell: runInShell,\n    );\n    process.stdout.listen((data) {\n      print(utf8.decode(data));\n    });\n    process.stderr.listen((data) {\n      print(utf8.decode(data));\n    });\n    final exitCode = await process.exitCode;\n    if (exitCode != 0 && name != null) throw '$name error';\n  }\n\n  static Future<String> calcSha256(String filePath) async {\n    final file = File(filePath);\n    if (!await file.exists()) {\n      throw 'File not exists';\n    }\n    final stream = file.openRead();\n    return sha256.convert(await stream.reduce((a, b) => a + b)).toString();\n  }\n\n  static Future<List<String>> buildCore({\n    required Mode mode,\n    required Target target,\n    Arch? arch,\n  }) async {\n    final isLib = mode == Mode.lib;\n\n    final items = buildItems.where((element) {\n      return element.target == target &&\n          (arch == null ? true : element.arch == arch);\n    }).toList();\n\n    final List<String> corePaths = [];\n\n    final targetOutFilePath = join(outDir, target.name);\n    final targetOutFile = File(targetOutFilePath);\n    if (await targetOutFile.exists()) {\n      await targetOutFile.delete(recursive: true);\n      await Directory(targetOutFilePath).create(recursive: true);\n    }\n    for (final item in items) {\n      final outFilePath = join(targetOutFilePath, item.archName);\n      final file = File(outFilePath);\n      if (file.existsSync()) {\n        file.deleteSync(recursive: true);\n      }\n\n      final fileName = isLib\n          ? '$libName${item.target.dynamicLibExtensionName}'\n          : '$coreName${item.target.executableExtensionName}';\n      final realOutPath = join(outFilePath, fileName);\n      corePaths.add(realOutPath);\n\n      final Map<String, String> env = {};\n      env['GOOS'] = item.target.os;\n      if (item.arch != null) {\n        env['GOARCH'] = item.arch!.name;\n      }\n      if (isLib) {\n        env['CGO_ENABLED'] = '1';\n        env['CC'] = _getCc(item);\n        env['CFLAGS'] = '-O3 -Werror';\n      } else {\n        env['CGO_ENABLED'] = '0';\n      }\n      final execLines = [\n        'go',\n        'build',\n        '-ldflags=-w -s',\n        '-tags=$tags',\n        if (isLib) '-buildmode=c-shared',\n        '-o',\n        realOutPath,\n      ];\n      await exec(\n        execLines,\n        name: 'build core',\n        environment: env,\n        workingDirectory: _coreDir,\n      );\n      if (isLib && item.archName != null) {\n        await adjustLibOut(\n          targetOutFilePath: targetOutFilePath,\n          outFilePath: outFilePath,\n          archName: item.archName!,\n        );\n      }\n    }\n\n    return corePaths;\n  }\n\n  static Future<void> adjustLibOut({\n    required String targetOutFilePath,\n    required String outFilePath,\n    required String archName,\n  }) async {\n    final includesPath = join(targetOutFilePath, 'includes');\n    final realOutPath = join(includesPath, archName);\n    await Directory(realOutPath).create(recursive: true);\n    final targetOutFiles = Directory(outFilePath).listSync();\n    final coreFiles = Directory(_coreDir).listSync();\n    for (final file in [...targetOutFiles, ...coreFiles]) {\n      if (!file.path.endsWith('.h')) {\n        continue;\n      }\n      final targetFilePath = join(realOutPath, basename(file.path));\n      final realFile = File(file.path);\n      await realFile.copy(targetFilePath);\n      if (coreFiles.contains(file)) {\n        continue;\n      }\n      await realFile.delete();\n    }\n  }\n\n  static Future<void> buildHelper(Target target, String token) async {\n    await exec(\n      ['cargo', 'build', '--release', '--features', 'windows-service'],\n      environment: {'TOKEN': token},\n      name: 'build helper',\n      workingDirectory: _servicesDir,\n    );\n    final outPath = join(\n      _servicesDir,\n      'target',\n      'release',\n      'helper${target.executableExtensionName}',\n    );\n    final targetPath = join(\n      outDir,\n      target.name,\n      'FlClashHelperService${target.executableExtensionName}',\n    );\n    await File(outPath).copy(targetPath);\n  }\n\n  static List<String> getExecutable(String command) {\n    return command.split(' ');\n  }\n\n  static Future<void> getDistributor() async {\n    final distributorDir = join(\n      current,\n      'plugins',\n      'flutter_distributor',\n      'packages',\n      'flutter_distributor',\n    );\n\n    await exec(\n      name: 'clean distributor',\n      Build.getExecutable('flutter clean'),\n      workingDirectory: distributorDir,\n    );\n    await exec(\n      name: 'upgrade distributor',\n      Build.getExecutable('flutter pub upgrade'),\n      workingDirectory: distributorDir,\n    );\n    await exec(\n      name: 'get distributor',\n      Build.getExecutable('dart pub global activate -s path $distributorDir'),\n    );\n  }\n\n  static void copyFile(String sourceFilePath, String destinationFilePath) {\n    final sourceFile = File(sourceFilePath);\n    if (!sourceFile.existsSync()) {\n      throw 'SourceFilePath not exists';\n    }\n    final destinationFile = File(destinationFilePath);\n    final destinationDirectory = destinationFile.parent;\n    if (!destinationDirectory.existsSync()) {\n      destinationDirectory.createSync(recursive: true);\n    }\n    try {\n      sourceFile.copySync(destinationFilePath);\n      print('File copied successfully!');\n    } catch (e) {\n      print('Failed to copy file: $e');\n    }\n  }\n}\n\nclass BuildCommand extends Command {\n  Target target;\n\n  BuildCommand({required this.target}) {\n    if (target == Target.android || target == Target.linux) {\n      argParser.addOption(\n        'arch',\n        valueHelp: arches.map((e) => e.name).join(','),\n        help: 'The $name build desc',\n      );\n    } else {\n      argParser.addOption('arch', help: 'The $name build archName');\n    }\n    argParser.addOption(\n      'out',\n      valueHelp: [if (target.same) 'app', 'core'].join(','),\n      help: 'The $name build arch',\n    );\n    argParser.addOption(\n      'env',\n      valueHelp: ['pre', 'stable'].join(','),\n      help: 'The $name build env',\n    );\n  }\n\n  @override\n  String get description => 'build $name application';\n\n  @override\n  String get name => target.name;\n\n  List<Arch> get arches => Build.buildItems\n      .where((element) => element.target == target && element.arch != null)\n      .map((e) => e.arch!)\n      .toList();\n\n  Future<void> _buildEnvFile(String env, {String? coreSha256}) async {\n    final data = {\n      'APP_ENV': env,\n      if (coreSha256 != null) 'CORE_SHA256': coreSha256,\n    };\n    final envFile = File(join(current, 'env.json'))..create();\n    await envFile.writeAsString(json.encode(data));\n  }\n\n  Future<void> _getLinuxDependencies(Arch arch) async {\n    await Build.exec(Build.getExecutable('sudo apt update -y'));\n    await Build.exec(\n      Build.getExecutable('sudo apt install -y ninja-build libgtk-3-dev'),\n    );\n    await Build.exec(\n      Build.getExecutable('sudo apt install -y libayatana-appindicator3-dev'),\n    );\n    await Build.exec(\n      Build.getExecutable('sudo apt-get install -y libkeybinder-3.0-dev'),\n    );\n    await Build.exec(Build.getExecutable('sudo apt install -y locate'));\n    if (arch == Arch.amd64) {\n      await Build.exec(Build.getExecutable('sudo apt install -y rpm patchelf'));\n      await Build.exec(Build.getExecutable('sudo apt install -y libfuse2'));\n\n      final downloadName = arch == Arch.amd64 ? 'x86_64' : 'aarch64';\n      await Build.exec(\n        Build.getExecutable(\n          'wget -O appimagetool https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-$downloadName.AppImage',\n        ),\n      );\n      await Build.exec(Build.getExecutable('chmod +x appimagetool'));\n      await Build.exec(\n        Build.getExecutable('sudo mv appimagetool /usr/local/bin/'),\n      );\n    }\n  }\n\n  Future<void> _getMacosDependencies() async {\n    await Build.exec(Build.getExecutable('npm install -g appdmg'));\n  }\n\n  Future<void> _buildDistributor({\n    required Target target,\n    required String targets,\n    String args = '',\n    required String env,\n  }) async {\n    await Build.getDistributor();\n    await Build.exec(\n      name: name,\n      Build.getExecutable(\n        'flutter_distributor package --skip-clean --platform ${target.name} --targets $targets --flutter-build-args=verbose,dart-define-from-file=env.json$args',\n      ),\n    );\n  }\n\n  Future<String?> get systemArch async {\n    if (Platform.isWindows) {\n      return Platform.environment['PROCESSOR_ARCHITECTURE'];\n    } else if (Platform.isLinux || Platform.isMacOS) {\n      final result = await Process.run('uname', ['-m']);\n      return result.stdout.toString().trim();\n    }\n    return null;\n  }\n\n  @override\n  Future<void> run() async {\n    final mode = target == Target.android ? Mode.lib : Mode.core;\n    final String out = argResults?['out'] ?? (target.same ? 'app' : 'core');\n    final archName = argResults?['arch'];\n    final env = argResults?['env'] ?? 'pre';\n    final currentArches = arches\n        .where((element) => element.name == archName)\n        .toList();\n    final arch = currentArches.isEmpty ? null : currentArches.first;\n\n    if (arch == null && target != Target.android) {\n      throw 'Invalid arch parameter';\n    }\n\n    final corePaths = await Build.buildCore(\n      target: target,\n      arch: arch,\n      mode: mode,\n    );\n\n    String? coreSha256;\n\n    if (Platform.isWindows) {\n      coreSha256 = await Build.calcSha256(corePaths.first);\n      await Build.buildHelper(target, coreSha256);\n    }\n    await _buildEnvFile(env, coreSha256: coreSha256);\n    if (out != 'app') {\n      return;\n    }\n\n    switch (target) {\n      case Target.windows:\n        _buildDistributor(\n          target: target,\n          targets: 'exe,zip',\n          args: ' --description $archName',\n          env: env,\n        );\n        return;\n      case Target.linux:\n        final targetMap = {Arch.arm64: 'linux-arm64', Arch.amd64: 'linux-x64'};\n        final targets = [\n          'deb',\n          if (arch == Arch.amd64) 'appimage',\n          if (arch == Arch.amd64) 'rpm',\n        ].join(',');\n        final defaultTarget = targetMap[arch];\n        await _getLinuxDependencies(arch!);\n        _buildDistributor(\n          target: target,\n          targets: targets,\n          args:\n              ' --description $archName --build-target-platform $defaultTarget',\n          env: env,\n        );\n        return;\n      case Target.android:\n        final targetMap = {\n          Arch.arm: 'android-arm',\n          Arch.arm64: 'android-arm64',\n          Arch.amd64: 'android-x64',\n        };\n        final defaultArches = [Arch.arm, Arch.arm64, Arch.amd64];\n        final defaultTargets = defaultArches\n            .where((element) => arch == null ? true : element == arch)\n            .map((e) => targetMap[e])\n            .toList();\n        _buildDistributor(\n          target: target,\n          targets: 'apk',\n          args:\n              \",split-per-abi --build-target-platform ${defaultTargets.join(\",\")}\",\n          env: env,\n        );\n        return;\n      case Target.macos:\n        await _getMacosDependencies();\n        _buildDistributor(\n          target: target,\n          targets: 'dmg',\n          args: ' --description $archName',\n          env: env,\n        );\n        return;\n    }\n  }\n}\n\nFuture<void> main(Iterable<String> args) async {\n  final runner = CommandRunner('setup', 'build Application');\n  runner.addCommand(BuildCommand(target: Target.android));\n  runner.addCommand(BuildCommand(target: Target.linux));\n  runner.addCommand(BuildCommand(target: Target.windows));\n  runner.addCommand(BuildCommand(target: Target.macos));\n  runner.run(args);\n}\n"
  },
  {
    "path": "windows/.gitignore",
    "content": "flutter/ephemeral/\n\n# Visual Studio user-specific files.\n*.suo\n*.user\n*.userosscache\n*.sln.docstates\n\n# Visual Studio build-related files.\nx64/\nx86/\n\n# Visual Studio cache files\n# files ending in .cache can be ignored\n*.[Cc]ache\n# but keep track of directories ending in .cache\n!*.[Cc]ache/\n"
  },
  {
    "path": "windows/CMakeLists.txt",
    "content": "# Project-level configuration.\ncmake_minimum_required(VERSION 3.14)\nproject(FlClash LANGUAGES CXX)\n\n# The name of the executable created for the application. Change this to change\n# the on-disk name of your application.\nset(BINARY_NAME \"FlClash\")\n\n# Explicitly opt in to modern CMake behaviors to avoid warnings with recent\n# versions of CMake.\ncmake_policy(VERSION 3.14...3.25)\n\n# Define build configuration option.\nget_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)\nif(IS_MULTICONFIG)\n  set(CMAKE_CONFIGURATION_TYPES \"Debug;Profile;Release\"\n    CACHE STRING \"\" FORCE)\nelse()\n  if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)\n    set(CMAKE_BUILD_TYPE \"Debug\" CACHE\n      STRING \"Flutter build mode\" FORCE)\n    set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS\n      \"Debug\" \"Profile\" \"Release\")\n  endif()\nendif()\n# Define settings for the Profile build mode.\nset(CMAKE_EXE_LINKER_FLAGS_PROFILE \"${CMAKE_EXE_LINKER_FLAGS_RELEASE}\")\nset(CMAKE_SHARED_LINKER_FLAGS_PROFILE \"${CMAKE_SHARED_LINKER_FLAGS_RELEASE}\")\nset(CMAKE_C_FLAGS_PROFILE \"${CMAKE_C_FLAGS_RELEASE}\")\nset(CMAKE_CXX_FLAGS_PROFILE \"${CMAKE_CXX_FLAGS_RELEASE}\")\n\n# Use Unicode for all projects.\nadd_definitions(-DUNICODE -D_UNICODE)\n\n# Compilation settings that should be applied to most targets.\n#\n# Be cautious about adding new options here, as plugins use this function by\n# default. In most cases, you should add new options to specific targets instead\n# of modifying this function.\nfunction(APPLY_STANDARD_SETTINGS TARGET)\n  target_compile_features(${TARGET} PUBLIC cxx_std_17)\n  target_compile_options(${TARGET} PRIVATE /W4 /WX /wd\"4100\")\n  target_compile_options(${TARGET} PRIVATE /EHsc)\n  target_compile_definitions(${TARGET} PRIVATE \"_HAS_EXCEPTIONS=0\")\n  target_compile_definitions(${TARGET} PRIVATE \"$<$<CONFIG:Debug>:_DEBUG>\")\nendfunction()\n\n# Flutter library and tool build rules.\nset(FLUTTER_MANAGED_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/flutter\")\nadd_subdirectory(${FLUTTER_MANAGED_DIR})\n\n# Application build; see runner/CMakeLists.txt.\nadd_subdirectory(\"runner\")\n\n\n# Generated plugin build rules, which manage building the plugins and adding\n# them to the application.\ninclude(flutter/generated_plugins.cmake)\n\n\n# === Installation ===\n# Support files are copied into place next to the executable, so that it can\n# run in place. This is done instead of making a separate bundle (as on Linux)\n# so that building and running from within Visual Studio will work.\nset(BUILD_BUNDLE_DIR \"$<TARGET_FILE_DIR:${BINARY_NAME}>\")\n# Make the \"install\" step default, as it's required to run.\nset(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)\nif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)\n  set(CMAKE_INSTALL_PREFIX \"${BUILD_BUNDLE_DIR}\" CACHE PATH \"...\" FORCE)\nendif()\n\nset(INSTALL_BUNDLE_DATA_DIR \"${CMAKE_INSTALL_PREFIX}/data\")\nset(INSTALL_BUNDLE_LIB_DIR \"${CMAKE_INSTALL_PREFIX}\")\n\ninstall(TARGETS ${BINARY_NAME} RUNTIME DESTINATION \"${CMAKE_INSTALL_PREFIX}\"\n  COMPONENT Runtime)\n\ninstall(FILES \"${FLUTTER_ICU_DATA_FILE}\" DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\"\n  COMPONENT Runtime)\n\ninstall(FILES \"${FLUTTER_LIBRARY}\" DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n  COMPONENT Runtime)\n\n# FlClash\nset(CLASH_DIR \"../libclash/windows\")\n\ninstall(PROGRAMS \"${CLASH_DIR}/FlClashCore.exe\" DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n  COMPONENT Runtime)\n\ninstall(PROGRAMS \"${CLASH_DIR}/FlClashHelperService.exe\" DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n  COMPONENT Runtime)\n\ninstall(FILES \"EnableLoopback.exe\" DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n  COMPONENT Runtime)\n\nif(PLUGIN_BUNDLED_LIBRARIES)\n  install(FILES \"${PLUGIN_BUNDLED_LIBRARIES}\"\n    DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n    COMPONENT Runtime)\nendif()\n\n# Copy the native assets provided by the build.dart from all packages.\nset(NATIVE_ASSETS_DIR \"${PROJECT_BUILD_DIR}native_assets/windows/\")\ninstall(DIRECTORY \"${NATIVE_ASSETS_DIR}\"\n   DESTINATION \"${INSTALL_BUNDLE_LIB_DIR}\"\n   COMPONENT Runtime)\n\n# Fully re-copy the assets directory on each build to avoid having stale files\n# from a previous install.\nset(FLUTTER_ASSET_DIR_NAME \"flutter_assets\")\ninstall(CODE \"\n  file(REMOVE_RECURSE \\\"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\\\")\n  \" COMPONENT Runtime)\ninstall(DIRECTORY \"${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}\"\n  DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\" COMPONENT Runtime)\n\n# Install the AOT library on non-Debug builds only.\ninstall(FILES \"${AOT_LIBRARY}\" DESTINATION \"${INSTALL_BUNDLE_DATA_DIR}\"\n  CONFIGURATIONS Profile;Release\n  COMPONENT Runtime)\n"
  },
  {
    "path": "windows/flutter/CMakeLists.txt",
    "content": "# This file controls Flutter-level build steps. It should not be edited.\ncmake_minimum_required(VERSION 3.14)\n\nset(EPHEMERAL_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/ephemeral\")\n\n# Configuration provided via flutter tool.\ninclude(${EPHEMERAL_DIR}/generated_config.cmake)\n\n# TODO: Move the rest of this into files in ephemeral. See\n# https://github.com/flutter/flutter/issues/57146.\nset(WRAPPER_ROOT \"${EPHEMERAL_DIR}/cpp_client_wrapper\")\n\n# Set fallback configurations for older versions of the flutter tool.\nif (NOT DEFINED FLUTTER_TARGET_PLATFORM)\n  set(FLUTTER_TARGET_PLATFORM \"windows-x64\")\nendif()\n\n# === Flutter Library ===\nset(FLUTTER_LIBRARY \"${EPHEMERAL_DIR}/flutter_windows.dll\")\n\n# Published to parent scope for install step.\nset(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)\nset(FLUTTER_ICU_DATA_FILE \"${EPHEMERAL_DIR}/icudtl.dat\" PARENT_SCOPE)\nset(PROJECT_BUILD_DIR \"${PROJECT_DIR}/build/\" PARENT_SCOPE)\nset(AOT_LIBRARY \"${PROJECT_DIR}/build/windows/app.so\" PARENT_SCOPE)\n\nlist(APPEND FLUTTER_LIBRARY_HEADERS\n  \"flutter_export.h\"\n  \"flutter_windows.h\"\n  \"flutter_messenger.h\"\n  \"flutter_plugin_registrar.h\"\n  \"flutter_texture_registrar.h\"\n)\nlist(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND \"${EPHEMERAL_DIR}/\")\nadd_library(flutter INTERFACE)\ntarget_include_directories(flutter INTERFACE\n  \"${EPHEMERAL_DIR}\"\n)\ntarget_link_libraries(flutter INTERFACE \"${FLUTTER_LIBRARY}.lib\")\nadd_dependencies(flutter flutter_assemble)\n\n# === Wrapper ===\nlist(APPEND CPP_WRAPPER_SOURCES_CORE\n  \"core_implementations.cc\"\n  \"standard_codec.cc\"\n)\nlist(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND \"${WRAPPER_ROOT}/\")\nlist(APPEND CPP_WRAPPER_SOURCES_PLUGIN\n  \"plugin_registrar.cc\"\n)\nlist(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND \"${WRAPPER_ROOT}/\")\nlist(APPEND CPP_WRAPPER_SOURCES_APP\n  \"flutter_engine.cc\"\n  \"flutter_view_controller.cc\"\n)\nlist(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND \"${WRAPPER_ROOT}/\")\n\n# Wrapper sources needed for a plugin.\nadd_library(flutter_wrapper_plugin STATIC\n  ${CPP_WRAPPER_SOURCES_CORE}\n  ${CPP_WRAPPER_SOURCES_PLUGIN}\n)\napply_standard_settings(flutter_wrapper_plugin)\nset_target_properties(flutter_wrapper_plugin PROPERTIES\n  POSITION_INDEPENDENT_CODE ON)\nset_target_properties(flutter_wrapper_plugin PROPERTIES\n  CXX_VISIBILITY_PRESET hidden)\ntarget_link_libraries(flutter_wrapper_plugin PUBLIC flutter)\ntarget_include_directories(flutter_wrapper_plugin PUBLIC\n  \"${WRAPPER_ROOT}/include\"\n)\nadd_dependencies(flutter_wrapper_plugin flutter_assemble)\n\n# Wrapper sources needed for the runner.\nadd_library(flutter_wrapper_app STATIC\n  ${CPP_WRAPPER_SOURCES_CORE}\n  ${CPP_WRAPPER_SOURCES_APP}\n)\napply_standard_settings(flutter_wrapper_app)\ntarget_link_libraries(flutter_wrapper_app PUBLIC flutter)\ntarget_include_directories(flutter_wrapper_app PUBLIC\n  \"${WRAPPER_ROOT}/include\"\n)\nadd_dependencies(flutter_wrapper_app flutter_assemble)\n\n# === Flutter tool backend ===\n# _phony_ is a non-existent file to force this command to run every time,\n# since currently there's no way to get a full input/output list from the\n# flutter tool.\nset(PHONY_OUTPUT \"${CMAKE_CURRENT_BINARY_DIR}/_phony_\")\nset_source_files_properties(\"${PHONY_OUTPUT}\" PROPERTIES SYMBOLIC TRUE)\nadd_custom_command(\n  OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}\n    ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN}\n    ${CPP_WRAPPER_SOURCES_APP}\n    ${PHONY_OUTPUT}\n  COMMAND ${CMAKE_COMMAND} -E env\n    ${FLUTTER_TOOL_ENVIRONMENT}\n    \"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat\"\n      ${FLUTTER_TARGET_PLATFORM} $<CONFIG>\n  VERBATIM\n)\nadd_custom_target(flutter_assemble DEPENDS\n  \"${FLUTTER_LIBRARY}\"\n  ${FLUTTER_LIBRARY_HEADERS}\n  ${CPP_WRAPPER_SOURCES_CORE}\n  ${CPP_WRAPPER_SOURCES_PLUGIN}\n  ${CPP_WRAPPER_SOURCES_APP}\n)\n"
  },
  {
    "path": "windows/flutter/generated_plugin_registrant.cc",
    "content": "//\n//  Generated file. Do not edit.\n//\n\n// clang-format off\n\n#include \"generated_plugin_registrant.h\"\n\n#include <app_links/app_links_plugin_c_api.h>\n#include <connectivity_plus/connectivity_plus_windows_plugin.h>\n#include <dynamic_color/dynamic_color_plugin_c_api.h>\n#include <file_selector_windows/file_selector_windows.h>\n#include <flutter_js/flutter_js_plugin.h>\n#include <hotkey_manager_windows/hotkey_manager_windows_plugin_c_api.h>\n#include <proxy/proxy_plugin_c_api.h>\n#include <screen_retriever_windows/screen_retriever_windows_plugin_c_api.h>\n#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>\n#include <tray_manager/tray_manager_plugin.h>\n#include <url_launcher_windows/url_launcher_windows.h>\n#include <window_ext/window_ext_plugin_c_api.h>\n#include <window_manager/window_manager_plugin.h>\n\nvoid RegisterPlugins(flutter::PluginRegistry* registry) {\n  AppLinksPluginCApiRegisterWithRegistrar(\n      registry->GetRegistrarForPlugin(\"AppLinksPluginCApi\"));\n  ConnectivityPlusWindowsPluginRegisterWithRegistrar(\n      registry->GetRegistrarForPlugin(\"ConnectivityPlusWindowsPlugin\"));\n  DynamicColorPluginCApiRegisterWithRegistrar(\n      registry->GetRegistrarForPlugin(\"DynamicColorPluginCApi\"));\n  FileSelectorWindowsRegisterWithRegistrar(\n      registry->GetRegistrarForPlugin(\"FileSelectorWindows\"));\n  FlutterJsPluginRegisterWithRegistrar(\n      registry->GetRegistrarForPlugin(\"FlutterJsPlugin\"));\n  HotkeyManagerWindowsPluginCApiRegisterWithRegistrar(\n      registry->GetRegistrarForPlugin(\"HotkeyManagerWindowsPluginCApi\"));\n  ProxyPluginCApiRegisterWithRegistrar(\n      registry->GetRegistrarForPlugin(\"ProxyPluginCApi\"));\n  ScreenRetrieverWindowsPluginCApiRegisterWithRegistrar(\n      registry->GetRegistrarForPlugin(\"ScreenRetrieverWindowsPluginCApi\"));\n  Sqlite3FlutterLibsPluginRegisterWithRegistrar(\n      registry->GetRegistrarForPlugin(\"Sqlite3FlutterLibsPlugin\"));\n  TrayManagerPluginRegisterWithRegistrar(\n      registry->GetRegistrarForPlugin(\"TrayManagerPlugin\"));\n  UrlLauncherWindowsRegisterWithRegistrar(\n      registry->GetRegistrarForPlugin(\"UrlLauncherWindows\"));\n  WindowExtPluginCApiRegisterWithRegistrar(\n      registry->GetRegistrarForPlugin(\"WindowExtPluginCApi\"));\n  WindowManagerPluginRegisterWithRegistrar(\n      registry->GetRegistrarForPlugin(\"WindowManagerPlugin\"));\n}\n"
  },
  {
    "path": "windows/flutter/generated_plugin_registrant.h",
    "content": "//\n//  Generated file. Do not edit.\n//\n\n// clang-format off\n\n#ifndef GENERATED_PLUGIN_REGISTRANT_\n#define GENERATED_PLUGIN_REGISTRANT_\n\n#include <flutter/plugin_registry.h>\n\n// Registers Flutter plugins.\nvoid RegisterPlugins(flutter::PluginRegistry* registry);\n\n#endif  // GENERATED_PLUGIN_REGISTRANT_\n"
  },
  {
    "path": "windows/flutter/generated_plugins.cmake",
    "content": "#\n# Generated file, do not edit.\n#\n\nlist(APPEND FLUTTER_PLUGIN_LIST\n  app_links\n  connectivity_plus\n  dynamic_color\n  file_selector_windows\n  flutter_js\n  hotkey_manager_windows\n  proxy\n  screen_retriever_windows\n  sqlite3_flutter_libs\n  tray_manager\n  url_launcher_windows\n  window_ext\n  window_manager\n)\n\nlist(APPEND FLUTTER_FFI_PLUGIN_LIST\n)\n\nset(PLUGIN_BUNDLED_LIBRARIES)\n\nforeach(plugin ${FLUTTER_PLUGIN_LIST})\n  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})\n  target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})\nendforeach(plugin)\n\nforeach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})\n  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})\n  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})\nendforeach(ffi_plugin)\n"
  },
  {
    "path": "windows/packaging/exe/ChineseSimplified.isl",
    "content": "﻿; *** Inno Setup version 6.1.0+ Chinese Simplified messages ***\n;\n; To download user-contributed translations of this file, go to:\n;   https://jrsoftware.org/files/istrans/\n;\n; Note: When translating this text, do not add periods (.) to the end of\n; messages that didn't have them already, because on those messages Inno\n; Setup adds the periods automatically (appending a period would result in\n; two periods being displayed).\n;\n; Maintained by Zhenghan Yang\n; Email: 847320916@QQ.com\n; Translation based on network resource\n; The latest Translation is on https://github.com/kira-96/Inno-Setup-Chinese-Simplified-Translation\n;\n\n[LangOptions]\n; The following three entries are very important. Be sure to read and \n; understand the '[LangOptions] section' topic in the help file.\nLanguageName=简体中文\n; If Language Name display incorrect, uncomment next line\n; LanguageName=<7B80><4F53><4E2D><6587>\n; About LanguageID, to reference link:\n; https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c\nLanguageID=$0804\nLanguageCodePage=936\n; If the language you are translating to requires special font faces or\n; sizes, uncomment any of the following entries and change them accordingly.\nDialogFontName=Microsoft YaHei UI\n;DialogFontSize=8\nWelcomeFontName=Microsoft YaHei UI\n;WelcomeFontSize=12\nTitleFontName=Microsoft YaHei UI\n;TitleFontSize=29\n;CopyrightFontName=Arial\n;CopyrightFontSize=8\n\n[Messages]\n\n; *** 应用程序标题\nSetupAppTitle=安装\nSetupWindowTitle=安装 - %1\nUninstallAppTitle=卸载\nUninstallAppFullTitle=%1 卸载\n\n; *** Misc. common\nInformationTitle=信息\nConfirmTitle=确认\nErrorTitle=错误\n\n; *** SetupLdr messages\nSetupLdrStartupMessage=现在将安装 %1。您想要继续吗？\nLdrCannotCreateTemp=不能创建临时文件。安装中断。\nLdrCannotExecTemp=不能执行临时目录中的文件。安装中断。\nHelpTextNote=\n\n; *** 启动错误消息\nLastErrorMessage=%1.%n%n错误 %2: %3\nSetupFileMissing=安装目录中的文件 %1 丢失。请修正这个问题或者获取程序的新副本。\nSetupFileCorrupt=安装文件已损坏。请获取程序的新副本。\nSetupFileCorruptOrWrongVer=安装文件已损坏，或是与这个安装程序的版本不兼容。请修正这个问题或获取新的程序副本。\nInvalidParameter=无效的命令行参数：%n%n%1\nSetupAlreadyRunning=安装程序正在运行。\nWindowsVersionNotSupported=这个程序不支持当前计算机运行的 Windows 版本。\nWindowsServicePackRequired=这个程序需要 %1 服务包 %2 或更高。\nNotOnThisPlatform=这个程序将不能运行于 %1。\nOnlyOnThisPlatform=这个程序必须运行于 %1。\nOnlyOnTheseArchitectures=这个程序只能在为下列处理器架构的 Windows 版本中进行安装：%n%n%1\nWinVersionTooLowError=这个程序需要 %1 版本 %2 或更高。\nWinVersionTooHighError=这个程序不能安装于 %1 版本 %2 或更高。\nAdminPrivilegesRequired=在安装这个程序时您必须以管理员身份登录。\nPowerUserPrivilegesRequired=在安装这个程序时您必须以管理员身份或有权限的用户组身份登录。\nSetupAppRunningError=安装程序发现 %1 当前正在运行。%n%n请先关闭所有运行的窗口，然后点击“确定”继续，或按“取消”退出。\nUninstallAppRunningError=卸载程序发现 %1 当前正在运行。%n%n请先关闭所有运行的窗口，然后点击“确定”继续，或按“取消”退出。\n\n; *** 启动问题\nPrivilegesRequiredOverrideTitle=选择安装程序模式\nPrivilegesRequiredOverrideInstruction=选择安装模式\nPrivilegesRequiredOverrideText1=%1 可以为所有用户安装(需要管理员权限)，或仅为您安装。\nPrivilegesRequiredOverrideText2=%1 只能为您安装，或为所有用户安装(需要管理员权限)。\nPrivilegesRequiredOverrideAllUsers=为所有用户安装(&A)\nPrivilegesRequiredOverrideAllUsersRecommended=为所有用户安装(&A) (建议选项)\nPrivilegesRequiredOverrideCurrentUser=仅为我安装(&M)\nPrivilegesRequiredOverrideCurrentUserRecommended=仅为我安装(&M) (建议选项)\n\n; *** 其它错误\nErrorCreatingDir=安装程序不能创建目录“%1”。\nErrorTooManyFilesInDir=不能在目录“%1”中创建文件，因为里面的文件太多\n\n; *** 安装程序公共消息\nExitSetupTitle=退出安装程序\nExitSetupMessage=安装程序尚未完成安装。如果您现在退出，程序将不能安装。%n%n您可以以后再运行安装程序完成安装。%n%n现在退出安装程序吗？\nAboutSetupMenuItem=关于安装程序(&A)...\nAboutSetupTitle=关于安装程序\nAboutSetupMessage=%1 版本 %2%n%3%n%n%1 主页：%n%4\nAboutSetupNote=\nTranslatorNote=Translated by Zhenghan Yang.\n\n; *** 按钮\nButtonBack=< 上一步(&B)\nButtonNext=下一步(&N) >\nButtonInstall=安装(&I)\nButtonOK=确定\nButtonCancel=取消\nButtonYes=是(&Y)\nButtonYesToAll=全是(&A)\nButtonNo=否(&N)\nButtonNoToAll=全否(&O)\nButtonFinish=完成(&F)\nButtonBrowse=浏览(&B)...\nButtonWizardBrowse=浏览(&R)...\nButtonNewFolder=新建文件夹(&M)\n\n; *** “选择语言”对话框消息\nSelectLanguageTitle=选择安装语言\nSelectLanguageLabel=选择安装时要使用的语言。\n\n; *** 公共向导文字\nClickNext=点击“下一步”继续，或点击“取消”退出安装程序。\nBeveledLabel=\nBrowseDialogTitle=浏览文件夹\nBrowseDialogLabel=在下列列表中选择一个文件夹，然后点击“确定”。\nNewFolderName=新建文件夹\n\n; *** “欢迎”向导页\nWelcomeLabel1=欢迎使用 [name] 安装向导\nWelcomeLabel2=现在将安装 [name/ver] 到您的电脑中。%n%n推荐您在继续安装前关闭所有其它应用程序。\n\n; *** “密码”向导页\nWizardPassword=密码\nPasswordLabel1=这个安装程序有密码保护。\nPasswordLabel3=请输入密码，然后点击“下一步”继续。密码区分大小写。\nPasswordEditLabel=密码(&P)：\nIncorrectPassword=您所输入的密码不正确，请重试。\n\n; *** “许可协议”向导页\nWizardLicense=许可协议\nLicenseLabel=继续安装前请阅读下列重要信息。\nLicenseLabel3=请仔细阅读下列许可协议。您在继续安装前必须同意这些协议条款。\nLicenseAccepted=我同意此协议(&A)\nLicenseNotAccepted=我拒绝此协议(&D)\n\n; *** “信息”向导页\nWizardInfoBefore=信息\nInfoBeforeLabel=请在继续安装前阅读下列重要信息。\nInfoBeforeClickLabel=如果您想继续安装，点击“下一步”。\nWizardInfoAfter=信息\nInfoAfterLabel=请在继续安装前阅读下列重要信息。\nInfoAfterClickLabel=如果您想继续安装，点击“下一步”。\n\n; *** “用户信息”向导页\nWizardUserInfo=用户信息\nUserInfoDesc=请输入您的信息。\nUserInfoName=用户名(&U)：\nUserInfoOrg=组织(&O)：\nUserInfoSerial=序列号(&S)：\nUserInfoNameRequired=您必须输入用户名。\n\n; *** “选择目标目录”向导页\nWizardSelectDir=选择目标位置\nSelectDirDesc=您想将 [name] 安装在哪里？\nSelectDirLabel3=安装程序将安装 [name] 到下列文件夹中。\nSelectDirBrowseLabel=点击“下一步”继续。如果您想选择其它文件夹，点击“浏览”。\nDiskSpaceGBLabel=至少需要有 [gb] GB 的可用磁盘空间。\nDiskSpaceMBLabel=至少需要有 [mb] MB 的可用磁盘空间。\nCannotInstallToNetworkDrive=安装程序无法安装到一个网络驱动器。\nCannotInstallToUNCPath=安装程序无法安装到一个UNC路径。\nInvalidPath=您必须输入一个带驱动器卷标的完整路径，例如：%n%nC:\\APP%n%n或下列形式的UNC路径：%n%n\\\\server\\share\nInvalidDrive=您选定的驱动器或 UNC 共享不存在或不能访问。请选选择其它位置。\nDiskSpaceWarningTitle=没有足够的磁盘空间\nDiskSpaceWarning=安装程序至少需要 %1 KB 的可用空间才能安装，但选定驱动器只有 %2 KB 的可用空间。%n%n您一定要继续吗？\nDirNameTooLong=文件夹名称或路径太长。\nInvalidDirName=文件夹名称无效。\nBadDirName32=文件夹名称不能包含下列任何字符：%n%n%1\nDirExistsTitle=文件夹已存在\nDirExists=文件夹：%n%n%1%n%n已经存在。您一定要安装到这个文件夹中吗？\nDirDoesntExistTitle=文件夹不存在\nDirDoesntExist=文件夹：%n%n%1%n%n不存在。您想要创建此文件夹吗？\n\n; *** “选择组件”向导页\nWizardSelectComponents=选择组件\nSelectComponentsDesc=您想安装哪些程序的组件？\nSelectComponentsLabel2=选择您想要安装的组件；清除您不想安装的组件。然后点击“下一步”继续。\nFullInstallation=完全安装\n; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language)\nCompactInstallation=简洁安装\nCustomInstallation=自定义安装\nNoUninstallWarningTitle=组件已存在\nNoUninstallWarning=安装程序检测到下列组件已在您的电脑中安装：%n%n%1%n%n取消选定这些组件将不能卸载它们。%n%n您一定要继续吗？\nComponentSize1=%1 KB\nComponentSize2=%1 MB\nComponentsDiskSpaceGBLabel=当前选择的组件至少需要 [gb] GB 的磁盘空间。\nComponentsDiskSpaceMBLabel=当前选择的组件至少需要 [mb] MB 的磁盘空间。\n\n; *** “选择附加任务”向导页\nWizardSelectTasks=选择附加任务\nSelectTasksDesc=您想要安装程序执行哪些附加任务？\nSelectTasksLabel2=选择您想要安装程序在安装 [name] 时执行的附加任务，然后点击“下一步”。\n\n; *** “选择开始菜单文件夹”向导页\nWizardSelectProgramGroup=选择开始菜单文件夹\nSelectStartMenuFolderDesc=安装程序应该在哪里放置程序的快捷方式？\nSelectStartMenuFolderLabel3=安装程序现在将在下列开始菜单文件夹中创建程序的快捷方式。\nSelectStartMenuFolderBrowseLabel=点击“下一步”继续。如果您想选择其它文件夹，点击“浏览”。\nMustEnterGroupName=您必须输入一个文件夹名。\nGroupNameTooLong=文件夹名或路径太长。\nInvalidGroupName=文件夹名无效。\nBadGroupName=文件夹名不能包含下列任何字符：%n%n%1\nNoProgramGroupCheck2=不创建开始菜单文件夹(&D)\n\n; *** “准备安装”向导页\nWizardReady=准备安装\nReadyLabel1=安装程序现在准备开始安装 [name] 到您的电脑中。\nReadyLabel2a=点击“安装”继续此安装程序。如果您想要回顾或修改设置，请点击“上一步”。\nReadyLabel2b=点击“安装”继续此安装程序？\nReadyMemoUserInfo=用户信息：\nReadyMemoDir=目标位置：\nReadyMemoType=安装类型：\nReadyMemoComponents=选定组件：\nReadyMemoGroup=开始菜单文件夹：\nReadyMemoTasks=附加任务：\n\n; *** TDownloadWizardPage wizard page and DownloadTemporaryFile\nDownloadingLabel=正在下载附加文件...\nButtonStopDownload=停止下载(&S)\nStopDownload=您确定要停止下载吗？\nErrorDownloadAborted=下载已中止\nErrorDownloadFailed=下载失败：%1 %2\nErrorDownloadSizeFailed=获取下载大小失败：%1 %2\nErrorFileHash1=校验文件哈希失败：%1\nErrorFileHash2=无效的文件哈希：预期为 %1，实际为 %2\nErrorProgress=无效的进度：%1，总共%2\nErrorFileSize=文件大小错误：预期为 %1，实际为 %2\n\n; *** “正在准备安装”向导页\nWizardPreparing=正在准备安装\nPreparingDesc=安装程序正在准备安装 [name] 到您的电脑中。\nPreviousInstallNotCompleted=先前程序的安装/卸载未完成。您需要重新启动您的电脑才能完成安装。%n%n在重新启动电脑后，再运行安装完成 [name] 的安装。\nCannotContinue=安装程序不能继续。请点击“取消”退出。\nApplicationsFound=下列应用程序正在使用的文件需要更新设置。它是建议您允许安装程序自动关闭这些应用程序。\nApplicationsFound2=下列应用程序正在使用的文件需要更新设置。它是建议您允许安装程序自动关闭这些应用程序。安装完成后，安装程序将尝试重新启动应用程序。\nCloseApplications=自动关闭该应用程序(&A)\nDontCloseApplications=不要关闭该应用程序(&D)\nErrorCloseApplications=安装程序无法自动关闭所有应用程序。在继续之前，我们建议您关闭所有使用需要更新的安装程序文件。\nPrepareToInstallNeedsRestart=安装程序必须重新启动计算机。重新启动计算机后，请再次运行安装程序以完成 [name] 的安装。%n%n是否立即重新启动？\n\n; *** “正在安装”向导页\nWizardInstalling=正在安装\nInstallingLabel=安装程序正在安装 [name] 到您的电脑中，请稍等。\n\n; *** “安装完成”向导页\nFinishedHeadingLabel=[name] 安装完成\nFinishedLabelNoIcons=安装程序已在您的电脑中安装了 [name]。\nFinishedLabel=安装程序已在您的电脑中安装了 [name]。此应用程序可以通过选择安装的快捷方式运行。\nClickFinish=点击“完成”退出安装程序。\nFinishedRestartLabel=要完成 [name] 的安装，安装程序必须重新启动您的电脑。您想要立即重新启动吗？\nFinishedRestartMessage=要完成 [name] 的安装，安装程序必须重新启动您的电脑。%n%n您想要立即重新启动吗？\nShowReadmeCheck=是，我想查阅自述文件\nYesRadio=是，立即重新启动电脑(&Y)\nNoRadio=否，稍后重新启动电脑(&N)\n; used for example as 'Run MyProg.exe'\nRunEntryExec=运行 %1\n; used for example as 'View Readme.txt'\nRunEntryShellExec=查阅 %1\n\n; *** “安装程序需要下一张磁盘”提示\nChangeDiskTitle=安装程序需要下一张磁盘\nSelectDiskLabel2=请插入磁盘 %1 并点击“确定”。%n%n如果这个磁盘中的文件可以在下列文件夹之外的文件夹中找到，请输入正确的路径或点击“浏览”。\nPathLabel=路径(&P)：\nFileNotInDir2=文件“%1”不能在“%2”定位。请插入正确的磁盘或选择其它文件夹。\nSelectDirectoryLabel=请指定下一张磁盘的位置。\n\n; *** 安装状态消息\nSetupAborted=安装程序未完成安装。%n%n请修正这个问题并重新运行安装程序。\nAbortRetryIgnoreSelectAction=选择操作\nAbortRetryIgnoreRetry=重试(&T)\nAbortRetryIgnoreIgnore=忽略错误并继续(&I)\nAbortRetryIgnoreCancel=关闭安装程序\n\n; *** 安装状态消息\nStatusClosingApplications=正在关闭应用程序...\nStatusCreateDirs=正在创建目录...\nStatusExtractFiles=正在解压缩文件...\nStatusCreateIcons=正在创建快捷方式...\nStatusCreateIniEntries=正在创建 INI 条目...\nStatusCreateRegistryEntries=正在创建注册表条目...\nStatusRegisterFiles=正在注册文件...\nStatusSavingUninstall=正在保存卸载信息...\nStatusRunProgram=正在完成安装...\nStatusRestartingApplications=正在重启应用程序...\nStatusRollback=正在撤销更改...\n\n; *** 其它错误\nErrorInternal2=内部错误：%1\nErrorFunctionFailedNoCode=%1 失败\nErrorFunctionFailed=%1 失败；错误代码 %2\nErrorFunctionFailedWithMessage=%1 失败；错误代码 %2.%n%3\nErrorExecutingProgram=不能执行文件：%n%1\n\n; *** 注册表错误\nErrorRegOpenKey=打开注册表项时出错：%n%1\\%2\nErrorRegCreateKey=创建注册表项时出错：%n%1\\%2\nErrorRegWriteKey=写入注册表项时出错：%n%1\\%2\n\n; *** INI 错误\nErrorIniEntry=在文件“%1”中创建INI条目时出错。\n\n; *** 文件复制错误\nFileAbortRetryIgnoreSkipNotRecommended=跳过这个文件(&S) (不推荐)\nFileAbortRetryIgnoreIgnoreNotRecommended=忽略错误并继续(&I) (不推荐)\nSourceIsCorrupted=源文件已损坏\nSourceDoesntExist=源文件“%1”不存在\nExistingFileReadOnly2=无法替换现有文件，因为它是只读的。\nExistingFileReadOnlyRetry=移除只读属性并重试(&R)\nExistingFileReadOnlyKeepExisting=保留现有文件(&K)\nErrorReadingExistingDest=尝试读取现有文件时出错：\nFileExistsSelectAction=选择操作\nFileExists2=文件已经存在。\nFileExistsOverwriteExisting=覆盖已经存在的文件(&O)\nFileExistsKeepExisting=保留现有的文件(&K)\nFileExistsOverwriteOrKeepAll=为所有的冲突文件执行此操作(&D)\nExistingFileNewerSelectAction=选择操作\nExistingFileNewer2=现有的文件比安装程序将要安装的文件更新。\nExistingFileNewerOverwriteExisting=覆盖已经存在的文件(&O)\nExistingFileNewerKeepExisting=保留现有的文件(&K) (推荐)\nExistingFileNewerOverwriteOrKeepAll=为所有的冲突文件执行此操作(&D)\nErrorChangingAttr=尝试改变下列现有的文件的属性时出错：\nErrorCreatingTemp=尝试在目标目录创建文件时出错：\nErrorReadingSource=尝试读取下列源文件时出错：\nErrorCopying=尝试复制下列文件时出错：\nErrorReplacingExistingFile=尝试替换现有的文件时出错：\nErrorRestartReplace=重新启动替换失败：\nErrorRenamingTemp=尝试重新命名以下目标目录中的一个文件时出错：\nErrorRegisterServer=无法注册 DLL/OCX：%1\nErrorRegSvr32Failed=RegSvr32 失败；退出代码 %1\nErrorRegisterTypeLib=无法注册类型库：%1\n\n; *** 卸载显示名字标记\n; used for example as 'My Program (32-bit)'\nUninstallDisplayNameMark=%1 (%2)\n; used for example as 'My Program (32-bit, All users)'\nUninstallDisplayNameMarks=%1 (%2, %3)\nUninstallDisplayNameMark32Bit=32位\nUninstallDisplayNameMark64Bit=64位\nUninstallDisplayNameMarkAllUsers=所有用户\nUninstallDisplayNameMarkCurrentUser=当前用户\n\n; *** 安装后错误\nErrorOpeningReadme=尝试打开自述文件时出错。\nErrorRestartingComputer=安装程序不能重新启动电脑，请手动重启。\n\n; *** 卸载消息\nUninstallNotFound=文件“%1”不存在。无法卸载。\nUninstallOpenError=文件“%1”不能打开。无法卸载。\nUninstallUnsupportedVer=此版本的卸载程序无法识别卸载日志文件“%1”的格式。无法卸载\nUninstallUnknownEntry=在卸载日志中遇到一个未知的条目 (%1)\nConfirmUninstall=您确认想要完全删除 %1 及它的所有组件吗？\nUninstallOnlyOnWin64=这个安装程序只能在64位Windows中进行卸载。\nOnlyAdminCanUninstall=这个安装的程序需要有管理员权限的用户才能卸载。\nUninstallStatusLabel=正在从您的电脑中删除 %1，请稍等。\nUninstalledAll=%1 已顺利地从您的电脑中删除。\nUninstalledMost=%1 卸载完成。%n%n有一些内容无法被删除。您可以手动删除它们。\nUninstalledAndNeedsRestart=要完成 %1 的卸载，您的电脑必须重新启动。%n%n您想立即重新启动电脑吗？\nUninstallDataCorrupted=文件“%1”已损坏，无法卸载\n\n; *** 卸载状态消息\nConfirmDeleteSharedFileTitle=删除共享文件吗？\nConfirmDeleteSharedFile2=系统中包含的下列共享文件已经不再被其它程序使用。您想要卸载程序删除这些共享文件吗？%n%n如果这些文件被删除，但还有程序正在使用这些文件，这些程序可能不能正确执行。如果您不能确定，选择“否”。把这些文件保留在系统中以免引起问题。\nSharedFileNameLabel=文件名：\nSharedFileLocationLabel=位置：\nWizardUninstalling=卸载状态\nStatusUninstalling=正在卸载 %1...\n\n; *** Shutdown block reasons\nShutdownBlockReasonInstallingApp=正在安装 %1。\nShutdownBlockReasonUninstallingApp=正在卸载 %1。\n\n; The custom messages below aren't used by Setup itself, but if you make\n; use of them in your scripts, you'll want to translate them.\n\n[CustomMessages]\n\nNameAndVersion=%1 版本 %2\nAdditionalIcons=附加快捷方式：\nCreateDesktopIcon=创建桌面快捷方式(&D)\nCreateQuickLaunchIcon=创建快速运行栏快捷方式(&Q)\nProgramOnTheWeb=%1 网站\nUninstallProgram=卸载 %1\nLaunchProgram=运行 %1\nAssocFileExtension=将 %2 文件扩展名与 %1 建立关联(&A)\nAssocingFileExtension=正在将 %2 文件扩展名与 %1 建立关联...\nAutoStartProgramGroupDescription=启动组：\nAutoStartProgram=自动启动 %1\nAddonHostProgramNotFound=%1无法找到您所选择的文件夹。%n%n您想要继续吗？\n"
  },
  {
    "path": "windows/packaging/exe/inno_setup.iss",
    "content": "[Setup]\nAppId={{APP_ID}}\nAppVersion={{APP_VERSION}}\nAppName={{DISPLAY_NAME}}\nAppPublisher={{PUBLISHER_NAME}}\nAppPublisherURL={{PUBLISHER_URL}}\nAppSupportURL={{PUBLISHER_URL}}\nAppUpdatesURL={{PUBLISHER_URL}}\nDefaultDirName={{INSTALL_DIR_NAME}}\nDisableProgramGroupPage=yes\nOutputDir=.\nOutputBaseFilename={{OUTPUT_BASE_FILENAME}}\nCompression=lzma\nSolidCompression=yes\nSetupIconFile={{SETUP_ICON_FILE}}\nWizardStyle=modern\nPrivilegesRequired={{PRIVILEGES_REQUIRED}}\nArchitecturesAllowed=x64 arm64\nArchitecturesInstallIn64BitMode=x64 arm64\n\n[Code]\nprocedure KillProcesses;\nvar\n  Processes: TArrayOfString;\n  i: Integer;\n  ResultCode: Integer;\nbegin\n  Processes := ['FlClash.exe', 'FlClashCore.exe', 'FlClashHelperService.exe'];\n\n  for i := 0 to GetArrayLength(Processes)-1 do\n  begin\n    Exec('taskkill', '/f /im ' + Processes[i], '', SW_HIDE, ewWaitUntilTerminated, ResultCode);\n  end;\nend;\n\nfunction InitializeSetup(): Boolean;\nbegin\n  KillProcesses;\n  Result := True;\nend;\n\n[Languages]\n{% for locale in LOCALES %}\n{% if locale.lang == 'en' %}Name: \"english\"; MessagesFile: \"compiler:Default.isl\"{% endif %}\n{% if locale.lang == 'hy' %}Name: \"armenian\"; MessagesFile: \"compiler:Languages\\\\Armenian.isl\"{% endif %}\n{% if locale.lang == 'bg' %}Name: \"bulgarian\"; MessagesFile: \"compiler:Languages\\\\Bulgarian.isl\"{% endif %}\n{% if locale.lang == 'ca' %}Name: \"catalan\"; MessagesFile: \"compiler:Languages\\\\Catalan.isl\"{% endif %}\n{% if locale.lang == 'zh' %}\nName: \"chineseSimplified\"; MessagesFile: {% if locale.file %}{{ locale.file }}{% else %}\"compiler:Languages\\\\ChineseSimplified.isl\"{% endif %}\n{% endif %}\n{% if locale.lang == 'co' %}Name: \"corsican\"; MessagesFile: \"compiler:Languages\\\\Corsican.isl\"{% endif %}\n{% if locale.lang == 'cs' %}Name: \"czech\"; MessagesFile: \"compiler:Languages\\\\Czech.isl\"{% endif %}\n{% if locale.lang == 'da' %}Name: \"danish\"; MessagesFile: \"compiler:Languages\\\\Danish.isl\"{% endif %}\n{% if locale.lang == 'nl' %}Name: \"dutch\"; MessagesFile: \"compiler:Languages\\\\Dutch.isl\"{% endif %}\n{% if locale.lang == 'fi' %}Name: \"finnish\"; MessagesFile: \"compiler:Languages\\\\Finnish.isl\"{% endif %}\n{% if locale.lang == 'fr' %}Name: \"french\"; MessagesFile: \"compiler:Languages\\\\French.isl\"{% endif %}\n{% if locale.lang == 'de' %}Name: \"german\"; MessagesFile: \"compiler:Languages\\\\German.isl\"{% endif %}\n{% if locale.lang == 'he' %}Name: \"hebrew\"; MessagesFile: \"compiler:Languages\\\\Hebrew.isl\"{% endif %}\n{% if locale.lang == 'is' %}Name: \"icelandic\"; MessagesFile: \"compiler:Languages\\\\Icelandic.isl\"{% endif %}\n{% if locale.lang == 'it' %}Name: \"italian\"; MessagesFile: \"compiler:Languages\\\\Italian.isl\"{% endif %}\n{% if locale.lang == 'ja' %}Name: \"japanese\"; MessagesFile: \"compiler:Languages\\\\Japanese.isl\"{% endif %}\n{% if locale.lang == 'no' %}Name: \"norwegian\"; MessagesFile: \"compiler:Languages\\\\Norwegian.isl\"{% endif %}\n{% if locale.lang == 'pl' %}Name: \"polish\"; MessagesFile: \"compiler:Languages\\\\Polish.isl\"{% endif %}\n{% if locale.lang == 'pt' %}Name: \"portuguese\"; MessagesFile: \"compiler:Languages\\\\Portuguese.isl\"{% endif %}\n{% if locale.lang == 'ru' %}Name: \"russian\"; MessagesFile: \"compiler:Languages\\\\Russian.isl\"{% endif %}\n{% if locale.lang == 'sk' %}Name: \"slovak\"; MessagesFile: \"compiler:Languages\\\\Slovak.isl\"{% endif %}\n{% if locale.lang == 'sl' %}Name: \"slovenian\"; MessagesFile: \"compiler:Languages\\\\Slovenian.isl\"{% endif %}\n{% if locale.lang == 'es' %}Name: \"spanish\"; MessagesFile: \"compiler:Languages\\\\Spanish.isl\"{% endif %}\n{% if locale.lang == 'tr' %}Name: \"turkish\"; MessagesFile: \"compiler:Languages\\\\Turkish.isl\"{% endif %}\n{% if locale.lang == 'uk' %}Name: \"ukrainian\"; MessagesFile: \"compiler:Languages\\\\Ukrainian.isl\"{% endif %}\n{% endfor %}\n\n[Tasks]\nName: \"desktopicon\"; Description: \"{cm:CreateDesktopIcon}\"; GroupDescription: \"{cm:AdditionalIcons}\"; Flags: {% if CREATE_DESKTOP_ICON != true %}unchecked{% else %}checkedonce{% endif %}\n[Files]\nSource: \"{{SOURCE_DIR}}\\\\*\"; DestDir: \"{app}\"; Flags: ignoreversion recursesubdirs createallsubdirs\n; NOTE: Don't use \"Flags: ignoreversion\" on any shared system files\n\n[Icons]\nName: \"{autoprograms}\\\\{{DISPLAY_NAME}}\"; Filename: \"{app}\\\\{{EXECUTABLE_NAME}}\"\nName: \"{autodesktop}\\\\{{DISPLAY_NAME}}\"; Filename: \"{app}\\\\{{EXECUTABLE_NAME}}\"; Tasks: desktopicon\n[Run]\nFilename: \"{app}\\\\{{EXECUTABLE_NAME}}\"; Description: \"{cm:LaunchProgram,{{DISPLAY_NAME}}}\"; Flags: {% if PRIVILEGES_REQUIRED == 'admin' %}runascurrentuser{% endif %} nowait postinstall skipifsilent"
  },
  {
    "path": "windows/packaging/exe/make_config.yaml",
    "content": "script_template: inno_setup.iss\napp_id: 728B3532-C74B-4870-9068-BE70FE12A3E6\napp_name: FlClash\npublisher: chen08209\npublisher_url: https://github.com/chen08209/FlClash\ndisplay_name: FlClash\nexecutable_name: FlClash.exe\noutput_base_file_name: FlClash.exe\nsetup_icon_file: ..\\windows\\runner\\resources\\app_icon.ico\nlocales:\n  - lang: zh\n    file: ..\\windows\\packaging\\exe\\ChineseSimplified.isl\n  - lang: en\nprivileges_required: admin"
  },
  {
    "path": "windows/runner/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.14)\nproject(runner LANGUAGES CXX)\n\n# Define the application target. To change its name, change BINARY_NAME in the\n# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer\n# work.\n#\n# Any new source files that you add to the application should be added here.\nadd_executable(${BINARY_NAME} WIN32\n  \"flutter_window.cpp\"\n  \"main.cpp\"\n  \"utils.cpp\"\n  \"win32_window.cpp\"\n  \"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc\"\n  \"Runner.rc\"\n  \"runner.exe.manifest\"\n)\n\n# Apply the standard set of build settings. This can be removed for applications\n# that need different build settings.\napply_standard_settings(${BINARY_NAME})\n\n# Add preprocessor definitions for the build version.\ntarget_compile_definitions(${BINARY_NAME} PRIVATE \"FLUTTER_VERSION=\\\"${FLUTTER_VERSION}\\\"\")\ntarget_compile_definitions(${BINARY_NAME} PRIVATE \"FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}\")\ntarget_compile_definitions(${BINARY_NAME} PRIVATE \"FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}\")\ntarget_compile_definitions(${BINARY_NAME} PRIVATE \"FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}\")\ntarget_compile_definitions(${BINARY_NAME} PRIVATE \"FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}\")\n\n# Disable Windows macros that collide with C++ standard library functions.\ntarget_compile_definitions(${BINARY_NAME} PRIVATE \"NOMINMAX\")\n\n# Add dependency libraries and include directories. Add any application-specific\n# dependencies here.\ntarget_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)\ntarget_link_libraries(${BINARY_NAME} PRIVATE \"dwmapi.lib\")\ntarget_include_directories(${BINARY_NAME} PRIVATE \"${CMAKE_SOURCE_DIR}\")\n\n# Run the Flutter tool portions of the build. This must not be removed.\nadd_dependencies(${BINARY_NAME} flutter_assemble)\n"
  },
  {
    "path": "windows/runner/Runner.rc",
    "content": "// Microsoft Visual C++ generated resource script.\n//\n#pragma code_page(65001)\n#include \"resource.h\"\n\n#define APSTUDIO_READONLY_SYMBOLS\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 2 resource.\n//\n#include \"winres.h\"\n\n/////////////////////////////////////////////////////////////////////////////\n#undef APSTUDIO_READONLY_SYMBOLS\n\n/////////////////////////////////////////////////////////////////////////////\n// English (United States) resources\n\n#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\nLANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\n\n#ifdef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// TEXTINCLUDE\n//\n\n1 TEXTINCLUDE\nBEGIN\n    \"resource.h\\0\"\nEND\n\n2 TEXTINCLUDE\nBEGIN\n    \"#include \"\"winres.h\"\"\\r\\n\"\n    \"\\0\"\nEND\n\n3 TEXTINCLUDE\nBEGIN\n    \"\\r\\n\"\n    \"\\0\"\nEND\n\n#endif    // APSTUDIO_INVOKED\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Icon\n//\n\n// Icon with lowest ID value placed first to ensure application icon\n// remains consistent on all systems.\nIDI_APP_ICON            ICON                    \"resources\\\\app_icon.ico\"\n\n\n/////////////////////////////////////////////////////////////////////////////\n//\n// Version\n//\n\n#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD)\n#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD\n#else\n#define VERSION_AS_NUMBER 1,0,0,0\n#endif\n\n#if defined(FLUTTER_VERSION)\n#define VERSION_AS_STRING FLUTTER_VERSION\n#else\n#define VERSION_AS_STRING \"1.0.0\"\n#endif\n\nVS_VERSION_INFO VERSIONINFO\n FILEVERSION VERSION_AS_NUMBER\n PRODUCTVERSION VERSION_AS_NUMBER\n FILEFLAGSMASK VS_FFI_FILEFLAGSMASK\n#ifdef _DEBUG\n FILEFLAGS VS_FF_DEBUG\n#else\n FILEFLAGS 0x0L\n#endif\n FILEOS VOS__WINDOWS32\n FILETYPE VFT_APP\n FILESUBTYPE 0x0L\nBEGIN\n    BLOCK \"StringFileInfo\"\n    BEGIN\n        BLOCK \"040904e4\"\n        BEGIN\n            VALUE \"CompanyName\", \"com.follow\" \"\\0\"\n            VALUE \"FileDescription\", \"FlClash\" \"\\0\"\n            VALUE \"FileVersion\", VERSION_AS_STRING \"\\0\"\n            VALUE \"InternalName\", \"clash\" \"\\0\"\n            VALUE \"LegalCopyright\", \"Copyright (C) 2025 com.follow. All rights reserved.\" \"\\0\"\n            VALUE \"OriginalFilename\", \"FlClash.exe\" \"\\0\"\n            VALUE \"ProductName\", \"clash\" \"\\0\"\n            VALUE \"ProductVersion\", VERSION_AS_STRING \"\\0\"\n        END\n    END\n    BLOCK \"VarFileInfo\"\n    BEGIN\n        VALUE \"Translation\", 0x409, 1252\n    END\nEND\n\n#endif    // English (United States) resources\n/////////////////////////////////////////////////////////////////////////////\n\n\n\n#ifndef APSTUDIO_INVOKED\n/////////////////////////////////////////////////////////////////////////////\n//\n// Generated from the TEXTINCLUDE 3 resource.\n//\n\n\n/////////////////////////////////////////////////////////////////////////////\n#endif    // not APSTUDIO_INVOKED\n"
  },
  {
    "path": "windows/runner/flutter_window.cpp",
    "content": "#include \"flutter_window.h\"\n\n#include <optional>\n\n#include \"flutter/generated_plugin_registrant.h\"\n\nFlutterWindow::FlutterWindow(const flutter::DartProject& project)\n    : project_(project) {}\n\nFlutterWindow::~FlutterWindow() {}\n\nbool FlutterWindow::OnCreate() {\n  if (!Win32Window::OnCreate()) {\n    return false;\n  }\n\n  RECT frame = GetClientArea();\n\n  // The size here must match the window dimensions to avoid unnecessary surface\n  // creation / destruction in the startup path.\n  flutter_controller_ = std::make_unique<flutter::FlutterViewController>(\n      frame.right - frame.left, frame.bottom - frame.top, project_);\n  // Ensure that basic setup of the controller was successful.\n  if (!flutter_controller_->engine() || !flutter_controller_->view()) {\n    return false;\n  }\n  RegisterPlugins(flutter_controller_->engine());\n  SetChildContent(flutter_controller_->view()->GetNativeWindow());\n\n  flutter_controller_->engine()->SetNextFrameCallback([&]() {\n\n  });\n\n  // Flutter can complete the first frame before the \"show window\" callback is\n  // registered. The following call ensures a frame is pending to ensure the\n  // window is shown. It is a no-op if the first frame hasn't completed yet.\n  flutter_controller_->ForceRedraw();\n\n  return true;\n}\n\nvoid FlutterWindow::OnDestroy() {\n  if (flutter_controller_) {\n    flutter_controller_ = nullptr;\n  }\n\n  Win32Window::OnDestroy();\n}\n\nLRESULT\nFlutterWindow::MessageHandler(HWND hwnd, UINT const message,\n                              WPARAM const wparam,\n                              LPARAM const lparam) noexcept {\n  // Give Flutter, including plugins, an opportunity to handle window messages.\n  if (flutter_controller_) {\n    std::optional<LRESULT> result =\n        flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,\n                                                      lparam);\n    if (result) {\n      return *result;\n    }\n  }\n\n  switch (message) {\n    case WM_FONTCHANGE:\n      flutter_controller_->engine()->ReloadSystemFonts();\n      break;\n  }\n\n  return Win32Window::MessageHandler(hwnd, message, wparam, lparam);\n}\n"
  },
  {
    "path": "windows/runner/flutter_window.h",
    "content": "#ifndef RUNNER_FLUTTER_WINDOW_H_\n#define RUNNER_FLUTTER_WINDOW_H_\n\n#include <flutter/dart_project.h>\n#include <flutter/flutter_view_controller.h>\n\n#include <memory>\n\n#include \"win32_window.h\"\n\n// A window that does nothing but host a Flutter view.\nclass FlutterWindow : public Win32Window {\n public:\n  // Creates a new FlutterWindow hosting a Flutter view running |project|.\n  explicit FlutterWindow(const flutter::DartProject& project);\n  virtual ~FlutterWindow();\n\n protected:\n  // Win32Window:\n  bool OnCreate() override;\n  void OnDestroy() override;\n  LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,\n                         LPARAM const lparam) noexcept override;\n\n private:\n  // The project to run.\n  flutter::DartProject project_;\n\n  // The Flutter instance hosted by this window.\n  std::unique_ptr<flutter::FlutterViewController> flutter_controller_;\n};\n\n#endif  // RUNNER_FLUTTER_WINDOW_H_\n"
  },
  {
    "path": "windows/runner/main.cpp",
    "content": "#include <flutter/dart_project.h>\n#include <flutter/flutter_view_controller.h>\n#include <windows.h>\n\n#include \"flutter_window.h\"\n#include \"utils.h\"\n\nint APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,\n                      _In_ wchar_t *command_line, _In_ int show_command) {\n  // Attach to console when present (e.g., 'flutter run') or create a\n  // new console when running with a debugger.\n  if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {\n    CreateAndAttachConsole();\n  }\n\n  // Initialize COM, so that it is available for use in the library and/or\n  // plugins.\n  ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);\n\n  flutter::DartProject project(L\"data\");\n\n  std::vector<std::string> command_line_arguments =\n      GetCommandLineArguments();\n\n  project.set_dart_entrypoint_arguments(std::move(command_line_arguments));\n\n  FlutterWindow window(project);\n  Win32Window::Point origin(10, 10);\n  Win32Window::Size size(1280, 720);\n  if (!window.Create(L\"FlClash\", origin, size)) {\n    return EXIT_FAILURE;\n  }\n  window.SetQuitOnClose(true);\n\n  ::MSG msg;\n  while (::GetMessage(&msg, nullptr, 0, 0)) {\n    ::TranslateMessage(&msg);\n    ::DispatchMessage(&msg);\n  }\n\n  ::CoUninitialize();\n  return EXIT_SUCCESS;\n}\n"
  },
  {
    "path": "windows/runner/resource.h",
    "content": "//{{NO_DEPENDENCIES}}\n// Microsoft Visual C++ generated include file.\n// Used by Runner.rc\n//\n#define IDI_APP_ICON                    101\n\n// Next default values for new objects\n//\n#ifdef APSTUDIO_INVOKED\n#ifndef APSTUDIO_READONLY_SYMBOLS\n#define _APS_NEXT_RESOURCE_VALUE        102\n#define _APS_NEXT_COMMAND_VALUE         40001\n#define _APS_NEXT_CONTROL_VALUE         1001\n#define _APS_NEXT_SYMED_VALUE           101\n#endif\n#endif\n"
  },
  {
    "path": "windows/runner/runner.exe.manifest",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">\n  <application xmlns=\"urn:schemas-microsoft-com:asm.v3\">\n    <windowsSettings>\n      <dpiAwareness xmlns=\"http://schemas.microsoft.com/SMI/2016/WindowsSettings\">PerMonitorV2</dpiAwareness>\n    </windowsSettings>\n  </application>\n  <compatibility xmlns=\"urn:schemas-microsoft-com:compatibility.v1\">\n    <application>\n      <!-- Windows 10 and Windows 11 -->\n      <supportedOS Id=\"{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}\"/>\n    </application>\n  </compatibility>\n</assembly>\n"
  },
  {
    "path": "windows/runner/utils.cpp",
    "content": "#include \"utils.h\"\n\n#include <flutter_windows.h>\n#include <io.h>\n#include <stdio.h>\n#include <windows.h>\n\n#include <iostream>\n\nvoid CreateAndAttachConsole() {\n  if (::AllocConsole()) {\n    FILE *unused;\n    if (freopen_s(&unused, \"CONOUT$\", \"w\", stdout)) {\n      _dup2(_fileno(stdout), 1);\n    }\n    if (freopen_s(&unused, \"CONOUT$\", \"w\", stderr)) {\n      _dup2(_fileno(stdout), 2);\n    }\n    std::ios::sync_with_stdio();\n    FlutterDesktopResyncOutputStreams();\n  }\n}\n\nstd::vector<std::string> GetCommandLineArguments() {\n  // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.\n  int argc;\n  wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);\n  if (argv == nullptr) {\n    return std::vector<std::string>();\n  }\n\n  std::vector<std::string> command_line_arguments;\n\n  // Skip the first argument as it's the binary name.\n  for (int i = 1; i < argc; i++) {\n    command_line_arguments.push_back(Utf8FromUtf16(argv[i]));\n  }\n\n  ::LocalFree(argv);\n\n  return command_line_arguments;\n}\n\nstd::string Utf8FromUtf16(const wchar_t* utf16_string) {\n  if (utf16_string == nullptr) {\n    return std::string();\n  }\n  unsigned int target_length = ::WideCharToMultiByte(\n      CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,\n      -1, nullptr, 0, nullptr, nullptr)\n    -1; // remove the trailing null character\n  int input_length = (int)wcslen(utf16_string);\n  std::string utf8_string;\n  if (target_length == 0 || target_length > utf8_string.max_size()) {\n    return utf8_string;\n  }\n  utf8_string.resize(target_length);\n  int converted_length = ::WideCharToMultiByte(\n      CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,\n      input_length, utf8_string.data(), target_length, nullptr, nullptr);\n  if (converted_length == 0) {\n    return std::string();\n  }\n  return utf8_string;\n}\n"
  },
  {
    "path": "windows/runner/utils.h",
    "content": "#ifndef RUNNER_UTILS_H_\n#define RUNNER_UTILS_H_\n\n#include <string>\n#include <vector>\n\n// Creates a console for the process, and redirects stdout and stderr to\n// it for both the runner and the Flutter library.\nvoid CreateAndAttachConsole();\n\n// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string\n// encoded in UTF-8. Returns an empty std::string on failure.\nstd::string Utf8FromUtf16(const wchar_t* utf16_string);\n\n// Gets the command line arguments passed in as a std::vector<std::string>,\n// encoded in UTF-8. Returns an empty std::vector<std::string> on failure.\nstd::vector<std::string> GetCommandLineArguments();\n\n#endif  // RUNNER_UTILS_H_\n"
  },
  {
    "path": "windows/runner/win32_window.cpp",
    "content": "#include \"win32_window.h\"\n\n#include <dwmapi.h>\n#include <flutter_windows.h>\n\n#include \"resource.h\"\n\nnamespace {\n\n/// Window attribute that enables dark mode window decorations.\n///\n/// Redefined in case the developer's machine has a Windows SDK older than\n/// version 10.0.22000.0.\n/// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute\n#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE\n#define DWMWA_USE_IMMERSIVE_DARK_MODE 20\n#endif\n\nconstexpr const wchar_t kWindowClassName[] = L\"FLUTTER_RUNNER_WIN32_WINDOW\";\n\n/// Registry key for app theme preference.\n///\n/// A value of 0 indicates apps should use dark mode. A non-zero or missing\n/// value indicates apps should use light mode.\nconstexpr const wchar_t kGetPreferredBrightnessRegKey[] =\n  L\"Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Themes\\\\Personalize\";\nconstexpr const wchar_t kGetPreferredBrightnessRegValue[] = L\"AppsUseLightTheme\";\n\n// The number of Win32Window objects that currently exist.\nstatic int g_active_window_count = 0;\n\nusing EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd);\n\n// Scale helper to convert logical scaler values to physical using passed in\n// scale factor\nint Scale(int source, double scale_factor) {\n  return static_cast<int>(source * scale_factor);\n}\n\n// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module.\n// This API is only needed for PerMonitor V1 awareness mode.\nvoid EnableFullDpiSupportIfAvailable(HWND hwnd) {\n  HMODULE user32_module = LoadLibraryA(\"User32.dll\");\n  if (!user32_module) {\n    return;\n  }\n  auto enable_non_client_dpi_scaling =\n      reinterpret_cast<EnableNonClientDpiScaling*>(\n          GetProcAddress(user32_module, \"EnableNonClientDpiScaling\"));\n  if (enable_non_client_dpi_scaling != nullptr) {\n    enable_non_client_dpi_scaling(hwnd);\n  }\n  FreeLibrary(user32_module);\n}\n\n}  // namespace\n\n// Manages the Win32Window's window class registration.\nclass WindowClassRegistrar {\n public:\n  ~WindowClassRegistrar() = default;\n\n  // Returns the singleton registrar instance.\n  static WindowClassRegistrar* GetInstance() {\n    if (!instance_) {\n      instance_ = new WindowClassRegistrar();\n    }\n    return instance_;\n  }\n\n  // Returns the name of the window class, registering the class if it hasn't\n  // previously been registered.\n  const wchar_t* GetWindowClass();\n\n  // Unregisters the window class. Should only be called if there are no\n  // instances of the window.\n  void UnregisterWindowClass();\n\n private:\n  WindowClassRegistrar() = default;\n\n  static WindowClassRegistrar* instance_;\n\n  bool class_registered_ = false;\n};\n\nWindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr;\n\nconst wchar_t* WindowClassRegistrar::GetWindowClass() {\n  if (!class_registered_) {\n    WNDCLASS window_class{};\n    window_class.hCursor = LoadCursor(nullptr, IDC_ARROW);\n    window_class.lpszClassName = kWindowClassName;\n    window_class.style = CS_HREDRAW | CS_VREDRAW;\n    window_class.cbClsExtra = 0;\n    window_class.cbWndExtra = 0;\n    window_class.hInstance = GetModuleHandle(nullptr);\n    window_class.hIcon =\n        LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON));\n    window_class.hbrBackground = 0;\n    window_class.lpszMenuName = nullptr;\n    window_class.lpfnWndProc = Win32Window::WndProc;\n    RegisterClass(&window_class);\n    class_registered_ = true;\n  }\n  return kWindowClassName;\n}\n\nvoid WindowClassRegistrar::UnregisterWindowClass() {\n  UnregisterClass(kWindowClassName, nullptr);\n  class_registered_ = false;\n}\n\nWin32Window::Win32Window() {\n  ++g_active_window_count;\n}\n\nWin32Window::~Win32Window() {\n  --g_active_window_count;\n  Destroy();\n}\n\nbool Win32Window::Create(const std::wstring& title,\n                         const Point& origin,\n                         const Size& size) {\n  Destroy();\n\n  const wchar_t* window_class =\n      WindowClassRegistrar::GetInstance()->GetWindowClass();\n\n  const POINT target_point = {static_cast<LONG>(origin.x),\n                              static_cast<LONG>(origin.y)};\n  HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST);\n  UINT dpi = FlutterDesktopGetDpiForMonitor(monitor);\n  double scale_factor = dpi / 96.0;\n\n  HWND window = CreateWindow(\n      window_class, title.c_str(), WS_OVERLAPPEDWINDOW,\n      Scale(origin.x, scale_factor), Scale(origin.y, scale_factor),\n      Scale(size.width, scale_factor), Scale(size.height, scale_factor),\n      nullptr, nullptr, GetModuleHandle(nullptr), this);\n\n  if (!window) {\n    return false;\n  }\n\n  UpdateTheme(window);\n\n  return OnCreate();\n}\n\nbool Win32Window::Show() {\n  return ShowWindow(window_handle_, SW_SHOWNORMAL);\n}\n\n// static\nLRESULT CALLBACK Win32Window::WndProc(HWND const window,\n                                      UINT const message,\n                                      WPARAM const wparam,\n                                      LPARAM const lparam) noexcept {\n  if (message == WM_NCCREATE) {\n    auto window_struct = reinterpret_cast<CREATESTRUCT*>(lparam);\n    SetWindowLongPtr(window, GWLP_USERDATA,\n                     reinterpret_cast<LONG_PTR>(window_struct->lpCreateParams));\n\n    auto that = static_cast<Win32Window*>(window_struct->lpCreateParams);\n    EnableFullDpiSupportIfAvailable(window);\n    that->window_handle_ = window;\n  } else if (Win32Window* that = GetThisFromHandle(window)) {\n    return that->MessageHandler(window, message, wparam, lparam);\n  }\n\n  return DefWindowProc(window, message, wparam, lparam);\n}\n\nLRESULT\nWin32Window::MessageHandler(HWND hwnd,\n                            UINT const message,\n                            WPARAM const wparam,\n                            LPARAM const lparam) noexcept {\n  switch (message) {\n    case WM_DESTROY:\n      window_handle_ = nullptr;\n      Destroy();\n      if (quit_on_close_) {\n        PostQuitMessage(0);\n      }\n      return 0;\n\n    case WM_DPICHANGED: {\n      auto newRectSize = reinterpret_cast<RECT*>(lparam);\n      LONG newWidth = newRectSize->right - newRectSize->left;\n      LONG newHeight = newRectSize->bottom - newRectSize->top;\n\n      SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth,\n                   newHeight, SWP_NOZORDER | SWP_NOACTIVATE);\n\n      return 0;\n    }\n    case WM_SIZE: {\n      RECT rect = GetClientArea();\n      if (child_content_ != nullptr) {\n        // Size and position the child window.\n        MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left,\n                   rect.bottom - rect.top, TRUE);\n      }\n      return 0;\n    }\n\n    case WM_ACTIVATE:\n      if (child_content_ != nullptr) {\n        SetFocus(child_content_);\n      }\n      return 0;\n\n    case WM_DWMCOLORIZATIONCOLORCHANGED:\n      UpdateTheme(hwnd);\n      return 0;\n  }\n\n  return DefWindowProc(window_handle_, message, wparam, lparam);\n}\n\nvoid Win32Window::Destroy() {\n  OnDestroy();\n\n  if (window_handle_) {\n    DestroyWindow(window_handle_);\n    window_handle_ = nullptr;\n  }\n  if (g_active_window_count == 0) {\n    WindowClassRegistrar::GetInstance()->UnregisterWindowClass();\n  }\n}\n\nWin32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept {\n  return reinterpret_cast<Win32Window*>(\n      GetWindowLongPtr(window, GWLP_USERDATA));\n}\n\nvoid Win32Window::SetChildContent(HWND content) {\n  child_content_ = content;\n  SetParent(content, window_handle_);\n  RECT frame = GetClientArea();\n\n  MoveWindow(content, frame.left, frame.top, frame.right - frame.left,\n             frame.bottom - frame.top, true);\n\n  SetFocus(child_content_);\n}\n\nRECT Win32Window::GetClientArea() {\n  RECT frame;\n  GetClientRect(window_handle_, &frame);\n  return frame;\n}\n\nHWND Win32Window::GetHandle() {\n  return window_handle_;\n}\n\nvoid Win32Window::SetQuitOnClose(bool quit_on_close) {\n  quit_on_close_ = quit_on_close;\n}\n\nbool Win32Window::OnCreate() {\n  // No-op; provided for subclasses.\n  return true;\n}\n\nvoid Win32Window::OnDestroy() {\n  // No-op; provided for subclasses.\n}\n\nvoid Win32Window::UpdateTheme(HWND const window) {\n  DWORD light_mode;\n  DWORD light_mode_size = sizeof(light_mode);\n  LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey,\n                               kGetPreferredBrightnessRegValue,\n                               RRF_RT_REG_DWORD, nullptr, &light_mode,\n                               &light_mode_size);\n\n  if (result == ERROR_SUCCESS) {\n    BOOL enable_dark_mode = light_mode == 0;\n    DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE,\n                          &enable_dark_mode, sizeof(enable_dark_mode));\n  }\n}\n"
  },
  {
    "path": "windows/runner/win32_window.h",
    "content": "#ifndef RUNNER_WIN32_WINDOW_H_\n#define RUNNER_WIN32_WINDOW_H_\n\n#include <windows.h>\n\n#include <functional>\n#include <memory>\n#include <string>\n\n// A class abstraction for a high DPI-aware Win32 Window. Intended to be\n// inherited from by classes that wish to specialize with custom\n// rendering and input handling\nclass Win32Window {\n public:\n  struct Point {\n    unsigned int x;\n    unsigned int y;\n    Point(unsigned int x, unsigned int y) : x(x), y(y) {}\n  };\n\n  struct Size {\n    unsigned int width;\n    unsigned int height;\n    Size(unsigned int width, unsigned int height)\n        : width(width), height(height) {}\n  };\n\n  Win32Window();\n  virtual ~Win32Window();\n\n  // Creates a win32 window with |title| that is positioned and sized using\n  // |origin| and |size|. New windows are created on the default monitor. Window\n  // sizes are specified to the OS in physical pixels, hence to ensure a\n  // consistent size this function will scale the inputted width and height as\n  // as appropriate for the default monitor. The window is invisible until\n  // |Show| is called. Returns true if the window was created successfully.\n  bool Create(const std::wstring& title, const Point& origin, const Size& size);\n\n  // Show the current window. Returns true if the window was successfully shown.\n  bool Show();\n\n  // Release OS resources associated with window.\n  void Destroy();\n\n  // Inserts |content| into the window tree.\n  void SetChildContent(HWND content);\n\n  // Returns the backing Window handle to enable clients to set icon and other\n  // window properties. Returns nullptr if the window has been destroyed.\n  HWND GetHandle();\n\n  // If true, closing this window will quit the application.\n  void SetQuitOnClose(bool quit_on_close);\n\n  // Return a RECT representing the bounds of the current client area.\n  RECT GetClientArea();\n\n protected:\n  // Processes and route salient window messages for mouse handling,\n  // size change and DPI. Delegates handling of these to member overloads that\n  // inheriting classes can handle.\n  virtual LRESULT MessageHandler(HWND window,\n                                 UINT const message,\n                                 WPARAM const wparam,\n                                 LPARAM const lparam) noexcept;\n\n  // Called when CreateAndShow is called, allowing subclass window-related\n  // setup. Subclasses should return false if setup fails.\n  virtual bool OnCreate();\n\n  // Called when Destroy is called.\n  virtual void OnDestroy();\n\n private:\n  friend class WindowClassRegistrar;\n\n  // OS callback called by message pump. Handles the WM_NCCREATE message which\n  // is passed when the non-client area is being created and enables automatic\n  // non-client DPI scaling so that the non-client area automatically\n  // responds to changes in DPI. All other messages are handled by\n  // MessageHandler.\n  static LRESULT CALLBACK WndProc(HWND const window,\n                                  UINT const message,\n                                  WPARAM const wparam,\n                                  LPARAM const lparam) noexcept;\n\n  // Retrieves a class instance pointer for |window|\n  static Win32Window* GetThisFromHandle(HWND const window) noexcept;\n\n  // Update the window frame's theme to match the system theme.\n  static void UpdateTheme(HWND const window);\n\n  bool quit_on_close_ = false;\n\n  // window handle for top level window.\n  HWND window_handle_ = nullptr;\n\n  // window handle for hosted content.\n  HWND child_content_ = nullptr;\n};\n\n#endif  // RUNNER_WIN32_WINDOW_H_\n"
  }
]